Author Topic: BitAsset 2.0 Requirements & Implied Design  (Read 49535 times)

0 Members and 1 Guest are viewing this topic.

Offline merivercap

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
    • BitCash

Agreed fully. From brokers ive used to trade forex and cfds there is no initial margin when you place a trade the maintenance margin moniters margin levels and forces a market order at a level in your contract.. configurable on serverside mt4 software but each broker has its own and depends on leverage used. It worked as intended. The time eurchf flew down and below many accounts margin levels it didnt work.. brokers went out of business because they coulsnt cover customwr losses. How would we deal with the blck swan? 100% margin to be safe.

Wow.  Nice insight!    BTW what was the leverage & maintenance margin in the forex?  Isn't forex leverage like 100:1 or 200:1 sometimes?  Forex is not a volatile market so a 1% move is huge and can see why some brokers went down. 

Hmmm.. I think I actually meant 100% like you did ... a regular maintenance margin of 50% means you have 2:1.  In that case you can have half as much collateral as your exposure. I was actually looking at having the value of your position = your collateral so I guess that is 100% and no leverage. (I think when I said 50% threshold I meant having your collateral be 50% of your total .. ie. collateral + position which was a confused way of looking at it.)... anyways that would look good.  100% collateral.

BitCash - http://www.bitcash.org 
Beta: bitCash Wallet / p2p Gateway: (https://m.bitcash.org)
Beta: bitCash Trade (https://trade.bitcash.org)

Offline jsidhu

  • Hero Member
  • *****
  • Posts: 1335
    • View Profile
My assumption was you could short to yourself.  It seems to me the way to balance the market.. You either buy BitUSD directly or buy BTS and create BitUSD if it's the cheaper option and you have  collateral.  Self-shorting is an important option but if we combine it with forced settlement I can imagine a manipulator accumulate $2 mil in BTS over time.. Exchange $1.5 mil BTS for BitUSD or short to self over time...then use 500k BTS to wait for low volume and sell BTS heavily at once and force liquidation on depressed BTS feed prices...is this a possibility?
AFAIK that's what the 24h notice is good for .. so that the price feed can recover ..
Also note that anything you do in the DEX is public! .. so you should be able to iydentify market manipulation .. in contrast to centralized exchanges..
The 24h notice doesn't help against the attack. The attacker only has to delay his BTS dumping until just before the settlement.

Also, detecting market manipulation doesn't help if the attack is executed quickly and anonymously.

I agree.  I would think short term price movements can be manipulated to take advantage of this strategy even if there were a 24h notice.

I think rather than forced settlement, just use a maintenance margin. You can also eliminate the initial collateral requirement.   If we eliminate the 100% initial margin, and just say anything below 50% maintenance margin will be settled at the bid at the end of the day, I think things may work out well.  Hence anyone with above 50% maintenance margin will be safe from any kind of forced settlement.. and can re-collateralize at any time.

A very important question:

Can the shorts use the collateral to cover their orders?

the longs can directly buy BTS, but the shorts can not use their collateral even the collateral is enough.

THIS IS WHAT I FOUND ON NXT FORUM:

"
Within 9 days my position was down near 10%. I decided I would take the loss and exit the trade.

Well, in attempting to close the trade, I kept getting error messages saying I didn't have enough bitUSD to buy back what I shorted.

I thought maybe this was a bug with one of the updated versions. I went to the forums and posted my problem.

To my surprise I was told I was stuck unless I went and bought more BTS and then bought more bitUSD to cover my existing short even though I had enough BTS locked in collateral to buy near 2 times the amount of BTS I had shorted.
"
See this link: https://bitsharestalk.org/index.php/topic,13782.0/all.html
and this issue: https://github.com/BitShares/bitshares/issues/1499

I think this was because of the 30-day time-frame of the CFD so you need high enough collateral on settlement date?  This current 2.0 proposal should improve this situation. 

I think brokerage firms use an initial and maintenance margin for operational efficiency and to minimize immediate transactions when one party is on the losing end. (Any other reasons?)   We on the other hand can just use a higher maintenance margin (50%) and no initial margin, but force settle anything below 50% margin.  Hence there will already be some 'forced' liquidity for anyone below the 50% threshold, but anyone above 50% maintenance would be safe and can always re-collateralize.  For high-risk speculators, they could be happy with only 51% BTS collateral, but may be forced out of part of their positions it their position goes below 50% such that they will be back at 50% the next day.  If their positions go down again the next day, they would keep losing their collateral to re-balance at the 50% threshold.  For most people, they can maintain higher amounts of collateral and know they couldn't be forced to settle.   

Hence forced settlement manipulation strategies are largely eliminated, you get some liquidity from those short positions that fall below 50%.  (Note: I'm using 50% because it seems like a safe 1 day black swan threshold.  The potential worst one-day drawdown.  I think Bitcoin had a few 35% down days?    If we want to be more conservative we can use 60%, 75%, or even 100% maintenance margin, but the lower margin requirements create higher liquidity.  I like 50%.)

Any thoughts?
Agreed fully. From brokers ive used to trade forex and cfds there is no initial margin when you place a trade the maintenance margin moniters margin levels and forces a market order at a level in your contract.. configurable on serverside mt4 software but each broker has its own and depends on leverage used. It worked as intended. The time eurchf flew down and below many accounts margin levels it didnt work.. brokers went out of business because they coulsnt cover customwr losses. How would we deal with the blck swan? 100% margin to be safe.
Hired by blockchain | Developer
delegate: dev.sidhujag

Offline merivercap

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
    • BitCash
My assumption was you could short to yourself.  It seems to me the way to balance the market.. You either buy BitUSD directly or buy BTS and create BitUSD if it's the cheaper option and you have  collateral.  Self-shorting is an important option but if we combine it with forced settlement I can imagine a manipulator accumulate $2 mil in BTS over time.. Exchange $1.5 mil BTS for BitUSD or short to self over time...then use 500k BTS to wait for low volume and sell BTS heavily at once and force liquidation on depressed BTS feed prices...is this a possibility?
AFAIK that's what the 24h notice is good for .. so that the price feed can recover ..
Also note that anything you do in the DEX is public! .. so you should be able to identify market manipulation .. in contrast to centralized exchanges..
The 24h notice doesn't help against the attack. The attacker only has to delay his BTS dumping until just before the settlement.

Also, detecting market manipulation doesn't help if the attack is executed quickly and anonymously.

I agree.  I would think short term price movements can be manipulated to take advantage of this strategy even if there were a 24h notice.

I think rather than forced settlement, just use a maintenance margin. You can also eliminate the initial collateral requirement.   If we eliminate the 100% initial margin, and just say anything below 50% maintenance margin will be settled at the bid at the end of the day, I think things may work out well.  Hence anyone with above 50% maintenance margin will be safe from any kind of forced settlement.. and can re-collateralize at any time.

A very important question:

Can the shorts use the collateral to cover their orders?

the longs can directly buy BTS, but the shorts can not use their collateral even the collateral is enough.

THIS IS WHAT I FOUND ON NXT FORUM:

"
Within 9 days my position was down near 10%. I decided I would take the loss and exit the trade.

Well, in attempting to close the trade, I kept getting error messages saying I didn't have enough bitUSD to buy back what I shorted.

I thought maybe this was a bug with one of the updated versions. I went to the forums and posted my problem.

To my surprise I was told I was stuck unless I went and bought more BTS and then bought more bitUSD to cover my existing short even though I had enough BTS locked in collateral to buy near 2 times the amount of BTS I had shorted.
"
See this link: https://bitsharestalk.org/index.php/topic,13782.0/all.html
and this issue: https://github.com/BitShares/bitshares/issues/1499

I think this was because of the 30-day time-frame of the CFD so you need high enough collateral on settlement date?  This current 2.0 proposal should improve this situation. 

I think brokerage firms use an initial and maintenance margin for operational efficiency and to minimize immediate transactions when one party is on the losing end. (Any other reasons?)   We on the other hand can just use a higher maintenance margin (50%) and no initial margin, but force settle anything below 50% margin.  Hence there will already be some 'forced' liquidity for anyone below the 50% threshold, but anyone above 50% maintenance would be safe and can always re-collateralize.  For high-risk speculators, they could be happy with only 51% BTS collateral, but may be forced out of part of their positions it their position goes below 50% such that they will be back at 50% the next day.  If their positions go down again the next day, they would keep losing their collateral to re-balance at the 50% threshold.  For most people, they can maintain higher amounts of collateral and know they couldn't be forced to settle.   

Hence forced settlement manipulation strategies are largely eliminated, you get some liquidity from those short positions that fall below 50%.  (Note: I'm using 50% because it seems like a safe 1 day black swan threshold.  The potential worst one-day drawdown.  I think Bitcoin had a few 35% down days?    If we want to be more conservative we can use 60%, 75%, or even 100% maintenance margin, but the lower margin requirements create higher liquidity.  I like 50%.)

Any thoughts?
BitCash - http://www.bitcash.org 
Beta: bitCash Wallet / p2p Gateway: (https://m.bitcash.org)
Beta: bitCash Trade (https://trade.bitcash.org)

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
A very important question:

Can the shorts use the collateral to cover their orders?

the longs can directly buy BTS, but the shorts can not use their collateral even the collateral is enough.

THIS IS WHAT I FOUND ON NXT FORUM:

"
Within 9 days my position was down near 10%. I decided I would take the loss and exit the trade.

Well, in attempting to close the trade, I kept getting error messages saying I didn't have enough bitUSD to buy back what I shorted.

I thought maybe this was a bug with one of the updated versions. I went to the forums and posted my problem.

To my surprise I was told I was stuck unless I went and bought more BTS and then bought more bitUSD to cover my existing short even though I had enough BTS locked in collateral to buy near 2 times the amount of BTS I had shorted.
"
See this link: https://bitsharestalk.org/index.php/topic,13782.0/all.html
and this issue: https://github.com/BitShares/bitshares/issues/1499
BitShares committee member: abit
BitShares witness: in.abit

Offline xiahui135

  • Sr. Member
  • ****
  • Posts: 496
    • View Profile
A very important question:

Can the shorts use the collateral to cover their orders?

the longs can directly buy BTS, but the shorts can not use their collateral even the collateral is enough.

THIS IS WHAT I FOUND ON NXT FORUM:

"
Within 9 days my position was down near 10%. I decided I would take the loss and exit the trade.

Well, in attempting to close the trade, I kept getting error messages saying I didn't have enough bitUSD to buy back what I shorted.

I thought maybe this was a bug with one of the updated versions. I went to the forums and posted my problem.

To my surprise I was told I was stuck unless I went and bought more BTS and then bought more bitUSD to cover my existing short even though I had enough BTS locked in collateral to buy near 2 times the amount of BTS I had shorted.
"

Offline maqifrnswa

  • Hero Member
  • *****
  • Posts: 661
    • View Profile

Using programming terminology, undersupply of bitUSD is "undefined behavior" while oversupply is handled gracefully with forced calls at 99%.

If there is undersupply of bitUSD, resulting in high bitUSD prices, could this be solved by someone buying up BTS on exchanges, and then shorting bitUSD to themself?

My assumption was you could short to yourself.  It seems to me the way to balance the market.. You either buy BitUSD directly or buy BTS and create BitUSD if it's the cheaper option and you have  collateral.  Self-shorting is an important option but if we combine it with forced settlement I can imagine a manipulator accumulate $2 mil in BTS over time.. Exchange $1.5 mil BTS for BitUSD or short to self over time...then use 500k BTS to wait for low volume and sell BTS heavily at once and force liquidation on depressed BTS feed prices...is this a possibility?

You can short to yourself and buy BTS on an exchange, but all that does is place a bet that you think the BTA:BTS price will return to the feed. There is no arbitrage and thus you are not helping the market become efficient. One can just as easily bet that it will move away from the feed. Why would one strategy be preferred over the other?

The more I think about this, the more real and serious I believe this to be. Like BM said, merchants will say "3% off if you use bitUSD" to take advantage of the bitUSD:USD spread. Then the market will move as people are willing to pay a premium for bitUSD, then merchants will say "4% off if you use bitUSD." People are now willing to pay an even higher premium. And why should I short today if people are willing to pay an even higher premium tomorrow? At some point, a bitUSD isn't at all pegged to USD and becomes a rapidly deflating token. There is no end to this loop since there is no feedback pushing it back.

The system, from a supply-side economic and game theory approach:
1) MUST have a profit/arbitrage opportunity to destroy bitUSD when demand is below the feed. (BTA3.0 does this)
2) MUST have a profit/arbitrage opportunity to create bitUSD when demand exceeds the feed. (BTA3.0 does not do this)

I don't know how to do (2), just that it is needed theoretically. The converse of forced calls is forced short-sells (or at least forced sells). How do you force someone to sell? Longs should be protected, so that means you need to force sell those that are already short. Do you force the most collateralized to sell more? That doesn't make sense either
« Last Edit: May 05, 2015, 02:47:14 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

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
My assumption was you could short to yourself.  It seems to me the way to balance the market.. You either buy BitUSD directly or buy BTS and create BitUSD if it's the cheaper option and you have  collateral.  Self-shorting is an important option but if we combine it with forced settlement I can imagine a manipulator accumulate $2 mil in BTS over time.. Exchange $1.5 mil BTS for BitUSD or short to self over time...then use 500k BTS to wait for low volume and sell BTS heavily at once and force liquidation on depressed BTS feed prices...is this a possibility?
AFAIK that's what the 24h notice is good for .. so that the price feed can recover ..
Also note that anything you do in the DEX is public! .. so you should be able to identify market manipulation .. in contrast to centralized exchanges..
The 24h notice doesn't help against the attack. The attacker only has to delay his BTS dumping until just before the settlement.

Also, detecting market manipulation doesn't help if the attack is executed quickly and anonymously.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
My assumption was you could short to yourself.  It seems to me the way to balance the market.. You either buy BitUSD directly or buy BTS and create BitUSD if it's the cheaper option and you have  collateral.  Self-shorting is an important option but if we combine it with forced settlement I can imagine a manipulator accumulate $2 mil in BTS over time.. Exchange $1.5 mil BTS for BitUSD or short to self over time...then use 500k BTS to wait for low volume and sell BTS heavily at once and force liquidation on depressed BTS feed prices...is this a possibility?
AFAIK that's what the 24h notice is good for .. so that the price feed can recover ..
Also note that anything you do in the DEX is public! .. so you should be able to identify market manipulation .. in contrast to centralized exchanges..

Offline merivercap

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
    • BitCash

Using programming terminology, undersupply of bitUSD is "undefined behavior" while oversupply is handled gracefully with forced calls at 99%.

If there is undersupply of bitUSD, resulting in high bitUSD prices, could this be solved by someone buying up BTS on exchanges, and then shorting bitUSD to themself?

My assumption was you could short to yourself.  It seems to me the way to balance the market.. You either buy BitUSD directly or buy BTS and create BitUSD if it's the cheaper option and you have  collateral.  Self-shorting is an important option but if we combine it with forced settlement I can imagine a manipulator accumulate $2 mil in BTS over time.. Exchange $1.5 mil BTS for BitUSD or short to self over time...then use 500k BTS to wait for low volume and sell BTS heavily at once and force liquidation on depressed BTS feed prices...is this a possibility?
BitCash - http://www.bitcash.org 
Beta: bitCash Wallet / p2p Gateway: (https://m.bitcash.org)
Beta: bitCash Trade (https://trade.bitcash.org)

Offline cube

  • Hero Member
  • *****
  • Posts: 1404
  • Bit by bit, we will get there!
    • View Profile
  • BitShares: bitcube

  • How will the merchant get their USD within 24 hours without a regulated exchange converting bitUSD to USD?
  • How much of a hassle will this be for the merchant? They have enough to do without having to handle these conversions themselves.


Valid points raised and should be addressed.  I think Gateways/Exchanges (with its regulated licenses) would come when they can make a decent profit from a stable, reliable, liquid and secured bitasset.  In other words, it has to be worth while for people to build those gateways. 

To achieve that, bitasset 2.0 needs to perform well under ALL kind of scenarios (as raised by merivercap) - positive, negative and exception.  The negative scenario -  undersupply of bitUSD being 'undefined behavior' (as raised by maqifrnswa) needs to be addressed adequately.  So is the exception scenario - blackswan event as raised by abit.  bitasset 2.0 has to  undergo vigorous scenario testing before seeing the world.

Merchants and savers need to know that bitUSD can be converted safely to USD at ALL times.
« Last Edit: May 05, 2015, 04:27:03 am by cube »
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

Offline muse-umum

  • Hero Member
  • *****
  • Posts: 717
  • BitShares everything
    • View Profile
In this post I introduced some economic analysis: https://bitsharestalk.org/index.php/topic,16127.0.html

It has been nicely summed up by Thom.

  • Buying 1 BitUSD should always be the most cost effective means to purchase BTS
  • USD : BitUSD market price + BitUSD : BTS market price should be factored into the BTS : USD price feed
  • It is far better for price feeds to error in the favor of BitUSD holders than in the favor of shorts
  • Cashing out of BTS should be done more efficiently (for USD through other channels) than using BitUSD
  • Creating BitUSD will *should* always cost more than $1.00
  • BitUSD will initially be created by individuals who want to stay in a crypto currency but wish to have a price floor.


Two which the main critiques were:

1. An assumption that BitAssets 2.0 depends upon USD/BitUSD gateways  (false assumption)
2. I didn't say *how* to achieve all of the *shoulds*
3. I need to be laser focused and this whole discussion is a distraction and BitAssets 1.0 is "just fine".

Now I would like to respond:

BTA 2.0 approach does not depend upon USD/BitUSD gateways, it merely indicates that if there was a market between BitUSD and IOU USD that it should trade at 1.00 or greater at all times assuming the IOU was from a reliable source.    If we assume that there is an IOU USD issuer on the blockchain, that means that traders have two ways to get into BTS:  Buy BitUSD and Sell for BTS and Buy BTS directly with their USD.   Both markets would occur on the blockchain.    Given the existence of both markets and our target of making sure that BitUSD is always worth *AT LEAST* $1.00 then buying BitUSD for $1.00 should always be a win (or at least equal) if your goal is to buy BTS. 

Lets assume that the on chain IOU USD vs BTS market was very liquid and its 1hr moving average was used as the price feed.  What incentive would someone with USD have to buy BitUSD first?   

1.  They must pay IOU USD Trading Fees Either Way
2.  They must pay BitUSD trading fees *if* they go through BitUSD
3.  Going through BitUSD allows them to "buy" without slippage if they buy in large quantities
4.  They are free from counter party risk while trading.

Based upon these points the following things would result in me just buying BTS directly with USD rather than buying BitUSD first.
1.  High trading fees for BitUSD would make two hops more expensive
2.  A lag/time delay
3.  I can get more BTS via IOU USD than via BitUSD

Based upon this analysis I would do the following:

1. 0% fee for forced liquidation
2. As short as possible, I think instant forced settlement at the feed is the way to go.
3. Allow all BitUSD to be force liquidated at the feed at any time.
4. very low trading fees for BitUSD assets

What these rules would imply for the BitUSD shorts:
1. Don't sell below the feed.
2. Don't sell within the error range of the feed
3. Maintain high collateral at all times to minimize risk of being called.
4. There is an implicit "no shorting below the feed" rule.
5. Shorts may have to sell above the feed, but they also have to cover above the feed thus the position is USD neutral
6. In addition to USD price change risk, shorts also face premium change risk that could go for or against them. 

What these rules would imply for BitUSD longs:
1. To buy the first BitUSD requires you to pay to cover the shorts risks... a premium equal to the feed error / other factors
2. You can likely sell your BitUSD for a similar premium thus you are still protected from volatility and the "premium" doesn't matter to traders/hedgers.   
3. You can easily sell your BitUSD for USD at 1:1 to someone looking to buy BTS (they profit by the premium on internal market).
4. You would almost never request forced settlement because you would end up forfeiting the premium. 

What these rules would imply for the Price Feed:
1. The less error it has the lower the premium on the internal market.
2. Shorts carry 99% of the price-feed risk, shorts can be forced to cover at the feed.
3. Longs carry ~0% of the price feed risk, if the feed is manipulated too low they can just refuse to sell.

What the outside world would see:
1. BitUSD always trades for more than $1.00 worth of BTS.
2. BitUSD : IOU USD market is the most liquid / lowest spread
3. BitUSD has the lowest trading fees agains BTS
4. If I accept BitUSD as payment I know I can sell it for $1.00 (or more) worth of value.

In a bull market BitUSD is still not sold below the feed due to instant forced settlement
In a bear market the premium for creating new BitUSD goes up.

In conclusion I would like to submit that from a traders perspective BitUSD constantly trading a couple percent above USD against BTS is just as good as trading near 0% because the RELATIVE price movements are all the same.    From the perspective of merchants and everyone else you want them to know that 1 BitUSD to USD is the floor and ALWAYS a safe price to exchange at.

Stop thinking about anything else before you deliver a wallet which any HUMANBEING is able to operate. Will you?
钱包都没法正常使用的前提下就别去谈什么鸡巴规则。

Offline Globally Distributed

  • Full Member
  • ***
  • Posts: 54
    • View Profile
I wouldn't be surprised if you have the secret sauce.  If nothing else, record the secret sauce with a timestamp to prove you knew it all along once someone else comes up with it.
"People don't buy what you do, they buy why you do it."  https://www.youtube.com/watch?v=u4ZoJKF_VuA

kudos robrigo

Offline maqifrnswa

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
If there is undersupply of bitUSD, resulting in high bitUSD prices, could this be solved by someone buying up BTS on exchanges, and then shorting bitUSD to themself?
I was thinking something like that, but in the end that doesn't do anything. Although there is three legged arbitrage, that arbitrage doesn't ensure that USD=bitUSD. There still is no profit or explicit reason for shorts will converge on the feed. Absent a reason, it is undefined behavior.
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

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
tl;dr
HOW to guarantee that each bitUSD could be changed back to one-USD-worth of BTS in a black swan event, especially when there is a daily % set?

Black swan has BitUSD converted to BTS... no more guarantee.
If there is no such guarantee, it means BitUSD is NOT fully backed. When a black swan come, the last one who holds BitUSD will be unable to convert to BTS, because there would be no cover order exists on the market. On other words, in this case one BitUSD doesn't worth one USD. It doesn't make sense to set a hard-coded price floor.
BitShares committee member: abit
BitShares witness: in.abit

Offline Ander

  • Hero Member
  • *****
  • Posts: 3506
    • View Profile
  • BitShares: Ander

Using programming terminology, undersupply of bitUSD is "undefined behavior" while oversupply is handled gracefully with forced calls at 99%.

If there is undersupply of bitUSD, resulting in high bitUSD prices, could this be solved by someone buying up BTS on exchanges, and then shorting bitUSD to themself?
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads