<p>For those not familiar with front running: it is the process of market/price manipulation. If I know, that a big purchase of s.th. valuable will happen, the amount of this would get more rare on the market and it's price may rise. Therefor I could quickly do my own purchase of such a good, speculating that the price will rise, and sell it after the big transaction at a higher price. </p>

<p>In the bitcoin world this is not excluded. Imagine that you are within a big financial corp, and this institute asks the trading desk to buy bitcoins for 10mio Euros. An employee could see this planned trade, and do a quick self trade before. So this is within corporations.</p>

<p>In the public bitcoin space, there is no indication of a "big" trade, that will happen on the blockchain. Usually a tx is composed and then sent into the network, to the nodes that you are linked with, and from there to the whole network. So if you could see this UTXO with an enourmous amount in your node, you have the time to create your own tx to do front running. It would need to get into a candidate block, before the "big" tx joins a block which is then minde. I do not see that there is a guarantee to do so. It might get different when a miner comes into the play, and he is hand crafting a tx, but I am not 100% sure... He would have to be fast enough, that no other miner has a candidate block, that get's into the blockchain before him...</p>

CC BY-SA 3.0
2017-10-23T08:32:37.010Z
2017-10-23T08:32:37.010Z
pebwindkraft
<p>There is no practical technology that I've found that prevents front running in a trustless manner. This is the case whether the exchange is decentralized or centralized. The only thing that will prevent frontrunning is proper auditing performed by an independent third party. </p>

<p>I've written here in regards to how some cryptocurrency projects implement the orderbook onto the blockchain and how it doesn't prevent front running:  <a href="http://www.kkurokawa.com/2015/06/front-running-decentralized-exchanges.html" rel="nofollow noreferrer">http://www.kkurokawa.com/2015/06/front-running-decentralized-exchanges.html</a> </p>

<p>Other projects implement the orderbook outside the blockchain, and this does not prevent front running either, the same as centralized exchanges. </p>

CC BY-SA 3.0
2018-02-11T04:36:26.290Z
2018-02-11T04:36:26.290Z
k kurokawa
<p>With the coming rise of decentralized exchanges for bitcoin and altcoins. How do these exchanges prevent front running of trades? Since all the transactions are transparent, what stops someone from monitoring the blockchain to detect a big order coming in and then immediately execute a similar trade before it?</p>

CC BY-SA 3.0
2017-10-23T04:29:46.843Z
Exchange trades/orders happen within the exchange, not on the blockchain.
Pieter Wuille
<exchanges><altcoin><trading><decentralized-exchanges>
How do decentralized exchanges prevent front running?
Patoshi パトシ
# How do decentralized exchanges prevent front running?

(Asked by: username_0 on 2017-10-23)

With the coming rise of decentralized exchanges for bitcoin and altcoins. How do these exchanges prevent front running of trades? Since all the transactions are transparent, what stops someone from monitoring the blockchain to detect a big order coming in and then immediately execute a similar trade before it?

**Tags:** exchanges, altcoin, trading, decentralized-exchanges

> **Comments:**
> **username_1**: Exchange trades/orders happen within the exchange, not on the blockchain.  

---

## 2 answers

### Answer by username_2 on 2017-10-23. Score: 2 | Accepted answer

For those not familiar with front running: it is the process of market/price manipulation. If I know, that a big purchase of s.th. valuable will happen, the amount of this would get more rare on the market and it's price may rise. Therefor I could quickly do my own purchase of such a good, speculating that the price will rise, and sell it after the big transaction at a higher price.

In the bitcoin world this is not excluded. Imagine that you are within a big financial corp, and this institute asks the trading desk to buy bitcoins for 10mio Euros. An employee could see this planned trade, and do a quick self trade before. So this is within corporations.

In the public bitcoin space, there is no indication of a "big" trade, that will happen on the blockchain. Usually a tx is composed and then sent into the network, to the nodes that you are linked with, and from there to the whole network. So if you could see this UTXO with an enourmous amount in your node, you have the time to create your own tx to do front running. It would need to get into a candidate block, before the "big" tx joins a block which is then minde. I do not see that there is a guarantee to do so. It might get different when a miner comes into the play, and he is hand crafting a tx, but I am not 100% sure... He would have to be fast enough, that no other miner has a candidate block, that get's into the blockchain before him...


---

### Answer by username_3 on 2018-02-11. Score: 0

There is no practical technology that I've found that prevents front running in a trustless manner. This is the case whether the exchange is decentralized or centralized. The only thing that will prevent frontrunning is proper auditing performed by an independent third party.

I've written here in regards to how some cryptocurrency projects implement the orderbook onto the blockchain and how it doesn't prevent front running: <http://www.kkurokawa.com/2015/06/front-running-decentralized-exchanges.html>

Other projects implement the orderbook outside the blockchain, and this does not prevent front running either, the same as centralized exchanges.


---

