What's the point of a supposedly decentralized CFD market when asset prices need to be looked up outside the chain? The reason a decentralized CFD market hasn't been built on top of Bitcoin already is that the challenge is agreeing on the market price of the assets in question, in order to calculate a difference, and this process is inherently centralized.
Creating a smart contract for this makes as much sense as a smart contract for betting on the next US president: we decide the outcome of the contract by the result we feed into the contract, since the contract has no way of knowing this itself. Of course, we can always use a group of trusted intermediaries, but when doing so the decentralized property is lost, and we might as well ditch the underlying blockchain, since it doesn't provide any security benefits.
The problem is how to reach consensus. Who decides which intermediaries have the correct view of asset prices? Ultimately, these parties will be the ones who decide the profits and losses of the participants. How is that an improvement over existing systems?
How do you propose solving the problem that parties with short positions in CFDs will want intermediaries who claim the asset price is lower than reality, and parties with long positions prefer claims of higher prices? How do these two parties -- who may earn immense profits from colluding with intermediaries -- reach agreement?
The whole security of the system boils down to what some intermediaries claim is the truth, and this fundamental problem is hand-waved away while pretending "blockchain technology" does anything to solve it. It's not an improvement over existing systems, it has exactly the same weaknesses (colluding intermediaries), except that it runs on top of a blockchain which makes no difference except for implementation complexity being greater.
>The problem is how to reach consensus. Who decides which intermediaries have the correct view of asset prices? Ultimately, these parties will be the ones who decide the profits and losses of the participants. How is that an improvement over existing systems?
You could use credible parties like Yahoo Finance as the intermediary. Town Crier[1] could be used to provide a verifiable Yahoo Finance lookup, that could then be plugged into the smart contract.
I agree that this is a solution, but then the question becomes: what do we need a blockchain for?
If users of the system agree to a group of intermediaries before entering, a blockchain isn't used to reach consensus on which intermediaries to use, it just acts as the settlement layer. Whenever someone wants to cash out, the intermediaries that were agreed upon before entering -- whose public keys are in the contract on the blockchain to which funds were sent -- will just sign a transaction that releases whatever value they find appropriate. This isn't using a blockchain to reach consensus on anything CFD-specific, it just uses the token on it in as the numeraire, so Bitcoin would work just as well (or any other cryptocurrency with sufficient liquidity).
In essence, there's zero difference between 1) holding the private keys which can move funds around on the blockchain and 2) being the supplier of external data (real-world asset prices), which determines the outcome of a contract. In both cases you determine who's paid and who's not, either by signing a transaction with your private key or returning an asset price (which, in turn, decides who's paid what -- the profits and losses of all participants). Only if we can prevent intermediaries from entering into the system on their own, such that they can be paid by the contract, do they have less power when only supplying asset prices (since they wouldn't be able to get paid, but only change the distribution of funds sent to others), but how do we prevent that?
If the intermediaries are not agreed upon before entering, how will a blockchain solve consensus? What algorithm chooses the intermediaries to trust, and why would people trust that the right intermediaries are chosen?
>a blockchain isn't used to reach consensus on which intermediaries to use, it just acts as the settlement layer.
To do the things the intermediary is not willing to do.
To use the Yahoo example, Yahoo is willing to generate a public feed of financial data, but it is not willing to sign a cryptocurrency transaction. We can leverage the credibility of its public feeds to create a financial application that is trustworthy as long as that feed is trustworthy.
So to generalize my point: a blockchain application can be built around a trusted feed generated by a reputable party that would not be willing to agree to be a trustee of an application, or if they were willing, would not be as trustworthy in that role as they are in their role as the producer of the general-purpose feed.
If/when decentralized exchanges using themselves blockchain take off, then that could be the solution. But, considering how slow a blockchain is compared to the speed that traders want, that's not easy to achieve (if it's even possible at all).
Creating a smart contract for this makes as much sense as a smart contract for betting on the next US president: we decide the outcome of the contract by the result we feed into the contract, since the contract has no way of knowing this itself. Of course, we can always use a group of trusted intermediaries, but when doing so the decentralized property is lost, and we might as well ditch the underlying blockchain, since it doesn't provide any security benefits.