BitShares Forum

Main => Technical Support => Topic started by: Shentist on January 21, 2016, 09:18:57 pm

Title: Discussion of a CFD market on Bitshares
Post by: Shentist on January 21, 2016, 09:18:57 pm
i am thinking that we should create something like a CFD

how can we do it?

we need a assetclass who can be force settled from both sides.
a margin call should also be done on the feed price

with this both changes i think we can create a asset class which we can copy CFD and Forex markets much easier.

what do you think?
Title: Re: can we create this asset class?
Post by: bytemaster on January 21, 2016, 09:20:55 pm
We can *do* anything you can fully define.   Define the details of how it would work fully and then we can explore costs.
Title: Re: can we create this asset class?
Post by: Shentist on January 21, 2016, 09:22:20 pm
We can *do* anything you can fully define.   Define the details of how it would work fully and then we can explore costs.

alright :D
Title: Re: Discussion of a CFD market on Bitshares
Post by: Shentist on January 22, 2016, 08:16:16 pm
Here is the Contract for Difference proposal idea, and i would like and discuss it and we need an estimation how much it will cost to implement this market.

I think with this kind of market, we will be more attractive to any trader in the cryptospace, because with this feature leveraged trading will be done really easy.

Lets talk :D

Party A wants to short 1 BTC against BTS
Party B wants to go long 1 BTC against BTS

They are matched on the CFD market on the Feedprice of 130.000 BTS
Both parties have to provide 50% of the needed collaterized asset or 65.000 BTS

Both parties have the right to settle anytime on the feedprice with a x% difference here 1%
the execution will cost a percentage fee paid to the CFD market owner (issuer)

In the beginning both parties have the same amount of collateral. Now the price of BTS is rising against BTC and you need 120.000 BTS in exchange for 1 BTC. So Party As contract is now worth 75.000 BTS if he settles and Party B got down to 55.000 BTS. This will go on so long as both parties have enough collateral and no one settles.

Party B wants now to settle because the risk is to high and instantly the least collaterized Party B holder is get settled with a win.

The difference ot a normal CFD is that you trade against a real counterparty and you can get forced to settle your tradingposition if you have the least collaterized position in the market.

To disuss:

1. Is it good to settle anytime or do we give something like. For the first 10 days you can not forced out of your position?
2. Parameters we can use and change:



Title: Re: Discussion of a CFD market on Bitshares
Post by: bitmeat on January 23, 2016, 02:02:12 am
It would be nice to have market orders. where it always settles at the feed price.

So you may have more pending buyers or more pending sellers, depending on demand / supply. But it would make it fair for someone who wants to move bigger amounts.

Say someone wants to buy 1M BitUSD, they could put in their order and wait for it to fill at reasonable prices, even if it takes days/weeks, instead of spiking the low liquidity in one go.
Title: Re: Discussion of a CFD market on Bitshares
Post by: tonyk on January 23, 2016, 02:17:57 am
I did not get who this guy [called 'issuer' in the OP] is?
Title: Re: Discussion of a CFD market on Bitshares
Post by: Bitcoinfan on January 23, 2016, 03:56:37 am
Its not clear to me why ayone would want to use a CDF because the other side does not know how to assess whether or not the other party will settle or not.  Since they can't evaluate, traders will avoid it entirely.  There is always a fear of losing your position + more.  CDF's were only invented because there was no such thing as a stable asset.  But now we have that because of cypto, athough I'm convinced the way bitshares is implementing it will not work.  There is always a fear with putting up collateral, which is an obstruction to a frictionless transaction. 

Not to derail your post, but I have figured out a way to create true stablecoin without needing ANY COLLATERAL.  Its done using the LMSR structure that Augur and Bitcoin Hivemind are using for their Prediction Markets.  The only difference is that its a TRUE non-settling prediction market (something Bytemaster could not deliver on when he first created Bitshares).  Its effectively a LMSR that never ever has a maturity date and continues constantly. 

I think this is a better idea than doing a CDF, and will help Bitshares in creating a true stablecoin, where both sides of the bet have symmetric risk profiles.  You might be interested in this.  Take a look.  I think Bitshares should take advantage of this.   

http://forum.truthcoin.info/index.php/topic,206.msg1075.html#msg1075

Title: Re: Discussion of a CFD market on Bitshares
Post by: Shentist on January 23, 2016, 06:48:48 am
It would be nice to have market orders. where it always settles at the feed price.

So you may have more pending buyers or more pending sellers, depending on demand / supply. But it would make it fair for someone who wants to move bigger amounts.

