How would a decentralised exchange work? The idea of decentralised Bitcoin-fiat exchanges has been floating around. (For example Mastercoin, Ethereum and Bitshares claim to be able to do it.)

How would such a decentralised exchange work?
It is possible, and not conceptually difficult, to extend the way ownership of Bitcoin is determined in a decentralized way using the blockchain to more complicated constructs such as the ownership of other things or the commitment to contracts, including offers to trade at certain prices. Yet there are two nontrivial issues a decentralized exchange, or its underlying protocol has to solve: How to enforce trades (solving the counter-party risk any exchange has), and how to detect if a trade has occurred.

Obviously there are many ways all of this could be settled. For example, exchanges in real finance leave fulfillment and enforcement to the trading parties and the authorities, but that has huge real-world problems even with a limited number of tightly regulated and registered participants that one may hope to avoid in a decentralized approach.

There is a simple solution for exchanging (specially designed) cryptocurrencies where ownership and contract fulfillment is determined by a blockchain. At least typically, protocols enabling a decentralized exchange include at least one such cryptocurrency, such that as a partial solution an automatic escrow can be implemented. But full automation requires that the ownership of the other currency involved in the exchange can also be automatically established, i.e. it must also be some kind of altcoin.

To extend this to cover fiat currency, there must be some form of agreement to honor the obligation to transfer fiat and to reflect its completion in the decentralized exchange. Sadly, this is at the core of all kinds of blockchain-based contracts: How do we get them to be enforceable, ideally by becoming legally binding? I see two possibilities:


Limit trading to participants that sign some kind of real-world contract to honor them in a way that makes them legally enforceable. This has the problem of being difficult to do in a truly decentralized way, unless legal systems start to recognize at least some kind of digital id and digital contracts.
Require some kind of security deposit to be confiscated in case of breach of contract---possibly from both sides of a contract or exchange-brokered trade, to remove profitability for both sides in the event that one party fails to deliver a fiat payment or that the other party fails to admit having received it. Sadly, designing a system where it is ensured that no kind of fraud pays off is not easy and may require a very large security deposit, giving this approach severe disadvantages as well: A cyber-troll willing to suffer a loss could cause someone else to suffer an even larger loss (and potentially blackmail such a victim into letting the troll get away with a profit), and potential users wanting to use the exchange because they need cryptocurrency may find it difficult to cough up a cryptocurrency-based security deposit.