Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: The Future of the BTSX Market Engine...  (Read 2583 times)

0 Members and 1 Guest are viewing this topic.

Offline bytemaster

The Future of the BTSX Market Engine...
« on: October 02, 2014, 04:40:45 PM »

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.
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 Xeldal

Re: The Future of the BTSX Market Engine...
« Reply #1 on: October 02, 2014, 04:48:39 PM »
 +5% This is fantastic! Great work!  +5%

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12177
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: The Future of the BTSX Market Engine...
« Reply #2 on: October 02, 2014, 04:55:13 PM »
very detail, much rules, .. aehm .. screw it ... nicely written .. we should copy&pasta this into the wiki ..
I will be offline for the weekend so maybe some else can handly it ..

It's exciting to see babies grow!
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline GaltReport

Re: The Future of the BTSX Market Engine...
« Reply #3 on: October 02, 2014, 04:57:22 PM »
We plan to make one last change to the market engine prior to locking it in stone for many months ...

Glad to hear this.  i think we are near (past?) the point of diminishing returns with respect to the time spent on this for the return.  Maybe that will free up more time to focus on marketing, partnering and networking to facilitate further BitSharesX/BitUSD utility in all the ways discussed. 

Edit: I have this re-occurring nightmare that someone else is going to come along with less tech but better marketing/partnering and eat our lunch. :(
« Last Edit: October 02, 2014, 05:01:43 PM by GaltReport »

Offline Method-X

  • Hero Member
  • *****
  • Posts: 1120
  • VIRAL
    • View Profile
    • Learn to code
  • BTS: methodx
Re: The Future of the BTSX Market Engine...
« Reply #4 on: October 02, 2014, 05:03:14 PM »
It's definitely a good idea to finalize this as soon as possible and focus on BitUSD adoption. The PEG is tracking very well for all assets and is therefore ready to be marketed.

Offline nomoreheroes7

Re: The Future of the BTSX Market Engine...
« Reply #5 on: October 02, 2014, 05:27:45 PM »
Are we at the point of a stable client then? Or are people still experiencing instability?

I'm curious just how close to the true marketing push we really are...

Offline Rune

  • Hero Member
  • *****
  • Posts: 1120
    • View Profile
Re: The Future of the BTSX Market Engine...
« Reply #6 on: October 02, 2014, 05:51:58 PM »
IMO interest rates are the only economically efficient way to allocate loans.

Perhaps later several bitUSD assets can be created with different collateral requirements. Assets with lower collateral levels could be created to cater to those who wish to speculate in higher interest rates paid by shorts and are willing to assume the higher risk, and could be called bitUSD_interest. Standard BitUSD could then be geared towards being used primarily for spending by normal people, where as the other assets can be differentiated towards the different customers/investors/speculators needs, instead of the current system of a single "catch all" asset that is difficult to determine if it has an appropriate collateral level.

Offline Agent86

  • Sr. Member
  • ****
  • Posts: 471
  • BTSX: agent86
    • View Profile
Re: The Future of the BTSX Market Engine...
« Reply #7 on: October 02, 2014, 06:05:15 PM »
I'm sure some people are tired of debating these things and I agree that things like multi-sig (also offline transaction signing, cold storage, non-TITAN functionality) are more important than market tweaks as long as the market works good enough for now.

Here is my take on changes:

-If we switch to 30 day required covering and this 30 day timeframe is deemed important/needed, I really hope we don't grandfather current shorts more than a couple months if at all; the health and liquidity of the whole system is more important than some individuals' desire to keep their leveraged position... everyone else shouldn't have to wait a year to see what the end result looks like.

The initial collateral ratio will be 3x rather than 2x  (2x from short + 1x from long)
Why is this the right amount of collateral?
10x collateral only provides 5% more downward protection than 5x collateral. 
I'm not sure I follow this.
remaining weaknesses are:  ...
  3) the market is asymmetric (you cannot short BTSX backed by USD)
  4) you cannot short BitGLD backed by BitUSD (or any other combo)
I don't understand the need for these things.
We have a roadmap for addressing ...
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.
I don't see the need; the central market already accomplishes this in and of itself.  As it is right now, smart traders will make their trades based on the real exchange rate, not the feed as long as they expect the feed to track toward the right answer over the long run.  If the feed is wrong you shouldn't overpay and buy expensive bitUSD.  By the same token if the feed is wrong in the other direction you shouldn't sell bitUSD cheap because you know the feed will eventually correct and the market will eventually correct and 1 bitUSD will equal $1 in the long run so if the market is inefficient that is a profit opportunity.

Overall I'm not getting this and I still prefer priority by collateral, and using a bond market to manage interest rates.



Offline Empirical1.1

  • Hero Member
  • *****
  • Posts: 886
    • View Profile
Re: The Future of the BTSX Market Engine...
« Reply #8 on: October 02, 2014, 06:23:48 PM »
+5% This is fantastic! Great work!  +5%

 +5% I think the plan is great.

Obviously it 'price fixes' collateral, but I'm fine with that.

Offline Fox

