Author Topic: The Future of the BTSX Market Engine...  (Read 12430 times)

0 Members and 1 Guest are viewing this topic.

Offline gordonhucn

  • Full Member
  • ***
  • Posts: 66
    • View Profile
We plan to make one last change to the market engine prior to locking it in stone for many months and changing to a much slower release cycle.

Short orders can only get filled under these conditions:

1) There is someone willing to buy BitUSD at the price feed
2) AND Your short order offers the highest interest rate
3) AND Your price limit is lower than the feed  (BTSX per USD) or you didn't specify a price limit.
4) AND You have enough collateral to provide 2x backing at the feed price (amount of USD for short sale will vary with feed price)
5) OR Your price limit is higher than the feed (BTSX per USD) and someone is willing to buy at your price limit.

Short orders are forced to cover after 30 days by taking the best offers at the time.  No fee is charged.
Short orders are forced to cover when 75% of their collateral is required to cover, leaving the short with 25% of the collateral minus a 5% fee. 
The 5% fee is assessed as a percent of the collateral left over after covering.

The maximum interest rate shorts can pay is 1000% APR
The initial collateral ratio will be 3x rather than 2x  (2x from short + 1x from long)

Interest charged will accumulate to the yield fund.

How is this better than *everything else* we have tried before it? 
1) First attempt charged a *fee* for short overlap, this fee basically bid up the spread and the amount of time a short would have to wait to cover profitably and made market makers unprofitable.
2) Second attempt (currently implemented) has shorts bid up collateral, but this provides less and less benefit to the network as prices go higher... ie: 10x collateral only provides 5% more downward protection than 5x collateral. 

How can I be sure we "have it right now"? 
1) It only makes sense that if you are borrowing USD you should be paying interest....
2) It only makes sense that if you are borrowing USD there is a fixed repayment time...
3) We are not price fixing the interest rate, it is being set at "auction" at the current price feed.
4) Time based fees encourage covering sooner rather than holding forever which improves liquidity.
5) It only makes sense that the creditors (holders of it BitUSD) be compensated for their risk at market rates.
6) BitUSD supply will rise to meet the demand of the shorts and the market activity will be more robust

It has been very tricky to figure out this market with two dimensions (price and interest) and we have been evolving toward steadily improving systems.   The great thing about this latest solution is that it realizes almost all of my original goal of interest paying BitUSD funded by the shorts.   BTS with market based interest rates..... you know those two upgrades we talked about 6 months ago that were being postponed until we tried the interest-free version.    Well in just 1 month we have learned, adapted, and deployed a system that does what I thought would take 6 months and a new DAC to implement. 

We have only had to make one compromise so far:  price feeds. 

The remaining weaknesses are: 
  1) shorts don't get to pick the price, just a limit and the rate 
  2) the price feed is slow to update and does not allow internal price discovery.
  3) the market is asymmetric (you cannot short BTSX backed by USD)
  4) you cannot short BitGLD backed by BitUSD (or any other combo)
 
We have a roadmap for addressing all of these:

1) Implementing a bond market that allows USD longs to LEND to shorts for fixed term with a bid/ask system setting the interest rate.  This will create no new BitUSD but will give shorts freedom to set their price without respect to the feed and hold for longer than 30 days.

2) Implementing a prediction market that trades on the ERROR in the price feed.  This prediction market will then allow continuous, real time, price discovery on the blockchain by continuously discovering the % delta between the price feed and real price.  It can be speculated on without losing any exposure to BTSX and with limits that can be used to halt trading on the USD/BTSX market if the feed error is too great.   The USD/BTSX market can then use FEED_PRICE * PERCENT_ERROR.   In this way delegates are only responsible for "getting close" with their feeds and a free market will continuously update the price at which shorts can execute.

These last 2 items are not critical and price feeds are likely more accurate than a thin error market.   For this reason we will not be implementing them until after BitAssets have proven themselves for 3+ months *AND* we have done a very careful test network.   Getting BitUSD right has required rapid tweaking and updates, but the rate of change is not healthy for BTSX or others and has many risks due to bugs.   So I think these last two enhancements are not high priority and we will instead focus on light weight clients, multi-sig, etc.

We are working to make BTSX and the toolkit the most robust financial platform we can with as little trust as possible in anything but the market.
+5% 30days rule makes all the difference. Exit conditions for either time or space , great !

Offline liondani

  • Hero Member
  • *****
  • Posts: 3737
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani
what about a "re-short" option for the shorters (when they enter the order from the beginning) that triggers automatically in current feed price after the auto cover take place (after the 30 days period ) ?

Sent from my ALCATEL ONE TOUCH 997D


Offline starspirit

  • Hero Member
  • *****
  • Posts: 948
  • Financial markets pro over 20 years
    • View Profile
  • BitShares: starspirit
Covers are triggered by price feed and not internal bid/ask.   Thus margin calls on the internal exchange are unable to directly effect price on external exchange.

Then feeds must update to confirm the move.  Slowing down the process. 

Worst case a margin call is triggered by the feed and there is insufficient depth.  However because the market can see the call coming and the profit is too great I suspect there will be plenty of sellers within 10% of the real price.
OK thanks, I'm comfortable now that a cascade effect is unlikely.

Offline bytemaster

Covers are triggered by price feed and not internal bid/ask.   Thus margin calls on the internal exchange are unable to directly effect price on external exchange.

Then feeds must update to confirm the move.  Slowing down the process. 

