<p>Apparently it's possible just with bitcoin. Here's a snippet from Vitalik Buterin's Ethereum white paper:</p>

<blockquote>
  <p>[Bitcoin] Scripts can also be used to pay bounties for solutions to computational problems, and one can even construct a script that says something like "this Bitcoin UTXO [unused transaction output] is yours if you can provide an SPV [simplified payment verification] proof that you sent a Dogecoin transaction of this denomination to me," <strong>essentially allowing decentralized cross-cryptocurrency exchange</strong> [emphasis added]. (Buterin, 2014)</p>
</blockquote>

<p>So, it sounds like you could do decentralized exchange by basically bidding for other currency through your transaction outputs. </p>

<p>Buterin, Vitalik. "A Next Generation Smart Contract &amp; Decentralized Application Platform" Ethereum White Paper. Updated August 2, 2014. Accessed August 13, 2014. <a href="https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-White-Paper" rel="nofollow">https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-White-Paper</a></p>

CC BY-SA 3.0
2014-08-16T05:14:01.000Z
2014-08-16T05:14:01.000Z
william_grisaitis
<p>Concerning fiat, maybe you could build something like that on top of those services using escrow agents with user trust ratings?</p>

<p>I still haven't seen a good model. At some point you have to trust someone to hold the fiat. Who would you trust aside from a bank or similar institutions insured to protect your fiat?</p>

<p>This article on <a href="http://www.dgcmagazine.com/true-peer-to-peer-currency-exchange/" rel="nofollow noreferrer">True peer-to-peer currency exchange</a> explains how the people at <a href="http://www.metalair.org/" rel="nofollow noreferrer">Metalair</a> envision one possibility.</p>

<ul>
<li>Bob is looking to sell his bitcoins for Euros and enters a sell order
(ask) via the MetaLair network. </li>
<li>Alice is looking to buy bitcoins in
exchange for her Euros and enters a buy order (bid).</li>
<li>The MetaLair system connects Bob and Alice who both agree to use Ivan as the
escrow agent.</li>
<li>Ivan is a small time Europe based escrow agent who has a good trust rating via the MetaLair network. </li>
<li><em>Ivan acts as the escrow agent for the fiat funds and holds Alice’s Euros in his bank account!</em> (Emphasis mine)</li>
<li>Ivan therefore also acts as the escrow agent for the Bitcoin transfer
which is done via the Bitcoin network using a 2 of 3 transaction. (or
this may be automated)</li>
<li>The Bitcoin transaction completes successfully.</li>
<li>Ivan transfers the Euros to Bob’s bank account. Ivan receives a fee for his services.</li>
</ul>

<p>Would you trust Ivan, who is ultimately just some stranger, with a significant amount of your Euros?</p>

<p>In <a href="http://bitcoininsight.com/tag/fiat-money/" rel="nofollow noreferrer">Ripple and Bitcoin – Foundations of a Decentralized Economy</a> a similar model using <a href="https://ripple.com/" rel="nofollow noreferrer">Ripple</a> is explained except that the trusted agents are really people you trust. But even in that case, how much fiat would you trust most of your friends with? More concerning, what happens when you have a $200 relationship with 20 friends and in one unlucky week you end up in debt for near the max to each one for a total approaching $4000, each of those friends having a real need for that money? These kinds of inevitable breakdowns lead to urban legends and an erosion of trust in the system.</p>

<p>Digging a bit deeper into Ripple, it has the concept of <a href="https://ripple.com/wiki/Ripple_for_Gateways" rel="nofollow noreferrer">Gateways</a> (very well illustrated at the link) which is defined as "any business that allows its customers to move money into or out of the Ripple network." Although it looks decentralized in theory, I don't see how it could be in practice. The future gateways will ultimately be today's exchanges: Mt. Gox et. al. The infrastructure doesn't do anything to change the nature of those companies.</p>

<p>Note that while at first glance Ripple looks decentralized, there is still at least one component (the UNL) which is maintained by a central authority. See <a href="https://bitcoin.stackexchange.com/questions/21950/is-ripples-unl-list-maintained-by-the-network">this question</a> for more details and the road map for making UNLs decentralized.</p>

