Author Topic: Margin Call Explanation & Beware of Illiquid Markets with Low Margin  (Read 11519 times)

0 Members and 1 Guest are viewing this topic.

Offline bytemaster



A margin call will occur any time the highest bid is less than the CALL PRICE and greater than SQP

FEED = Settlement Price
SWAN = DEBT / COLLATERAL  - the point at which the network is insolvent.
CALL   = SWAN * 1.75
SQP   = FEED / 1.5

1.75 and 1.5 are specified as two parameters to the price feed. 

If you would like the feed to provide additional protection to the shorts, then ask the witnesses to adjust their feed publishing scripts to use SQP of FEED / 1.1.

Just beware that the consequence of protecting the shorts against thin markets is the following:

1. Shorts will end up posting less collateral
2. Greater dependence upon the feed vs the market
3. If there are no bids above the SQP price then margin will not get called even if the Feed Price is below the Call price.

For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #1 on: October 16, 2015, 07:06:24 am »
.
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #2 on: October 16, 2015, 07:07:02 am »

 ha-ha-ha
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline Troglodactyl

  • Hero Member
  • *****
  • Posts: 960
    • View Profile
Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #3 on: October 16, 2015, 07:50:24 am »
Code: [Select]
Publish feed
Publisher in.abit
Asset USD
Initial collateral ratio 1.50
Collateral maintenance ratio 1.75
Core rate 208.299050781 BTS/USD
Settlement price 208.299050781 BTS/USD
Fee 1 BTS

So "Initial collateral ratio" = "SQP" and "Collateral maintenance ratio" = "Call ratio"?

In the example feed published above, is the initial required ratio supposed to be less than the ratio that must be maintained?  Wouldn't that allow people to open positions that will be called instantly?

Offline svk

Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #4 on: October 16, 2015, 09:12:51 am »
Yes, intitial = SQP, and no the engine won't allow you to open margin positions with collateral below the maintenance ratio which would get you margin called. You can however very easily get margin called if you have low collateral ratio, and when you do an automatic buy order will be placed that will execute up to feed price * 1.5!! This already happened to someone yesterday, and to make things worse the forced margin call does not try to use any balance that you already have in your account, but will instead always buy on the open market.

I have an update of the GUI partially done that will address this and always show the current call price of that market, in the Exchange as well as the modal used to adjust margin positions. Until that's out I'd advise caution in opening margin positions.

Edit: Removed incorrect info based on misunderstanding
« Last Edit: October 16, 2015, 03:07:17 pm by svk »
Worker: dev.bitsharesblocks

Offline spartako

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #5 on: October 16, 2015, 11:02:04 am »
I don't understand the behaviour that happened to me in the GOLD market.

I have this collateral account: https://bitshares.openledger.info/#/account/gold-collateral-holder-30
I have quite good collateral ratio: 2.44 but an order was filled 4 hour ago similar to a margin call (at very expensive price: 370K where the feed is 246K)
How can I understand this?

Feed price: 246950
Margin Call Price: 370425
Maintenance Call Price: 432162
Your Call Price: 601215

Why I was called even if my call price is 600K? Could be a problem in feeds (4 hour ago)?
wallet_account_set_approval spartako

Offline mindphlux

  • Sr. Member
  • ****
  • Posts: 232
    • View Profile
Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #6 on: October 16, 2015, 11:24:32 am »
It looks like you were margin called at 1.50 SQP. I do not understand it though why this is happening.
Please consider voting for my witness mindphlux.witness and my committee user mindphlux. I will not vote for changes that affect witness pay.

Offline topcandle

Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #7 on: October 16, 2015, 11:28:45 am »
It looks like you were margin called at 1.50 SQP. I do not understand it though why this is happening.

Aren't all margin calls at 1.50 collateral leverage?
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

jakub

  • Guest
Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #8 on: October 16, 2015, 11:30:27 am »
Why I was called even if my call price is 600K? Could be a problem in feeds (4 hour ago)?

We should definitely have a history of price feeds in the GUI, otherwise there is no easy way to verify if the system works correctly.
A similar thing happened to me but I played with a small amount so I did not bother to investigate. But even if I wanted to investigate I'd have no data to compare it with (unless it is there in the GUI but I cannot find it).

Also, I'd suggest the price feed to become part of the market history chart.
It could be in the form of a thin gray line in the background but it would offer a valuable context for the actual trades happening on the blockchain.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #9 on: October 16, 2015, 11:46:24 am »
witness please update your price feed, set parameter short_squeeze_ratio between 1001 to 1100.
this is important. please update soon.
https://bitsharestalk.org/index.php/topic,18852.msg245870.html#msg245870

