How BitShares protects MPAs using Margin Calls

in bitshares •  7 years ago 

In the latest #BeyondBitcoin hangout when we talked about BSIP-18 a question popped up about margin calls, and I failed to produce an example.
This post is supposed to remedy that.

Recap

Market-Pegged Assets (MPA) in #BitShares are assets that can be borrowed from the #blockchain by providing collateral to back it up. For example, to borrow bitUSD you have to lock up BTS as collateral. When the debt is paid back, the collateral will be returned.

The amount of BTS required for borrowing bitUSD is determined using an external price feed. The price feed contains several components that come into play here:

  1. The settlement price (SP), given as bitUSD/BTS - someone who owns bitUSD can request settlement and will have their bitUSD converted to BTS 24 hours later, at the settlement price.
  2. The margin call ratio (MCR) - in order to borrow x bitUSD you have to provide at least (x*MCR/SP) BTS as collateral. If the settlement price goes down, at some point SP/MCR will drop below your debt/collateral ratio, and you will be margin called.
  3. The maximum short squeeze ratio (MSSR or MSQR) - a debt position that is margin called will automatically try to buy bitUSD from the market, paying up to MSSR/SP BTS per bitUSD.

The intent of margin calls and MSSR is to protect the market. If the SP drops too much, it will eventually reach a point where the value of the collateral is no longer sufficient to cover the outstanding debt. In order to prevent that, the blockchain tries to close the debt position by buying back bitUSD from the market.

The MSSR provides an incentive to both traders and shorters to work towards that goal:

  • For the owner of the short position, the MSSR is a penalty. This encourages him to always provide sufficient collateral.
  • For the trader, the MSSR is an incentive to sell bitUSD, because the margin call pays more than the settlement price.

Example

Throughout the example, MCR will be 1.75 and MSSR will be 1.1, i. e. you must provide at least 175% collateral, and margin calls will pay up to 10% above the market price.

  1. Suppose SP = 1 bitUSD/10 BTS.
  2. Alice borrows 100 bitUSD for 1800 BTS. This is OK, because it is more than required (100*MCR/SP = 1750).
  3. Suppose the value of BTS goes down, i. e. SP = 1 bitUSD/11 BTS.
  4. At this point, Alice's position is undercollateralized. The minimum required collateral for 100 bitUSD is now 100*1.75*11 = 1925. Alice is margin called.
  5. Bob places an offer on the market to sell 20 bitUSD for 240 BTS.
  6. The blockchain checks that Bob's offer is within the short squeeze range. The maximum short-squeeze price is MSSR/SP = 1.1 * 11 = 12.1 BTS/bitUSD, while Bob only asks 240/20 = 12 BTS/bitUSD.
  7. The blockchain buys 20 bitUSD from Bob, using up some of Alice's collateral. Alice now owes 100-20=80 bitUSD and is left with 1800-240=1560 BTS as collateral.
  8. At this point, Alice's short position is safe again: The minimum required collateral for 80 bitUSD is 80*1.75*11 = 1540 BTS.

Effectively, Alice has paid a penalty of 20 BTS, because she paid 240 BTS for an amount of bitUSD that was worth only 220 BTS. Bob has received a reward to 20 BTS for helping the blockchain secure the market, by selling (some of) his bitUSD.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

very good concise article explaining something that many need to still learn. well done

first blockchain buy should put my in the safe position, but this didn't happend. Why?

Second question.
What happens in such a situation?
I have 1000 USD DEBT and 300 USD on my Balance
and 1 sec ago i was Margin Called

I hope that it in the first place the existing amount will be deducted from the balance
And then everything will be recalculated again
But is that true?

first blockchain buy should put my in the safe position, but this didn't happend. Why?

The word "safe" in "Alice's position is safe again" is only from the POV of the blockchain.
It is true that Alice will remain in margin call territory until either the price feed returns to its original position, or Alice updates her short position. In a liquid market this means that in fact the entire short position will be matched with orders on the market.