<p>Although Ripple looks promising in terms of infrastructure all of these solutions fail to tackle the real challenge: how do you decentralize trust, accountability, and insurance against default?</p>

<p>For anything other than small amounts, history would tend to point to the average person only trusting large centralized institutions that are accountable to federal law and backed against risk by their government.</p>

CC BY-SA 3.0
2014-02-10T13:10:39.947Z
"Because Ripple is P2P software, no individual, corporation, or government controls it. The network operates via the combined effort of the Ripple software running all over the world." Care to debunk that claim?
Todd Chaffee
CC BY-SA 3.0
2014-02-10T13:20:31.137Z
https://ripple.com/wiki/FAQ#What_happens_to_Ripple_if_Ripple_Labs_goes_away.3F
Todd Chaffee
CC BY-SA 3.0
2014-02-10T15:04:17.373Z
Doesn't UNL = "Unique Node *List*"? If I understood right, the UNL is distributed already and each client has their own list? The issue at the moment seems to be with validators, all 5 of which are currently run by Ripple. Not exactly sure what validators are though...
Todd Chaffee
CC BY-SA 3.0
2014-03-26T14:45:25.543Z
Come on folks, at least leave a comment if you're going to downvote.
Todd Chaffee
CC BY-SA 3.0
2014-02-09T15:41:58.607Z
2014-02-10T14:06:25.680Z
2017-04-13T12:47:33.283Z
Todd Chaffee
<p>I believe it could technically happen with Mastercoin/coloured coins linked to a Ripple account, and the coöperation of a Ripple gateway: he whom holds the coin can withdraw fiat whenever they wish, after the gateway verifies the ownership of the token.</p>

<p>Of course it'd add the question of trust in the gateway: that it will not fall for scams, will do an adequate validation of the coin's ownership, will be sufficiently solvent at any point in time, etc. As with anything involving fiat, this would be unavoidable.</p>