Offline bytemaster

Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #10 on: October 16, 2015, 01:52:56 pm »
Yes, intitial = SQP, and no the engine won't allow you to open margin positions with collateral below the maintenance ratio which would get you margin called. You can however very easily get margin called if you have low collateral ratio, and when you do an automatic buy order will be placed that will execute up to feed price * 1.5!! This already happened to someone yesterday, and to make things worse the forced margin call does not try to use any balance that you already have in your account, but will instead always buy on the open market.

What complicates the matter (and that I didn't know until yesterday) is that the call price for any given asset is independent of the feed price, it only depends on the total debt and collateral of that asset, and the maintenance ratio. For example, the call price of the CNY:BTS market is currently 47.45 BTS/CNY, while the settlement price (feed * SQP) is at 49.47 BTS/CNY. For USD:BTS the call price is 365.42560 BTS/BTS and settlement price (feed + SQP) is 314.35000 BTS/USD, which is the similar to BM's graph.

I have an update of the GUI partially done that will address this and always show the current call price of that market, in the Exchange as well as the modal used to adjust margin positions. Until that's out I'd advise caution in opening margin positions.


Please stop redefining terms, anyone who reads this post will not get an accurate picture.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bytemaster

Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #11 on: October 16, 2015, 01:58:41 pm »
The CALL PRICE is unique to every user and depends upon their debt / collateral ratio.      It has nothing to do with the feed.

The user is in direct control of their CALL PRICE and it will never change on them unless they update their position.

The SQP price is the MOST that a margin call will pay to cover.   

Margin is called any time the HIGH BID is less than the CALL PRICE.    In other words anytime the highest offer to buy the collateral and pay off the debt is below the call price. 
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline topcandle

Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #12 on: October 16, 2015, 02:20:12 pm »
Is there a list that shows who has the lowest swan price?  Ranked to the highest swan price.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Xeldal

  • Guest
Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #13 on: October 16, 2015, 02:31:49 pm »
The CALL PRICE is unique to every user and depends upon their debt / collateral ratio.      It has nothing to do with the feed.

The user is in direct control of their CALL PRICE and it will never change on them unless they update their position.

The SQP price is the MOST that a margin call will pay to cover.   

Margin is called any time the HIGH BID is less than the CALL PRICE.    In other words anytime the highest offer to buy the collateral and pay off the debt is below the call price.

What prevents someone selling down the BID below any number or individual CALL PRICE just to collect all the forced liquidation at SQP.  Sounds like an easy <50% discount given how thin the internal book is compared to everything the feed is based on. 

So regardless of the actual price from the feed, I can be force liquidated at 50% below the the feed simply because noone on the internal market has a high enough bid.  I think i understand the need for this type of solvency protection but it seems really dangerous and easy to manipulate.  my apologies if I simply don't understand it.

Offline maqifrnswa

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
Re: Margin Call Explanation & Beware of Illiquid Markets with Low Margin
« Reply #14 on: October 16, 2015, 02:33:27 pm »
This addresses one of my previous rants about the supply-side of bitassets. From the supply-side approach, I think it illustrates that SQP should be a percentage of SWAN not FEED.

1) When BID < (CALL=debt/collatoral*.175), then a forced margin call is made which destroys a bitasset.
2) During a short squeeze, 1 bitA is worth more than 1 corresponding asset (e.g., 1 bitUSD > 1 USD). That means there is an under-supply of bitA. When in under-supply, avoid destroying bitassets. In fact, people should have an incentive to short above the highest bid since they are being paid a premium [footnote].
3) Since bitA should not be destroyed, margin calls should be avoided until DEBT/COLLATERAL=1, that is, the SWAN value. SQP should enforce this.

Therefore, SQP should be a function of SWAN. You want it as close to SWAN as possible while still giving a cushion to force collatoralization and avoid the swan. Since FEED and SWAN are not functions of each other, setting SQP to a fraction of FEED doesn't necessarily perform proper squeeze protection, and in fact could potentially push the short squeeze in the wrong direction by destroying bitA that are already overvalued.




[footnote] Pricing bit assets is becoming a little clearer. The system enforces:
SWAN < bitUSD/BTS  < USD_FEED
A/USD_FEED < bitUSD/BTS < USD_FEED
where A is the least collateralize debt/collateral ratio (in units of bitA/BTS)

So there are two arbitrage opportunities:
If I think USD_FEED should go down (that is BTS value increasing), I want to short at USD_FEED so I make a profit no matter what (or at worst, break even).

If I think USD_FEED will increase (BTS value decrease), I want to buy bitA at close to SWAN as I can, as I will make a profit no matter what (or at worst, break even).

Therefore, as long as BTS is increasing in value (i.e., making a profit), I will want to short as close to USD_FEED as I can get.
« Last Edit: October 16, 2015, 03:04:03 pm by maqifrnswa »
maintains an Ubuntu PPA: https://launchpad.net/~showard314/+archive/ubuntu/bitshares [15% delegate] wallet_account_set_approval maqifrnswa true [50% delegate] wallet_account_set_approval delegate1.maqifrnswa true