Spot Margin Trading Explainer

browse

 

Overview

With spot margin trading, users can trade with leverage and go short on spot markets by borrowing from other users (lenders) on FTX, who are looking to earn yield on their assets.

Rates are determined by lenders on the platform and paid every hour. Lenders have the ability to call back their loans at any point in time and receive their funds in an hour.

Similar to futures, spot margin positions are subject to collateral requirements and liquidation rules.

To see current and historical lending rates, visit https://ftx.com/spot-margin/lending.

 

How do you enable spot margin trading?

To enable spot margin, visit your Profile page, click on the Margin section and select “Enable Spot Margin Trading”.  If you turn spot margin on, then your account will attempt to borrow any spot assets that it is short.

Keep in mind that with spot margin enabled, rather than selling your non-USD collateral whenever your USD balance dips below certain thresholds, your account will automatically borrow the negative USD balance via the spot margin market and pay the prevailing USD borrow rate. More details on this here.

 

What assets are available for borrowing/lending?

You can find the current list on the borrow and lending pages, as well as via API.  Most but not all spot assets available for deposit and withdrawal on FTX can be borrowed.

 

Borrowing

 

How FTX automates borrowing

There are a number of different ways to implement margin trading and borrow/lending.  FTX’s is the most automatic in the industry, though the user still has full control over their borrowing and lending.  Rather than requiring discrete actions to request borrows, receive them, move the funds, open/close positions, etc., the entire process is abstracted away into net balances.

As long as you have sufficient margin, you can borrow spot tokens simply by spending beyond your account’s balance of them.

So say that you have $50,000 (USD) in your account and nothing else.  If you sold 1 BTC for $20,000 in the spot BTC/USD orderbook, your total balances would then be: +70,000 USD; -1 BTC.  You didn’t have the BTC and so had to borrow it in order to sell it.  FTX does this automatically when you sell, sending an order to the funding book on your behalf to borrow 1 BTC.

You can even do this with withdrawals!  If your account has 3 BTC and nothing else, you can request a withdrawal of 1 ETH (despite not having any ETH!).  FTX will automatically request a borrow for 1 ETH for you, and you can then withdraw that ETH.  Note, however, that you cannot borrow to withdraw for greater size than is available and unused in the borrow-lending book!

So there’s no need to manage collateral vs margin positions vs withdrawable tokens vs margin trading vs spot trading.  The same commands (buy/sell/deposit/withdraw) work normally and are allowed as long as your account has enough total collateral to support the necessary borrows.

 

Spot Margin Trading

Your spot margin positions are cross-margined with your futures positions; there is no separate spot margin requirement you have to monitor.

Generally, the way that futures margin works is that each contract has a margin requirement (initial margin fraction to open a position and maintenance margin fraction to avoid liquidation), and you need a total collateral value which meets those thresholds.

Spot margin is similar.  The position size of a spot margin position is the notional size of any short (negative) balances you have.  So for instance if you have + $65,000; -2 BTC; and BTC is trading at $20,000, then the size of your spot margin position is $40,000 (2 BTC * $20,000 per BTC).  This is treated the same as if you had a $40,000 futures position on, and requires initial margin to increase and maintenance margin to avoid liquidation.

 

Formulas

Term

Formula

Max account leverage

Max account leverage available for spot margin positions is 10x.

Spot Margin Base IMF

If borrowing USD: 

= 1 / max account leverage

If borrowing non-USD assets (e.g. BTC)

 = max (1 / max account leverage, 1.1 / Total Weight - 1)

Spot Margin IMF


The minimum margin fraction required to open a spot margin position, applicable to positions of all sizes. 

= max( Spot Margin Base IMF, IMF factor * sqrt [position size in tokens] ) * IMF Weight

Spot Margin MMF


The margin fraction in which our account would start getting liquidated.

If borrowing USD: 

= 3%

If borrowing non-USD assets (e.g. BTC)

 = max ( 1.03 / Total Weight - 1, 0.6 * IMF factor * sqrt [position size in tokens] ) * MMF Weight

Spot Collateral Value



If token quantity is positive

Token quantity * token mark price * min(collateral weight, 1.1 / (1 + imf factor * sqrt(token quantity)))

If token quantity is negative

Token quantity * token mark price

Borrow Rate

Net fee for borrowing assets, applied to the borrowed size.

(hourly lending rate) * ( 1 + 500 * borrower’s taker fee)

Total Weight

See values here.

Collateral Used

Position notional * spot margin IMF

Max amount you can borrow

Max USD you can borrow to buy other assets

(collateral * [ 1 + 1/max leverage] ) / ( [1 + 1 /max leverage] - borrow asset’s total weight) 

Max token you can borrow to sell

Collateral / Spot Margin IMF / Mark Price

Max borrowed amount you can withdraw

Collateral / 1 + Spot Margin IMF

 

Examples

Assume that:

  • You have $10,000 in collateral and nothing else
  • Your account’s max account leverage is set to 10x
  • Your taker fee is 0.05%

Throughout this whole section, we will be opening and using the following positions:

 

 

