Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
margin call price is 150%, not 200% #1273
Comments
nmushegian
added this to the
0.6.0 milestone
Jan 19, 2015
vikramrajkumar
added
the
theoreticalbts
label
Jan 19, 2015
vikramrajkumar
assigned
theoreticalbts
Jan 19, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
vikramrajkumar
Jan 19, 2015
Member
@theoreticalbts Can you also confirm whether the 300% collateral claim is true, or whether it is actually 200%?
|
@theoreticalbts Can you also confirm whether the 300% collateral claim is true, or whether it is actually 200%? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
theoreticalbts
Jan 19, 2015
Contributor
300% collateral is currently implemented.
I think the intent was always to make margin calls happen when the short side lost 1/2 of their capital, which occurs at 150% when the initial capital is 200% (as it was before the change to 300% / 30 days).
|
300% collateral is currently implemented. I think the intent was always to make margin calls happen when the short side lost 1/2 of their capital, which occurs at 150% when the initial capital is 200% (as it was before the change to 300% / 30 days). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
nmushegian
Jan 19, 2015
Contributor
I think the intent now is to make 200% the call price since that is what is being advertised
|
I think the intent now is to make 200% the call price since that is what is being advertised |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
theoreticalbts
Jan 19, 2015
Contributor
NB, if we implement this, we'll have to grandfather existing shorts into their current margin call prices. We don't want to be in the business of changing the terms of financial derivative instruments after people have already bought them.
We have to also consider partial covering.
|
NB, if we implement this, we'll have to grandfather existing shorts into their current margin call prices. We don't want to be in the business of changing the terms of financial derivative instruments after people have already bought them. We have to also consider partial covering. |
vikramrajkumar
modified the milestones:
0.7.0,
0.6.0
Jan 19, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
nmushegian
Jan 19, 2015
Contributor
Yes, only apply this for future shorts. I don't see why we have to consider partial covers if we do that.
|
Yes, only apply this for future shorts. I don't see why we have to consider partial covers if we do that. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
bytemaster
Jan 20, 2015
Contributor
Someone changed this back. I remember very clearly using *3 /4 as the multiple in prior versions.
|
Someone changed this back. I remember very clearly using *3 /4 as the multiple in prior versions. |
added a commit
that referenced
this issue
Jan 20, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment|
cough c7d7257 cough |
vikramrajkumar
closed this
Jan 22, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
vikramrajkumar
Jan 27, 2015
Member
Why was this returned back to 3/4 from 2/3 yet again: 211c5e1#diff-aa03531d90e90a2437e8cba9b668e0ccR400
|
Why was this returned back to 3/4 from 2/3 yet again: 211c5e1#diff-aa03531d90e90a2437e8cba9b668e0ccR400 |
vikramrajkumar
reopened this
Jan 27, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment|
It wasn't changed back to 2/3... it still reads 3/4. |
bytemaster
closed this
Jan 27, 2015
theoreticalbts
reopened this
Jan 28, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
theoreticalbts
Jan 28, 2015
Contributor
Yeah, turns out these are both wrong. Suppose you're shorting 100K BTS combined with 50K BTS going long at $0.02 / BTS, the debt is $1000 and the collateral is 150K BTS. The debt's BTS value at price p (where P is dollars per BTS, i.e. $0.02 / BTS) would be debt_value(p) = debt / p. Then 300% initial collateralization can be expressed as:
collateral = 3 * debt_value(initial_price)
If margin call happens at 200% collateralization level, you have
collateral = 2 * debt_value(call_price)
which simplifies to collateral = 2 * debt / call_price, solving for call_price gives
call_price = 2 * debt / collateral
In general when we have collateralization level of L percent, we have
collateral = (L/100) * debt_value(call_price)
-> call_price = (L/100) * debt / collateral
= (debt / collateral) / (100/L)
= (debt / (k * collateral)) where k = 100/L
Defining call_collateral = collateral * k, we have call_price = debt / call_collateral which is what's actually implemented in the code:
call_collateral.amount *= <something>;
call_collateral.amount /= <something else>;
something / something else should be k, for L = 200% we have k = 1/2.
|
Yeah, turns out these are both wrong. Suppose you're shorting 100K BTS combined with 50K BTS going long at $0.02 / BTS, the debt is $1000 and the collateral is 150K BTS. The debt's BTS value at price
If margin call happens at 200% collateralization level, you have
which simplifies to
In general when we have collateralization level of
Defining
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
theoreticalbts
Jan 28, 2015
Contributor
So k is simply the debt-to-collateral ratio at margin call. k = 1/2 is desired (debt is 1/2 collateral).
I will call this BTS_BLOCKCHAIN_MCALL_D2C_NUMERATOR / BTS_BLOCKCHAIN_MCALL_D2C_DENOMINATOR
|
So I will call this |
added a commit
that referenced
this issue
Jan 28, 2015
theoreticalbts
referenced this issue
Feb 5, 2015
Closed
Shorts below the price feed are mind-bending and possibly wrong #1354
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
theoreticalbts
Apr 7, 2015
Contributor
Ran through the numbers with current order book, this is definitely fixed. Probably by 5fcfef1
|
Ran through the numbers with current order book, this is definitely fixed. Probably by 5fcfef1 |
theoreticalbts
closed this
Apr 7, 2015
vikramrajkumar
modified the milestones:
dvs/0.10.0,
dvs/0.9.0
Apr 8, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
abitmore
May 7, 2015
Owner
To be simple, if one shorts 100K BTS combined with 50K BTS going long at $0.02 / BTS, how much should the call price be? It's $0.01 in bts/0.8.x or earlier, but $0.013 in bts/0.9.0 and bts/0.9.1
|
To be simple, if one shorts 100K BTS combined with 50K BTS going long at $0.02 / BTS, how much should the call price be? It's $0.01 in bts/0.8.x or earlier, but $0.013 in bts/0.9.0 and bts/0.9.1 |
nmushegian commentedJan 19, 2015
https://bitsharestalk.org/index.php?topic=13453.0;topicseen