I have 1000 USD DEBT and 300 USD on my Balance
and 1 sec ago i was Margin Called

Your balance is not touched. The margin call is only executed against the market.

thanks for explanation, I have one more question
How to buy yellow margin offer from the market
direct click on that offer does not cause purchase

I would think that placing a limit order at about 10% above the settlement price would be sufficient. That might require some calculations on your own, I'm not really familiar with the UI, sorry.

Very informative. I was under the impression that once called your entire short will be liquidated. Thanks we keefp learning.

Good point. The word "safe" in "Alice's position is safe again" is only from the POV of the blockchain.
It is true that Alice will remain in margin call territory until either the price feed returns to its original position, or Alice updates her short position. In a liquid market this means that in fact the entire short position will be matched with orders on the market.

Excellent, thank you!

what if there are not enough offers/orders on the market or they are out of the short squeeze range?

I was wondering this myself, particularly whether there is a time limit for a margin call to be executed. From my observations of the market over the past weeks, there doesn't seem to be. It would be the margin call remains until: 1) it is filled; 2) the feed price moves back above the call price; or 3) the feed price moves further such that the collateral is no longer sufficient and the position is forced settled on the MPA holder.

Precisely.

The blockchain will only buy up to the maximum short squeeze price. If there are no orders left in that range, nothing else happens.

if nothing else happens, than what happens to the Alice's position if blockchain can't buy anything?

As the value of the collateral continues to go down, the maximum short squeeze price moves through the market. If the market does not provide sufficient liquidity to settle the full debt, at some point the value of the collateral may drop below the nominal value of the debt. At that point, the system collapses. We call that a "black swan".

Thanks for the step by step example.

Shorting is for the guys with hair on their chest. I'm considering it, but not now. I wouldn't risk my hard earned bts for it unless the bts goes crazy low.

Smart move. Don't play with fire, You'll get burned.

Hold on to what you know ;-)

Yes you right. The only problem is that we all don't know much about all this. Too new and too volatile. More like lottery.

True. Still I think BTS is the better choice. I just read @kencode explain how far they have developed a payment system based on BTS and smart assets. That is a gamechanger.

I follow his work. Good stuff, just look like he's dealing with big mess with his company right now. We all hope for the best for him.

Sure. I have great expectations. And the whole bitshares sphere seems well funded, so I don't worry about where the markets take us short term.

Me neither . I'm think that a lot of work in all those years was put in bts and people just don't see the potential of bts. Just think about what bitcoin can offer comparing to bts. It's pathetic. But what a great opportunity for us. I'm buying bts every day.

very nice explanation of how his works using bitshares as collateral.

Thanks mate. One increment closer to understanding BTS margin trading. I read, re-read, and will re-read yet again.

@cyrano thanks for updating with us!! Keep posting, Great job!!

Well done post thanks for sharing

@cyrano
Nice writeup
Good job
Keep it up.

thanks for sharing this update @cryno. nice post

during this latest bitshares crash, I've had some bitSILVER, borrowed with 3.0 collateral. As the price of bitshares plummets, the price of silver stays the same, over the weekend, since it is pegged to a market that does not trade on weekends. so as the bitshares market gets shorted down, my bitSILVER is worth more bitshares. Whenever I settle the loan, my bitSILVER will give me more bitshares than when I started the trade.

Congratulations @cyrano! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 3 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

tnx for sharing 👍 👍

Thanks for sharing! It's very informative.

Upvote!

I'm so sorry, I'm new to Steam and not knowing the rules of the community have translated your post into Russian and posted on the platform "Golos" without your permission: https://golos.io/bitshares/@hultqvist/kak-bitshares-zashishaet-privyazannye-k-rynku-aktivy-ispolzuya-marzhin-kolly. Can I ask your permission now?

Permission granted, as long as you keep the link back to my original.

ty

Bitshares lol