ETH/USD

LTC/USD

Direction

Buy

Sell

Size

10

100

Price

$2,000

$50

Total Position Notional

$20,000

$5,000

Total Weight

0.95

0.95

IMF Factor

0.0004

0.0004

IMF Weight

1.0

1.0

MMF Weight

1.0

1.0

 

Calculating Initial Margin Fraction (IMF)

Let’s start with the ETH/USD long. Because the amount of ETH in notional USD terms you’re trying to buy ($20,000) is greater than the amount of USD collateral you have ($10,000), your spot margin position will borrow $10,000 USD.

Since you will be borrowing USD, the initial margin fraction required to open your position will simply be 1 divided by your account’s max leverage:

= 1 / 10

= 10%

 

On the other hand, to short LTC/USD, you will actually be borrowing LTC in order to sell it. As a result, the Base IMF formula for this spot margin position will be:

= max ( 1 / max account leverage, 1.1 / Total Weight - 1 )

= max (0.1, 1.1 / 0.95 - 1)

= 15.79%

 

Now, to calculate the actual Spot Margin IMF for your LTC/USD short, we use this formula:

= max( Spot Margin Base IMF, IMF factor * sqrt [position size in tokens] ) * IMF Weight

= max (15.79%, 0.0004 * sqrt [100] ) * 1

= max (15.79%, 0.4%)

= 15.79%

 

Calculating Maintenance Margin Fraction (MMF)

For the ETH/USD long, since you’re borrowing USD, your spot margin MMF will simply be 3%. 

 

For the LTC/USD short:

= max ( 1.03 / Total Weight - 1, 0.6 * IMF factor * sqrt [position size in tokens] ) * MMF Weight

= max (1.03 / 0.95 - 1, 0.6 * 0.0004 * sqrt [100] ) * 1

= max (0.842, 0.0024)

= 8.42%

 

Keep in mind that risk management on FTX is done at the account level, not at the position level. We look at the weighted average MMF across all of your spot margin and futures positions to determine your account MMF, which would dictate the margin fraction level in which your account would get liquidated. For more details on this, visit our account margin FAQ.

 

Calculating Borrow Rate

The borrow rate is influenced by the lending rate, which is determined by the lenders who you’re borrowing from, and your taker fee. Let’s calculate it for each of your two spot margin positions.

 

ETH/USD Long

Assume that the current lending rate for USD is at 2% / year. The Borrow Rate formula uses hourly rates, so to convert the yearly rate to hourly we simply do the following:

= 0.02 / 365 / 24

= 0.000228%

 

Knowing that your taker fee is 0.05%, let’s calculate your borrow rate for USD:

= (hourly lending rate) * ( 1 + 500 * borrower’s taker fee)

= 0.000228% * (1 + 500 * 0.04%)

= 0.000285%

 

Interest is paid every hour in the currency you’re borrowing. In this case, assuming USD rates stay at 2% and your taker fee doesn’t change, you’d be paying $0.0285 every hour to maintain your $10,000 borrow.

 

LTC/USD short

In this case, you’re borrowing LTC. Assume its yearly rate is 1%, which converted to hourly equals 0.000114%.

Same as above:

= 0.000114% * (1 + 500 * 0.05%)

= 0.000143%

 

Note about fees

The borrow rates displayed on the margin borrows page are the actual rates you’d be paying for that hour (i.e. your taker fee is already blended in).

Also, if funds are borrowed and withdrawn from the account the expected borrow rate for the next hour will be applied to the withdrawn funds

 

Collateral Overview

Now that the two positions are open, let’s see how they affect your account’s collateral. Your borrows are considered negative spot balances, which decrease your account’s collateral value and require additional collateral as well.

 

How negative spot balances decrease your account’s collateral value

With your ETH/USD spot margin long, you borrowed $10,000 USD in order to buy 10 ETH. This means that, just like a normal spot trade, the 10 ETH will show up as a positive balance in your account. However, because you used margin to borrow the $10,000 USD, the $10,000 will show up as -$10,000 in your account balance.

Similarly, with your LTC/USD short, you borrowed 100 LTC (which will show up as -100 LTC in your balance) and sold it for $5,000 USD (which will be added to your balance).

 

Now, using the formula below, let’s see how your total account collateral looks:

If token quantity is positive

Token quantity * token mark price * min (1.1 / [IMF Weight * {1.1 / Total Weight - 1} + 1] , 1.1 / [Spot Margin IMF Factor * sqrt{size} * IMF Weight + 1] )

If token quantity is negative

Token quantity * token mark price

 

Current Collateral Overview

Asset

Size

Mark Price

Total Weight

IMF Factor

Total Collateral

USD

-5,000

$1

1

-

-$5,000

ETH

10

$2,000

0.95

0.0004

$19,000

LTC

-100

$50

0.95

0.002

-$5,000

Total Collateral

-

-

-

-

$9,000



Calculating how much collateral is being used by your spot margin positions

Derivatives and spot margin positions require collateral. To know how much collateral each of your positions is using, use this formula:

