3 ms·
There is an inherent issue with market making on a blockchain. Here's my understanding of it, maybe amluto and ScJa can correct me if I am wrong. Let's say X c
by thisisit 9y ago
There is an inherent issue with market making on a blockchain. Here's my understanding of it, maybe amluto and ScJa can correct me if I am wrong.
Let's say X coin is worth 1 ETH now. As we are using a decenteralized market this price is stored in the blockchain.
Now, an hour later someone wants to buy X coin at 1.2 ETH. This information needs to be updated in the blockchain. But then the update has to go through confirmation etc. So till the time price is fixed, this intent is stored in the blockchain mempool.
There are two issues here. The price intent is public now. And a miner can selectively delay including this price change in a block.
So, if someone is able to read the intent he/she can race with the fund owner and buy the coin at 1 ETH. Once the price change happens they can now sell the coins back to the contract at 1.2 ETH.