CC BY-SA 3.0
2014-04-09T10:34:36.193Z
Ripple includes a trading market, so what you are hinting at is essentially already available there.
Murch
CC BY-SA 3.0
2014-04-10T10:59:31.083Z
Really? Wow, didn't know! Will have to explore Ripple much more...
Joe Pineda
CC BY-SA 3.0
2014-04-10T11:15:55.033Z
[Guide to Currency Trading on the Ripple Network](https://ripple.com/guide-to-currency-trading-on-the-ripple-network/)
Murch
CC BY-SA 3.0
2014-03-22T00:16:03.443Z
2014-03-22T00:16:03.443Z
Joe Pineda
<p>The <a href="https://bitsquare.io" rel="nofollow noreferrer">Bitsquare</a> project describes a system for the decentralized exchange of bitcoin for national (fiat) currencies.  The <a href="https://bitsquare.io/whitepaper.pdf" rel="nofollow noreferrer">whitepaper</a> goes into the details, but the gist is that the bitcoin being bought is first locked into a multi-signature (<a href="https://bitcoin.stackexchange.com/questions/3718/what-are-multi-signature-transactions">multsig</a>) address and then the fiat payment is made directly from the buyer to the bitcoin seller using a traditional payment method (eg. bank transfer).  </p>

<p>The three signatures on the multisig address are the buyer, seller and an independent arbitrator, pre-selected by both, which only becomes involved if there is a dispute about whether or not the non-bitcoin side has been settled as agreed.  Both buyer and seller also pay into the bitcoin multisig address a security deposit that is used to pay for active arbitration in case of a dispute. </p>

CC BY-SA 3.0
2014-12-14T18:55:44.963Z
2014-12-14T18:55:44.963Z
2017-04-13T12:47:33.743Z
Richard Myers
<p>The idea of decentralised Bitcoin-fiat exchanges has been floating around. (For example <a href="http://www.mastercoin.org/">Mastercoin</a>, <a href="http://www.ethereum.org/">Ethereum</a> and Bitshares claim to be able to do it.)</p>

<p>How would such a decentralised exchange work?</p>

CC BY-SA 3.0
2014-02-02T09:01:00.367Z
I think the idea is that certain Bitcoins can be representative of fiat. AKA smart property.
John T
CC BY-SA 3.0
2014-02-09T23:35:52.367Z
There is already a distributed exchange in production http://counterparty.co
Tyler Gillies
CC BY-SA 3.0
2014-02-12T18:17:38.093Z
I think this is a duplicate of http://bitcoin.stackexchange.com/questions/11116/what-is-the-definition-of-a-p2p-exchange/11303#11303 you can see my answer to that question.
Emre K.
CC BY-SA 3.0
2018-01-26T02:12:45.000Z
https://www.cryptocompare.com/exchanges/guides/what-is-a-decentralized-exchange/
nu everest
<exchanges>
How would a decentralised exchange work?
Randomblue
# How would a decentralised exchange work?

(Asked by: username_0 on 2014-02-01)

The idea of decentralised Bitcoin-fiat exchanges has been floating around. (For example [Mastercoin](http://www.mastercoin.org/), [Ethereum](http://www.ethereum.org/) and Bitshares claim to be able to do it.)

How would such a decentralised exchange work?

**Tags:** exchanges

> **Comments:**
> **username_1**: I think the idea is that certain Bitcoins can be representative of fiat. AKA smart property.  
> **username_2**: There is already a distributed exchange in production http://counterparty.co  
> **username_3**: I think this is a duplicate of http://bitcoin.stackexchange.com/questions/11116/what-is-the-definition-of-a-p2p-exchange/11303#11303 you can see my answer to that question.  
> **username_4**: https://www.cryptocompare.com/exchanges/guides/what-is-a-decentralized-exchange/  

---

## 4 answers

### Answer by username_5 on 2014-08-16. Score: 2

Apparently it's possible just with bitcoin. Here's a snippet from Vitalik Buterin's Ethereum white paper:

> [Bitcoin] Scripts can also be used to pay bounties for solutions to computational problems, and one can even construct a script that says something like "this Bitcoin UTXO [unused transaction output] is yours if you can provide an SPV [simplified payment verification] proof that you sent a Dogecoin transaction of this denomination to me," **essentially allowing decentralized cross-cryptocurrency exchange** [emphasis added]. (Buterin, 2014)

So, it sounds like you could do decentralized exchange by basically bidding for other currency through your transaction outputs.

Buterin, Vitalik. "A Next Generation Smart Contract & Decentralized Application Platform" Ethereum White Paper. Updated August 2, 2014. Accessed August 13, 2014. <https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-White-Paper>


---

### Answer by username_6 on 2014-02-09. Score: 0

Concerning fiat, maybe you could build something like that on top of those services using escrow agents with user trust ratings?

I still haven't seen a good model. At some point you have to trust someone to hold the fiat. Who would you trust aside from a bank or similar institutions insured to protect your fiat?

This article on [True peer-to-peer currency exchange](http://www.dgcmagazine.com/true-peer-to-peer-currency-exchange/) explains how the people at [Metalair](http://www.metalair.org/) envision one possibility.

* Bob is looking to sell his bitcoins for Euros and enters a sell order
  (ask) via the MetaLair network.
* Alice is looking to buy bitcoins in
  exchange for her Euros and enters a buy order (bid).
* The MetaLair system connects Bob and Alice who both agree to use Ivan as the
  escrow agent.
* Ivan is a small time Europe based escrow agent who has a good trust rating via the MetaLair network.
* *Ivan acts as the escrow agent for the fiat funds and holds Alice’s Euros in his bank account!* (Emphasis mine)
* Ivan therefore also acts as the escrow agent for the Bitcoin transfer
  which is done via the Bitcoin network using a 2 of 3 transaction. (or
  this may be automated)
* The Bitcoin transaction completes successfully.
* Ivan transfers the Euros to Bob’s bank account. Ivan receives a fee for his services.

Would you trust Ivan, who is ultimately just some stranger, with a significant amount of your Euros?

In [Ripple and Bitcoin – Foundations of a Decentralized Economy](http://bitcoininsight.com/tag/fiat-money/) a similar model using [Ripple](https://ripple.com/) is explained except that the trusted agents are really people you trust. But even in that case, how much fiat would you trust most of your friends with? More concerning, what happens when you have a $200 relationship with 20 friends and in one unlucky week you end up in debt for near the max to each one for a total approaching $4000, each of those friends having a real need for that money? These kinds of inevitable breakdowns lead to urban legends and an erosion of trust in the system.

Digging a bit deeper into Ripple, it has the concept of [Gateways](https://ripple.com/wiki/Ripple_for_Gateways) (very well illustrated at the link) which is defined as "any business that allows its customers to move money into or out of the Ripple network." Although it looks decentralized in theory, I don't see how it could be in practice. The future gateways will ultimately be today's exchanges: Mt. Gox et. al. The infrastructure doesn't do anything to change the nature of those companies.

Note that while at first glance Ripple looks decentralized, there is still at least one component (the UNL) which is maintained by a central authority. See [this question](https://bitcoin.stackexchange.com/questions/21950/is-ripples-unl-list-maintained-by-the-network) for more details and the road map for making UNLs decentralized.

Although Ripple looks promising in terms of infrastructure all of these solutions fail to tackle the real challenge: how do you decentralize trust, accountability, and insurance against default?

For anything other than small amounts, history would tend to point to the average person only trusting large centralized institutions that are accountable to federal law and backed against risk by their government.

> **Comments:**
> **username_6**: "Because Ripple is P2P software, no individual, corporation, or government controls it. The network operates via the combined effort of the Ripple software running all over the world." Care to debunk that claim?  
> **username_6**: https://ripple.com/wiki/FAQ#What_happens_to_Ripple_if_Ripple_Labs_goes_away.3F  
> **username_6**: Doesn't UNL = "Unique Node *List*"? If I understood right, the UNL is distributed already and each client has their own list? The issue at the moment seems to be with validators, all 5 of which are currently run by Ripple. Not exactly sure what validators are though...  
> **username_6**: Come on folks, at least leave a comment if you're going to downvote.  

---

### Answer by username_7 on 2014-03-22. Score: 0

I believe it could technically happen with Mastercoin/coloured coins linked to a Ripple account, and the coöperation of a Ripple gateway: he whom holds the coin can withdraw fiat whenever they wish, after the gateway verifies the ownership of the token.

Of course it'd add the question of trust in the gateway: that it will not fall for scams, will do an adequate validation of the coin's ownership, will be sufficiently solvent at any point in time, etc. As with anything involving fiat, this would be unavoidable.

> **Comments:**
> **username_8**: Ripple includes a trading market, so what you are hinting at is essentially already available there.  
> **username_7**: Really? Wow, didn't know! Will have to explore Ripple much more...  
> **username_8**: [Guide to Currency Trading on the Ripple Network](https://ripple.com/guide-to-currency-trading-on-the-ripple-network/)  

---

### Answer by username_9 on 2014-12-14. Score: 0

The [Bitsquare](https://bitsquare.io) project describes a system for the decentralized exchange of bitcoin for national (fiat) currencies. The [whitepaper](https://bitsquare.io/whitepaper.pdf) goes into the details, but the gist is that the bitcoin being bought is first locked into a multi-signature ([multsig](https://bitcoin.stackexchange.com/questions/3718/what-are-multi-signature-transactions)) address and then the fiat payment is made directly from the buyer to the bitcoin seller using a traditional payment method (eg. bank transfer).

The three signatures on the multisig address are the buyer, seller and an independent arbitrator, pre-selected by both, which only becomes involved if there is a dispute about whether or not the non-bitcoin side has been settled as agreed. Both buyer and seller also pay into the bitcoin multisig address a security deposit that is used to pay for active arbitration in case of a dispute.


---