Re: The Future of the BTSX Market Engine...
« Reply #9 on: October 02, 2014, 06:40:55 PM »
Congratulations go out to the development team on their successful implementation of the market peg.

I very much look forward to the multi-sig feature enhancement and additional marketing.
Witness: fox

Offline bytemaster

Re: The Future of the BTSX Market Engine...
« Reply #10 on: October 02, 2014, 07:19:19 PM »
I'm sure some people are tired of debating these things and I agree that things like multi-sig (also offline transaction signing, cold storage, non-TITAN functionality) are more important than market tweaks as long as the market works good enough for now.

Here is my take on changes:

-If we switch to 30 day required covering and this 30 day timeframe is deemed important/needed, I really hope we don't grandfather current shorts more than a couple months if at all; the health and liquidity of the whole system is more important than some individuals' desire to keep their leveraged position... everyone else shouldn't have to wait a year to see what the end result looks like.

The initial collateral ratio will be 3x rather than 2x  (2x from short + 1x from long)
Why is this the right amount of collateral?

I have addressed this in other places... there is no clear way to know the right collateral level and competing for shorts based on collateral doesn't actually establish a market rate for collateral is just causes the network to buy as much collateral as possible given the short vs USD demand.  IE: it maximizes collateral. 

10x collateral only provides 5% more downward protection than 5x collateral. 
I'm not sure I follow this.
If you have 2x collateral, it protects you against an 50% black swan.   Cost 100%    Gain 100%     Ratio  1
If you have 3x collateral, it protects you against an 66% black swan.   Cost +50%    Gain +32%    Ratio  .64
If you have 4x collateral, it protects you against an 75% black swan.   Cost +33%    Gain +13%    Ratio  .39
If you have 5x collateral, it protects you against an 80% black swan.   Cost +25%    Gain +6%      Ratio  .24
If you have 6x collateral, it protects you against an 83% black swan.        ...
If you have 7x collateral, it protects you against an 86% black swan.
If you have 8x collateral, it protects you against an 87.5% black swan.
If you have 9x collateral, it protects you against an 88.9% black swan.
If you have 10x collateral, it protects you against an 90% black swan

You can see that the benefit/cost of adding collateral decreases exponentially which means that all collateral levels approach the same value to the network.   The probability of a black swan is on a bell curve which plots the probability of each black swan happening at different levels decaying at an even faster rate than the linear model this cost benefit analysis assumes.   I figure a black swan will either be 100% or nothing close to 50 or 66%.   Even a 66% fall isn't fatal to BitUSD... given its interest rate. 

So we would be pouring money into collateral that could be poured into marketing incentive of interest.  It is clear to me which will increase BTSX value faster.


remaining weaknesses are:  ...
  3) the market is asymmetric (you cannot short BTSX backed by USD)
  4) you cannot short BitGLD backed by BitUSD (or any other combo)
I don't understand the need for these things.
We have a roadmap for addressing ...
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.
I don't see the need; the central market already accomplishes this in and of itself.  As it is right now, smart traders will make their trades based on the real exchange rate, not the feed as long as they expect the feed to track toward the right answer over the long run.  If the feed is wrong you shouldn't overpay and buy expensive bitUSD.  By the same token if the feed is wrong in the other direction you shouldn't sell bitUSD cheap because you know the feed will eventually correct and the market will eventually correct and 1 bitUSD will equal $1 in the long run so if the market is inefficient that is a profit opportunity.

Overall I'm not getting this and I still prefer priority by collateral, and using a bond market to manage interest rates.

I agree that the error market may not ever be necessary given external price discovery processes. 
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: 3309
    • View Profile
Re: The Future of the BTSX Market Engine...
« Reply #11 on: October 02, 2014, 07:24:04 PM »
As I already said - I am pretty surprised* by the fact how much I  like this new proposal. 
I like it a lot and I like it for more than one reason...+5%



Several points/questions (when you find the time BM):

-How the  interest   works?
The short sets the interest at say  I = 10% annually, if it closes, say 7 days after opening the position, the system collects   Int=  7 / 365 * I * price at close * #ButUSD  and does this from the collateral? If not how do you do it ?

-When we have the interest in place, the need to re-short is somewhat diminished. The only definite advantage, in my view, is to force the loosing short position to be re-collateralized (aka keeping the overall collateralization at high level). In this regard maybe only do the 30 day  force-close, just for short positions below 300% collateral?
Forcing everybody to close will probably make everybody reevaluate more often and maybe provide more regular input on the current market conditions (including interest rates), which might be good by itself. I do not know...



*[In General I do believe that anything other then 2x collateral put one side of the trade in disadvantage, but this is just theoretical  understanding on my part; in practice I find this insignificant regarding this proposal in the medium and medium-long term]



« Last Edit: October 02, 2014, 07:33:14 PM by tonyk »
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline bytemaster

Re: The Future of the BTSX Market Engine...
« Reply #12 on: October 02, 2014, 07:33:08 PM »
As I already said - I am pretty surprised by the fact how much I  like this new proposal. 
I like it a lot and I like it for more than one reason...+5%



Several points/questions (when you find the time BM):

