Replies: 5 comments 14 replies
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
-
We will have a way of adding additional funds once we combine positions properly. How many funds to initially add is a trade-off decided by the user based on transaction fees per top-up really.
tl:dr I think it is really hard to decide how severe this problem is which is why I think we should approach the solution finding process primarily from the angle of "What is the most correct solution?" first and only then consider, how much of a problem dead liquidity is. In the following points, I try to make it obvious how hard it is to quantify the problem of dead liquidity. Given the choice of a hard to quantify problem that is less correct vs the correct one, I think we should favor the correct one.
No matter where the funding rate comes from, you have to pay the fees one way or another. If the position ends up being closed because all my locked up money was eaten up by fees, I'd feel cheated: "What did I pay for?" "Where is my payout?" Of course, having to top up my fee balance 3 times with the result of spending the same amount of money as I am getting out of the contract is effectively the same but at least it is obvious that you need to continuously pay for this service.
Taking the numbers from above, we have an effective interest payment of
Dead liquidity is a problem no doubt. The problem only materializes if a user is investing 100% of their money though. If they have some funds sitting in their account, it is already dead so might as well use them for fee payments. I think (3) shows that this is primarily a problem for the maker as they are more likely to optimize usage of the funds available. There is multiple ways of approaching this though:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for writing this up in so much detail @bonomat ! A few thoughts:
Just to make sure I understand this correctly:
I am not sure I can follow this completely. The counterparty's initial margin is constant, whereas
That is what Bitmex does. I don't fully understand why though. The contracts do not reflect the leverage and thus don't reflect the amount that was borrowed / lent. Wouldn't it be more correct to use the initial counterparty margin? Some thoughts on "increased risk": If we assume a bull market then long pays interest to short. At the same time the long position has profits, so the long position in total has more BTC available. (same vice versa) |
Beta Was this translation helpful? Give feedback.
-
Here is some more food for thought: At the moment we calculate an initial funding fee that is based on the rate communicated in the offer, and calculated for 24h (i.e. the settlement interval). While I think an initial funding fee is not incorrect, I am not sure we should not make it configurable to the maker if / how it should be charged. It might make the product more attractive if we charge at the rear; i.e. if we charge for the current funding period when a funding event occurs, and not for the next period. |
Beta Was this translation helpful? Give feedback.
-
This is a collection of learnings we made and should serve as a base for discussions:
Funding Rates
For the actual discussion point, jump to the end.
Some recaps
How do CFDs work
A CFD is a Contract For Difference. Meaning, traders get the difference between opening and closing price.
If the trader goes long:
The trader who goes long borrows USD from the counterparty and buys BTC at the current rate.
He has to return said USD to the counterparty once the position is closed. At this point, he has to sell parts of the BTC to pay back the borrowed USD.
Example:
Contract closes at $200/BTC:
100/200 = 0.5BTC
1 BTC (TraderA margin) + (1 BTC (borrwed at $100/BTC) - 0.5 BTC (paid back at $200/BTC) = 1.5 BTC
2 BTC - 1.5 BTC = 0.5 BTC
Contract closes at $80/BTC:
100/80 = 1.25BTC
1 BTC (TraderA margin) + (1 BTC (borrwed at $100/BTC) - 1.25 BTC (paid back at $200/BTC) = 0.75 BTC
2 BTC - 0.75 BTC = 1.25BTC
If the trader goes short:
The trader who goes short borrows BTC from the counterparty to sell at the current for USD.
He has to return BTC to the counterparty once the position is closed. At this point, he has to buy BTC to pay back.
Example:
Contract closes at $80/BTC:
TraderA has to return 1 BTC to TraderB at the price of $80/BTC
TraderA sold 1 BTC for $100 when opening the position. Now he only needs $80 to buy back said BTC. He can keep the difference
$100-$80=$20
. $20 at the closing price of $80/BTC are20/80 = 0.25
, i.e. he made 0.25 BTC profit.TraderA gets
1 BTC (TraderA margin) + (($100 - $80)/80) = 1.25 BTC
TraderB gets the different, i.e.
2 BTC - 1.25 BTC = 0.75 BTC
Contract closes at $200/BTC:
TraderA has to return 1 BTC to TraderB at the price of $200/BTC
TraderA sold 1 BTC for $100 when opening the position. Now he needs $200 to buy back said BTC:
$100-$200=$-100
. $100 at the closing price of $200/BTC are-100/200 = -0.5
, i.e. he made a loss of 0.5 BTC.TraderA gets
1 BTC (TraderA margin) + (($100 - $200)/200) = 0.5 BTC
TraderB gets the difference, i.e.
2 BTC - (-0.5 BTC) = 1.5BTC
What is the funding rate
The funding rate is a periodic payment between taker and maker and can flow in either direction.
The funding rate can be positive or negative. If the funding rate is positive then there is a bullish sentiment in the market. At these times longs pay the shorts.
If the funding rate is negative, there is a bearish sentiment in the market. At these times the shorts pay the longs.
It might be hard to see, but there is an implicit lending involved when trading CFDs: the trader going long borrows USD and the trader going short borrows BTC.
Because of this implicit lending market, traders have to pay interest to each other:
taken from 1
For example:
This means, the trader going long has to pay 1% per day and the trader going short has to pay 0.25% per day. Obviously, if they pay each other, one only gets the difference.
Hence, the funding rate is calculated as
_ 3 because bitmex has 8h intervals. 8h/24h=3_
Since it is positive, the trader going long has to pay the trader going short.
Calculations
TakerA bought 15k contracts at the price of $750/BTC
The funding amount is calculated using the market value of the position:
Meaning, the taker has to pay 0.05 BTC in the next funding round.
If the price rises to $1500/BTC the market value of the position decreases and the funding amount decreases:
Meaning, the funding amount changes with the value of the position.
Note: in contrast to what was said earlier, the funding amount is actually independent of the counterparty's margin. It just happens that in our case, the counterparty's margin has always a leverage of 1 and hence these values are equal.
For calculating the funding amount we should however take the market value (contracts/spot price).
Actual discussion
Where to subtract the funding amount?
In a discussion with @da-kami we had two ideas of where the funding amount should come from:
A. Should it be subtracted fromt he initial margin?
This would mean that the position gets riskier the longer the position is open as the usable margin decreases. If the usable margin decreases, the liquidation price should increase (the trader does not have enough funds to cover losses). Eventually, the position should close as not enough funds are available to pay for the funding.
B. Should both traders (taker and maker) provide an additional buffer for the interests
This would mean that both trader (taker and maker) would need to provide additional funds at the beginning. If we don't allow for dynamically adding funds, this would mean, both would need to know for how long they want to keep the position open.
Imho A) is the way to go as B) has the problem of dead liquidity: both have to put up additional funds for covering for the funding amounts. But, the actual funding amount does not take into account this amount. The trader only has to pay on the position value.
Where does the funding amount go to?
In both cases, the paid funding amounts should not change future funding rounds: since the funding amount is calculated based on the position value, not on the other party's margin.
For example, if a taker goes long and the maker goes short (our current scenario): if the price appreciates the taker has to pay the maker. Eventually the maker runs out of margin. Nevertheless, he received interest payments from the taker.
Imho, the maker should always receive these interest payments despite him losing (parts or all of) his margin.
That being said, the funding amount should not increase the margin.
Footnotes
https://www.bitmex.com/app/perpetualContractsGuideExamples ↩
Beta Was this translation helpful? Give feedback.
All reactions