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

0 Members and 1 Guest are viewing this topic.

Offline liondani

  • Hero Member
  • *****
  • Posts: 3737
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani

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 decided for 3x collateral that means protection against a 66% black swan...
Is the remaining 34% not a serious possibility/threat? (is it not because it's only theoretical?)
Would we be not more comfortable with a 5x collateral and a 80% "protection"?
And maybe we could even "promote" somehow the 5x collateral with the help of our  +5% meme
and maybe even with a 5% default yearly interest rate that increase depended on the willingness of the shorters(?)....

imagine the number 5 rules (from a marketing view of point)    5x collateral, 5% interest ,  +5% our meme....

Maybe I am totally wrong with my thoughts, I suck on economics after all....
BUT I suggest you before implementing the 3x collateral to make a simple typical poll thread where you ask the community what they want....

for example:

How much collateral do you thing is needed to implement on the exchange market?

1. 2x
2. 3x
3. 4x
4. 5x
5. 6x
6. 7x
7. Let the shorter choose the collateral ratio
8. I don't know 
9. Iet the dev's decide, I trust them.

I thing even the competitors will not blame you in future for that decision when it was taken by community consensus...
We could use it as marketing wapon, that the community makes many critical decisions together etc....


PS after all I really believe we will have the same result or at least very close to your initial proposal.... or a better one (?) (from agent86 maybe?)
« Last Edit: October 02, 2014, 09:01:41 pm by liondani »

Offline bytemaster

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. 

There's something amiss with these numbers.  We need to track interest and principal separately, because interest dollars don't generate income, but principal dollars do.

- $100 initial principal generates $5 in interest over the first 15 days.
- $52.50 is used to pay down $50 in principal and $2.50 in interest at 15 days.
- $50 remaining principal has $2.50 interest remaining, and generates $2.50 in interest over the second 15 days.
- The balance at one month is now $50 principal plus $5.00 interest.
- The total interest paid should be $2.50 after 15 days, plus $5.00 after one month.

Your algorithm makes the partial cover operation cause interest dollars to start generating income, and that's why it charges greater interest [1] [2].  In other words, the interest doesn't compound if you let it sit, but a partial cover (in your algorithm) would be "manual compounding".

We don't want this, because it would dis-incentivize partial covering.  (Partial covering is desirable from a policy standpoint because it improves the collateral ratio and makes BitUSD more solid.)

[1] I think you meant $52.50 + $2.625 on the last day, otherwise you'd be double counting somewhere and charging a total of $10.25!

[2] Even if we go with $2.50 + $2.625 on the last day, we get $7.625 in interest with your algorithm.  The $0.125 is 5% of the $2.50 remaining interest after 15 days.

I am aware the issue and know that it does cost extra for partial covering.   You end up paying interest on your interest.... result: partial covering has fees associated with it that are magnified by the insane interest rate used in the example. 

The challenge is calculating the result without adding yet another data field to every order... to track the start date and end date. 

I suppose I might as well store extra data rather than using a crude approximation. 
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 theoretical

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. 

There's something amiss with these numbers.  We need to track interest and principal separately, because interest dollars don't generate income, but principal dollars do.

- $100 initial principal generates $5 in interest over the first 15 days.
- $52.50 is used to pay down $50 in principal and $2.50 in interest at 15 days.
- $50 remaining principal has $2.50 interest remaining, and generates $2.50 in interest over the second 15 days.
- The balance at one month is now $50 principal plus $5.00 interest.
- The total interest paid should be $2.50 after 15 days, plus $5.00 after one month.

Your algorithm makes the partial cover operation cause interest dollars to start generating income, and that's why it charges greater interest [1] [2].  In other words, the interest doesn't compound if you let it sit, but a partial cover (in your algorithm) would be "manual compounding".

We don't want this, because it would dis-incentivize partial covering.  (Partial covering is desirable from a policy standpoint because it improves the collateral ratio and makes BitUSD more solid.)

[1] I think you meant $52.50 + $2.625 on the last day, otherwise you'd be double counting somewhere and charging a total of $10.25!

[2] Even if we go with $2.50 + $2.625 on the last day, we get $7.625 in interest with your algorithm.  The $0.125 is 5% of the $2.50 remaining interest after 15 days.
BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline Agent86

  • Sr. Member
  • ****
  • Posts: 471
  • BTSX: agent86
    • View Profile
10x collateral only provides 5% more downward protection than 5x collateral. 
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?
Yes, the probability that the original price drops 5% (happens all the time due to volatility) is much more likely than the probability of a full 95% drop occurring assuming it already dropped 90% because this is in actuality a 50% price difference.

10x collateral is twice the collateral of 5x collateral.  It is much more accurate to say that this offers twice the protection than to say that this offers "5% more protection."

Offline bytemaster

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.

Offline Agent86

  • Sr. Member
  • ****
  • Posts: 471
  • BTSX: agent86
    • View Profile
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

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 tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
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

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 Fox

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 Empirical1.1

  • Hero Member
  • *****
  • Posts: 886
    • View Profile
+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 Agent86

  • Sr. Member
  • ****
  • Posts: 471
  • BTSX: agent86
    • View Profile
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 Rune

  • Hero Member
  • *****
  • Posts: 1120
    • View Profile
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 nomoreheroes7

  • Hero Member
  • *****
  • Posts: 756
  • King of all the land
    • View Profile
  • BitShares: nomoreheroes7
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 Method-X

  • Hero Member
  • *****
  • Posts: 1131
  • VIRAL
    • View Profile
    • Learn to code
  • BitShares: methodx
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.