Say someone wants to buy 1M BitUSD, they could put in their order and wait for it to fill at reasonable prices, even if it takes days/weeks, instead of spiking the low liquidity in one go.

in this proposal all market operations are done on the feedprice (buy and sell) and the settleprice x% near the feedprice.

if you are in a contract, you can only end the contract with settlement. So it is possible that you have more shorters then sellers, for this reason we need people to take care of this market (market maker)

I did not get who this guy [called 'issuer' in the OP] is?

i assumed a market can create from anyone like you or me. We could charge a fee for executed contracts and for this reason want as much liquidity on our market as possible (share the fees like metaexchange or openledger, or this not yet implemented feature for given liquidity provider some tokens).

Its not clear to me why ayone would want to use a CDF because the other side does not know how to assess whether or not the other party will settle or not.  Since they can't evaluate, traders will avoid it entirely.  There is always a fear of losing your position + more.  CDF's were only invented because there was no such thing as a stable asset.  But now we have that because of cypto, athough I'm convinced the way bitshares is implementing it will not work.  There is always a fear with putting up collateral, which is an obstruction to a frictionless transaction. 

Not to derail your post, but I have figured out a way to create true stablecoin without needing ANY COLLATERAL.  Its done using the LMSR structure that Augur and Bitcoin Hivemind are using for their Prediction Markets.  The only difference is that its a TRUE non-settling prediction market (something Bytemaster could not deliver on when he first created Bitshares).  Its effectively a LMSR that never ever has a maturity date and continues constantly. 

I think this is a better idea than doing a CDF, and will help Bitshares in creating a true stablecoin, where both sides of the bet have symmetric risk profiles.  You might be interested in this.  Take a look.  I think Bitshares should take advantage of this.   

http://forum.truthcoin.info/index.php/topic,206.msg1075.html#msg1075


i tried to read into the paper, but to me it is not clear how these "stablecoins" are created. the original paper talks a lot about "bundled" trading. For me this is to much that a human can handle it, so i am looking for simple solutions for some problems.

With this proposal we could create a new kind of contract and i am sure it could be used for new ideas as well.