= position notional * spot margin IMF

For your ETH/USD long position:

= $10,000 * 10%

= $1,000

That means that $1,000 of your collateral is currently being used for your ETH/USD position, which will be deducted from your total account collateral in order to determine your free collateral.

Doing the same for the LTC/USD short position:

= $5,000 * 15.79%

= $789

 

Market

Position Size

Mark Price

Position Notional

IMF %

MMF

Collateral Used

ETH/USD

10

$2,000

$20,000

10%

3.00%

$2,000

LTC/USD

100

$50

$5,000

16%

8.42%

$789

Total (sum)

-

-

$25,000

-

-

$2,789

 

Total Collateral

$9,000

Total Collateral Used

$2,789

Free Collateral

$6,211

 

Stocks

Borrowing and lending stocks works identically to everything else, except that they all have an IMF of 20%. The max leverage you can achieve if exclusively borrowing stocks is 5x.

 

How Interest Rates are Determined

Every hour, lenders are paid and borrowers are charged.  Rates are determined as follows:

  1. All lenders specify a minimum borrow rate they must receive for that hour.
  2. At the beginning of the hour, we calculate the total borrow demand for each coin between all users.
  3. We have an auction: we sort the lending offers by minimum rate, and take the cheapest set that satisfies the borrow demand.  The borrow rate is set to the minimum borrow rate of the marginal (most expensive) loan that was required.
      • Alice: wants to borrow 2 BTC
      • Bob: wants to borrow 3 BTC
      • Charlie: lending 1 BTC, min 0.01%
      • Denise: lending 10 BTC, min 0.03%
      • Total borrow demand is 5 BTC.
      • This borrows Charlie’s BTC and 4 of Denise's
      • The marginal loan is Denise's 4 BTC loaned out at 0.03% minimum
      • So all 5 BTC of borrows -- including the one against Charlie -- use an interest rate of 0.03%

So this means the following:

  1. All borrow rates only last for one hour; each hour, they’re re-determined.
  2. Every borrower pays the same rate for an hour/coin; and every lender who does in fact lend their tokens receives the same interest rate for an hour/coin.
  3. When you open up a borrow mid-hour, you end up paying for that hour’s interest rate at the end during the auction.
  4. Note that you will be charged interest on your borrows whether they're held on FTX, withdrawn, pending withdrawal, sold, or anything else.

 

Lending

To lend an asset out, you specify the quantity you want to lend, and the minimum interest rate you’d require. If this loan ends up being borrowed (i.e. your interest rate is below the marginal rate), you will receive the marginal interest rate hourly.  By default your specified parameters (amount to try to lend, minimum interest rate) will persist from hour to hour. 

Lenders bear no counterparty risk: FTX guarantees interest payments for however long your funds are borrowed, even if the borrower gets liquidated. Additionally, FTX charges no fees to lenders. Interest rates are paid by borrowers to lenders in full.

Assets that you are lending are effectively locked, and cannot be withdrawn/sold/used as collateral/staked/etc.  However, they can be used as maintenance margin to prevent liquidations.

If you choose to stop lending your coins and they were in fact being borrowed, you will stop earning interest on them at the end of the hour and they will be unlocked in 1 hours.  If you were offering to lend your coins but they were not actually borrowed (because there was not sufficient demand at your minimum interest rate), you are free to use the coins and stop trying to lend at any point.

You can manage your loans at ftx.com/spot-margin/lending.

 

Risk

FTX's risk engine will attempt to liquidate any users before they could get negative net account balance; using spot margin opens you up to liquidation risk.  In general, FTX and its backstop fund will attempt to protect other users against other accounts' bankruptcy risk.

For more information, visit our liquidations page.

 

 

Disclaimers:

  • FTX Token (FTT) is not available in the United States or other prohibited jurisdictions. If you are located in, incorporated or otherwise established in, or a resident of the United States of America, you are not permitted to transact in FTT.
  • Trading on FTX is not available in the United States or other prohibited jurisdictions. If you are located in, incorporated or otherwise established in, or a resident of the United States of America, you are not permitted to trade on FTX.
  • FTX retains the final right to interpretation of its rules and conditions on these and all contracts.
  • FTX retains the final right to modify terms of its rules and conditions on these and all contracts.
  • Much of this article is an approximation and ignores details, e.g. fees.
  • When in doubt, feel free to contact us for clarifications.
  • This post outlines the basics of the FTX spot margin system.  It is not the only relevant resource, and may be overridden by other sources.  Eligible parties may be asked to sign other documents in some cases, including but not limited to the FTX Institutional Customer Margin and Line of Credit Agreement.
  • There are risk factors associated with margin trading, chiefly liquidation risk.  Please decide whether margin trading is right for you.
  • As the terms of service make clear, manipulative behavior is not tolerated on FTX.  Any attempts to do so may result in account termination at FTX's sole discretion.

 

Previous
Next
360053007671
Didn't find what you were looking for?
Create a support ticket
Community

Was this article helpful?

1 out of 1 found this helpful