Worst case a margin call is triggered by the feed and there is insufficient depth.  However because the market can see the call coming and the profit is too great I suspect there will be plenty of sellers within 10% of the real 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 starspirit

  • Hero Member
  • *****
  • Posts: 948
  • Financial markets pro over 20 years
    • View Profile
  • BitShares: starspirit
Does the rule that shorts are forced to cover after 30 days introduce the possibility of a short squeeze? Would it be better to set a limit on their purchases at the feed price, rather than being forced to buy at whatever price is available?
Its the way cfd work they are closed at market unless you redo your position

Short squeezes are not really an issue because new shorts can cover into the squeeze at the feed price.
I agree there is always incentive for shorts to reopen or new shorts to be opened if the price gets too high. If this occurred after a big BTSX decline though, the existing shorts would need to top up collateral to cover, so they may not all be in a position to do so.
Another thought I would like to add to this, because I still feel there's a risk here. If short-covering is compressed enough in time, new shorts just may not be able to come in fast enough to prevent a temporary short squeeze and rising price premium on BitUSD. It always takes some lag for market participants to respond, as we've seen many times in the much more liquid BTC market where flash crashes have been common. There is also a similar situation where BTSX falls considerably, and a fair number of shorts are forced to cover by buying whatever is available in the market at that point. What's to stop this turning into a runaway situation where more and more covers are triggered? There might be ways to help prevent this sort of situation if its considered a risk.

Offline vikram

Is there a status update - are these short-covering rules already implemented? I noticed that the latest client versions seem to refer to this having been implemented after block 640000. If so, are we seeing the buy volume come through in the market associated with around 1/30 of the supply on average being covered each day? Or has some grandfathering been applied to exclude older shorts?

The 30 day limit is alive with old positions grandfathered in with a 1 year limit. The interest rate changes are still under development.

Offline bytemaster

Short squeezes are not really an issue because new shorts can cover into the squeeze at the feed price.
Short squeezes are huge issue. You basically require 1/30 of entire outstanding supply to be rolled over every day. Even worse - due to nature of randomness it would be clustered once in a while. Just wait and such spike are bound o happen in period when there is diminished demand for shorts.

What I mean is that a squeeze / margin call happens as a result of the feed moving, not as a result of the internal BitUSD market.   
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 starspirit

  • Hero Member
  • *****
  • Posts: 948
  • Financial markets pro over 20 years
    • View Profile
  • BitShares: starspirit
When I looked this morning, it seemed like there were shorts with a less than 30 day expiration, suggesting that it has already been implemented. I also saw some expiration dates to be around a year or so out, so some were probably grandfathered in too.
Where can you see the expiries?

Offline liondani

  • Hero Member
  • *****
  • Posts: 3737
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani
Or has some grandfathering been applied to exclude older shorts?

as bytemaster said the old shorts can keep their position for one year (shorts before the last mandatory update)

Offline lafona

  • Sr. Member
  • ****
  • Posts: 231
    • View Profile
  • BitShares: lafona
When I looked this morning, it seemed like there were shorts with a less than 30 day expiration, suggesting that it has already been implemented. I also saw some expiration dates to be around a year or so out, so some were probably grandfathered in too.
BTS Witnesses: delegate-1.lafona     Witness Thread: https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911
MUSE Witness: lafona

Offline starspirit

  • Hero Member
  • *****
  • Posts: 948
  • Financial markets pro over 20 years
    • View Profile
  • BitShares: starspirit
Is there a status update - are these short-covering rules already implemented? I noticed that the latest client versions seem to refer to this having been implemented after block 640000. If so, are we seeing the buy volume come through in the market associated with around 1/30 of the supply on average being covered each day? Or has some grandfathering been applied to exclude older shorts?

Offline starspirit

  • Hero Member
  • *****
  • Posts: 948
  • Financial markets pro over 20 years
    • View Profile
  • BitShares: starspirit
Does the rule that shorts are forced to cover after 30 days introduce the possibility of a short squeeze? Would it be better to set a limit on their purchases at the feed price, rather than being forced to buy at whatever price is available?
Its the way cfd work they are closed at market unless you redo your position

Short squeezes are not really an issue because new shorts can cover into the squeeze at the feed price.
I agree there is always incentive for shorts to reopen or new shorts to be opened if the price gets too high. If this occurred after a big BTSX decline though, the existing shorts would need to top up collateral to cover, so they may not all be in a position to do so.

Offline aaaxn

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Short squeezes are not really an issue because new shorts can cover into the squeeze at the feed price.
Short squeezes are huge issue. You basically require 1/30 of entire outstanding supply to be rolled over every day. Even worse - due to nature of randomness it would be clustered once in a while. Just wait and such spike are bound o happen in period when there is diminished demand for shorts.

Offline bytemaster

Does the rule that shorts are forced to cover after 30 days introduce the possibility of a short squeeze? Would it be better to set a limit on their purchases at the feed price, rather than being forced to buy at whatever price is available?
Its the way cfd work they are closed at market unless you redo your position

Short squeezes are not really an issue because new shorts can cover into the squeeze at the feed 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 jsidhu

  • Hero Member
  • *****
  • Posts: 1335
    • View Profile
Does the rule that shorts are forced to cover after 30 days introduce the possibility of a short squeeze? Would it be better to set a limit on their purchases at the feed price, rather than being forced to buy at whatever price is available?
Its the way cfd work they are closed at market unless you redo your position
Hired by blockchain | Developer
delegate: dev.sidhujag