Title: Re: Discussion of a CFD market on Bitshares
Post by: xeroc on January 23, 2016, 11:32:17 am
If you can follow the formal requirements of BSIPs (https://github.com/bitshares/bsips/blob/master/BSIPs-Template.md) I can can certainly add this to the other BSIPs to increase a little exposure and discussion! Go for it!
Title: Re: Discussion of a CFD market on Bitshares
Post by: tonyk on January 23, 2016, 12:06:59 pm
Its not clear to me why ayone would want to use a CDF because the other side does not know how to assess whether or not the other party will settle or not.  Since they can't evaluate, traders will avoid it entirely.  There is always a fear of losing your position + more.  CDF's were only invented because there was no such thing as a stable asset.  But now we have that because of cypto, athough I'm convinced the way bitshares is implementing it will not work.  There is always a fear with putting up collateral, which is an obstruction to a frictionless transaction. 

Not to derail your post, but I have figured out a way to create true stablecoin without needing ANY COLLATERAL.  Its done using the LMSR structure that Augur and Bitcoin Hivemind are using for their Prediction Markets.  The only difference is that its a TRUE non-settling prediction market (something Bytemaster could not deliver on when he first created Bitshares).  Its effectively a LMSR that never ever has a maturity date and continues constantly. 

I think this is a better idea than doing a CDF, and will help Bitshares in creating a true stablecoin, where both sides of the bet have symmetric risk profiles.  You might be interested in this.  Take a look.  I think Bitshares should take advantage of this.   

http://forum.truthcoin.info/index.php/topic,206.msg1075.html#msg1075

1.So you have never heard of contracts that can be 'settled' before expiration? Or do you believe no trades in them exist, as it is? I will not go that far and ask about knowledge of mathematically correct ways to determine if and when to do such settlements?

2. While I have my thoughts on if this is gonna actually work (or work better), I want to ask a simple question first.
Why do you believe it cannot be done in bitshares? What is wrong with the feed price being your reference price and forcing trades within 0.5% of that price during your 'freeze window'/ locking period?

PS
and most importantly - there is no difference as it is now between having a collateral in your short position and buying a contract called ' short 1 USD' ... for the particularly scared of having a collateral all is needed is a GUI hiding the collateral from view and displaying  'short 1 USD' - N # contracts instead, and someplace else - remaining margin on your account X.
Title: Re: Discussion of a CFD market on Bitshares
Post by: Bitcoinfan on January 23, 2016, 10:39:18 pm
1.So you have never heard of contracts that can be 'settled' before expiration? Or do you believe no trades in them exist, as it is? I will not go that far and ask about knowledge of mathematically correct ways to determine if and when to do such settlements?

Sorry but Hivemind and Augur's Prediction Markets will make use of CDF's go obsolete...  for the reasons I stated before... holding up collateral is risky and just another needless cost for a trader. 

2. While I have my thoughts on if this is gonna actually work (or work better), I want to ask a simple question first.
Why do you believe it cannot be done in bitshares? What is wrong with the feed price being your reference price and forcing trades within 0.5% of that price during your 'freeze window'/ locking period?

No it can't be done in Bitshares because Bitshares does not use LMSR.  Bitshare needs another party to have collateral, which ensures liquidity problems and thus the bulk of Bitshares problems.  LMSR does not have liquidity issues. 

Title: Re: Discussion of a CFD market on Bitshares
Post by: abit on January 24, 2016, 10:58:15 pm
1.So you have never heard of contracts that can be 'settled' before expiration? Or do you believe no trades in them exist, as it is? I will not go that far and ask about knowledge of mathematically correct ways to determine if and when to do such settlements?

Sorry but Hivemind and Augur's Prediction Markets will make use of CDF's go obsolete...  for the reasons I stated before... holding up collateral is risky and just another needless cost for a trader. 

2. While I have my thoughts on if this is gonna actually work (or work better), I want to ask a simple question first.
Why do you believe it cannot be done in bitshares? What is wrong with the feed price being your reference price and forcing trades within 0.5% of that price during your 'freeze window'/ locking period?

No it can't be done in Bitshares because Bitshares does not use LMSR.  Bitshare needs another party to have collateral, which ensures liquidity problems and thus the bulk of Bitshares problems.  LMSR does not have liquidity issues.
Can this LMSR thing be implemented as a 3rd party market maker bot which runs in BitShares markets, if have some fund? Thanks.
Title: Re: Discussion of a CFD market on Bitshares
Post by: Bitcoinfan on January 24, 2016, 11:06:04 pm

Can this LMSR thing be implemented as a 3rd party market maker bot which runs in BitShares markets, if have some fund? Thanks.

No its a protocol level feature. Otherwise it would be no different from a centralized PM such as Predictit, Intrade, Groupgnosis etc. 

I'd encourage you to take a look at LMSR.  It shouldnt be overlooked. 
Title: Re: Discussion of a CFD market on Bitshares
Post by: tonyk on January 25, 2016, 04:40:45 am
 LMSR is hilarious.

but on the other hand, do not listen to idiots like myself who cannot even publish a well sounding academic paper...
Title: Re: Discussion of a CFD market on Bitshares
Post by: xeroc on January 25, 2016, 06:40:58 am
No it can't be done in Bitshares because Bitshares does not use LMSR.  Bitshare needs another party to have collateral, which ensures liquidity problems and thus the bulk of Bitshares problems.  LMSR does not have liquidity issues. 
It can be done. It is only a matter of adding a new smart contract (e.g. operation) to the protocol.
There is also no magic behind LMSR, it is simply "market maker" (that can be decentralized and even profitable) and is just "another pricing scheme".
You can think of it as an other approach to sell prediction market tickets. Nothing more.

This quote describes it the best:
Quote
Hanson prefers to describe trader behavior in terms of “changing the price” instead of “buying and selling shares”.

//edit: For those that haven't understood the implications of a "market maker": It can make a LOSS also!
Augur has two nice posts that descibe it very well:
http://www.augur.net/blog/what-is-an-automated-market-maker
http://www.augur.net/blog/augur-s-automated-market-maker-the-ls-lmsr
Title: Re: Discussion of a CFD market on Bitshares
Post by: xeroc on January 25, 2016, 06:56:49 am
I conclude that BitShares itself should NEVER every run a LMSR market maker.

BUT: we could have a feature that let's others provide funds for the market maker und still offer the prediction market in a decentralized manner.
This could indeed be built into the protocol to remove the trust that would be required if someone just put a buy and a sell wall at the LMSR price.
Title: Re: Discussion of a CFD market on Bitshares
Post by: tonyk on January 25, 2016, 07:11:11 am
I conclude that BitShares itself should NEVER every run a LMSR market maker.

BUT: we could have a feature that let's others provide funds for the market maker und still offer the prediction market in a decentralized manner.
This could indeed be built into the protocol to remove the trust that would be required if someone just put a buy and a sell wall at the LMSR price.

How can you not find putting an arbitrary market maker in the blockchain itself genius?

PS
at least in his line of reasoning...it is not constantly changing... might be a very bad algo (well it is proven to be) but as long as we stick with the bad long enough it should be good...
ironically the kind of opposite logic to BM's.... who believes that a 75% of a good wheel should turn very smoothly...if it is indeed good wheel.
Title: Re: Discussion of a CFD market on Bitshares
Post by: xeroc on January 25, 2016, 07:25:04 am
I conclude that BitShares itself should NEVER every run a LMSR market maker.

BUT: we could have a feature that let's others provide funds for the market maker und still offer the prediction market in a decentralized manner.
This could indeed be built into the protocol to remove the trust that would be required if someone just put a buy and a sell wall at the LMSR price.

How can you not find putting an arbitrary market maker in the blockchain itself genius?
Not sure if this is a rhetorical question :(
I'll answer it anyways:

putting a market maker on the blockchain makes sense in blockchains that have a means of handling a loss (read: can dilute their shares to pay the market maker)
Since BitShares has had (and still has) it's issues with "dilution" or coin "earning", I think we should not let the BitShares blockchain/protocol itself run the market maker, but the blockchain could offer others to fund the market maker on a loss.

Or, alternatively (stupid approach ahead), we could force the market maker not to make a loss and cut profits from customers in the event of "bad luck" for the maker
Title: Re: Discussion of a CFD market on Bitshares
Post by: Shentist on January 27, 2016, 06:31:49 am
ok, now here is my official propasl, just a draft to disscuss

https://github.com/bitshares/bsips/issues/6
Title: Re: Discussion of a CFD market on Bitshares
Post by: Shentist on January 28, 2016, 10:27:31 pm
what i love is, that anyone just post in "General" because on the subforums your posts get no attention at all.
Title: Re: Discussion of a CFD market on Bitshares
Post by: Bhuz on January 28, 2016, 10:58:08 pm
what i love is, that anyone just post in "General" because on the subforums your posts get no attention at all.
Maybe you could bring this up on tomorrow's mumble?
Title: Re: Discussion of a CFD market on Bitshares
Post by: Shentist on January 28, 2016, 11:07:17 pm
what i love is, that anyone just post in "General" because on the subforums your posts get no attention at all.
Maybe you could bring this up on tomorrow's mumble?

would be nice, but i am not available at he mumble times, because of work. I will add this as a question. Thanks for the idea!
Title: Re: Discussion of a CFD market on Bitshares
Post by: Bitcoinfan on January 28, 2016, 11:16:30 pm
I conclude that BitShares itself should NEVER every run a LMSR market maker.

BUT: we could have a feature that let's others provide funds for the market maker und still offer the prediction market in a decentralized manner.
This could indeed be built into the protocol to remove the trust that would be required if someone just put a buy and a sell wall at the LMSR price.

What's your evidence for this conclusion?  Does the right of the team agree with you?

Could you also explain more how you would do things in a decentralized manner-- that isnt Dan Laimer's competitive price feeds. 
Title: Re: Discussion of a CFD market on Bitshares
Post by: Bitcoinfan on January 28, 2016, 11:19:09 pm
what i love is, that anyone just post in "General" because on the subforums your posts get no attention at all.
Maybe you could bring this up on tomorrow's mumble?

would be nice, but i am not available at he mumble times, because of work. I will add this as a question. Thanks for the idea!

Why do you need CDF contracts , when you have a stablecoin? 
Title: Re: Discussion of a CFD market on Bitshares
Post by: Shentist on January 29, 2016, 07:19:37 pm
what i love is, that anyone just post in "General" because on the subforums your posts get no attention at all.
Maybe you could bring this up on tomorrow's mumble?

would be nice, but i am not available at he mumble times, because of work. I will add this as a question. Thanks for the idea!

Why do you need CDF contracts , when you have a stablecoin?

it is a proven concept and both parties can settle any time.

at the moment the shorters are in a bad risk/reward profil i think this kind of market can attract many traders to our plattform.
Title: Re: Discussion of a CFD market on Bitshares
Post by: abit on January 30, 2016, 12:08:43 pm
what i love is, that anyone just post in "General" because on the subforums your posts get no attention at all.
Maybe you could bring this up on tomorrow's mumble?

would be nice, but i am not available at he mumble times, because of work. I will add this as a question. Thanks for the idea!

Why do you need CDF contracts , when you have a stablecoin?
Imo CDF contracts are new markets for trading. Image that we have a EUR/USD CDF market..