-How the  interest   works?
The short sets the interest at say  I = 10% annually, if it closes, say 7 days after opening the position, the system collects   Int=  7 / 365 * I * price at close * #ButUSD  and does this from the collateral? If not how do you do it ?

-When we have the interest in place, the need to re-short is somewhat diminished. The only definite advantage, in my view, is to force the loosing short position to be re-collateralized (aka keeping the overall collateralization at high level). In this regard maybe only do the 30 day  force-close, just for short positions below 300% collateral?
Forcing everybody to close will probably make everybody reevaluate more often and maybe provide more regular input on the current market conditions (including interest rates), which might be good by itself. I do not know...

The purpose of the forced cover period is to provide USD liquidity when the demand for USD falls but the demand for shorts doesn't.   

The interest works as so:

If you are paying 10% per month interest... and you are short $100 then you will owe $110 USD to reclaim your collateral after 30 days.
If after 15 days you wish to reclaim your collateral you will owe $105
If on day 15 you partially cover by paying $50 then the network will charge you $2.50 in interest and your balance will be $52.50 and on day 30 you will pay $52.50 + $5.25 to close your position either manually or by automatic margin call. 


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 Agent86

  • Sr. Member
  • ****
  • Posts: 471
  • BTSX: agent86
    • View Profile
Re: The Future of the BTSX Market Engine...
« Reply #13 on: October 02, 2014, 07:57:48 PM »
10x collateral only provides 5% more downward protection than 5x collateral. 
I'm not sure I follow this.
If you have 2x collateral, it protects you against an 50% black swan.   Cost 100%    Gain 100%     Ratio  1
If you have 3x collateral, it protects you against an 66% black swan.   Cost +50%    Gain +32%    Ratio  .64
If you have 4x collateral, it protects you against an 75% black swan.   Cost +33%    Gain +13%    Ratio  .39
If you have 5x collateral, it protects you against an 80% black swan.   Cost +25%    Gain +6%      Ratio  .24
If you have 6x collateral, it protects you against an 83% black swan.        ...
If you have 7x collateral, it protects you against an 86% black swan.
If you have 8x collateral, it protects you against an 87.5% black swan.
If you have 9x collateral, it protects you against an 88.9% black swan.
If you have 10x collateral, it protects you against an 90% black swan

You can see that the benefit/cost of adding collateral decreases exponentially which means that all collateral levels approach the same value to the network.   The probability of a black swan is on a bell curve which plots the probability of each black swan happening at different levels decaying at an even faster rate than the linear model this cost benefit analysis assumes.   I figure a black swan will either be 100% or nothing close to 50 or 66%.   Even a 66% fall isn't fatal to BitUSD... given its interest rate. 

So we would be pouring money into collateral that could be poured into marketing incentive of interest.  It is clear to me which will increase BTSX value faster.


This is honestly just bad math or a misleading way of wording things.

i.e. if you invested after a 90% drop/correction and then the market cap lost half it's value from there, you experienced a 50% loss.  Describing this as "just a 5% drop" (by using the all time high as a baseline) is silly and misleading.

Offline bytemaster

Re: The Future of the BTSX Market Engine...
« Reply #14 on: October 02, 2014, 08:07:50 PM »
10x collateral only provides 5% more downward protection than 5x collateral. 
I'm not sure I follow this.
If you have 2x collateral, it protects you against an 50% black swan.   Cost 100%    Gain 100%     Ratio  1
If you have 3x collateral, it protects you against an 66% black swan.   Cost +50%    Gain +32%    Ratio  .64
If you have 4x collateral, it protects you against an 75% black swan.   Cost +33%    Gain +13%    Ratio  .39
If you have 5x collateral, it protects you against an 80% black swan.   Cost +25%    Gain +6%      Ratio  .24
If you have 6x collateral, it protects you against an 83% black swan.        ...
If you have 7x collateral, it protects you against an 86% black swan.
If you have 8x collateral, it protects you against an 87.5% black swan.
If you have 9x collateral, it protects you against an 88.9% black swan.
If you have 10x collateral, it protects you against an 90% black swan

You can see that the benefit/cost of adding collateral decreases exponentially which means that all collateral levels approach the same value to the network.   The probability of a black swan is on a bell curve which plots the probability of each black swan happening at different levels decaying at an even faster rate than the linear model this cost benefit analysis assumes.   I figure a black swan will either be 100% or nothing close to 50 or 66%.   Even a 66% fall isn't fatal to BitUSD... given its interest rate. 

So we would be pouring money into collateral that could be poured into marketing incentive of interest.  It is clear to me which will increase BTSX value faster.


This is honestly just bad math or a misleading way of wording things.

i.e. if you invested after a 90% drop/correction and then the market cap lost half it's value from there, you experienced a 50% loss.  Describing this as "just a 5% drop" (by using the all time high as a baseline) is silly and misleading.

From the perspective of "before the event" to "after the event" as a single event I am not being misleading.    The what is the probability of a fall from "current prices" to "the level required to wipe out collateral".     Are you saying that the probability of falling an extra 5% from the top is equal to the probability of falling 50% from any 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.

 

Google+