This content was deleted by the author. You can see it from Blockchain History logs.

How BitShares protects MPAs using Margin Calls

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.