header-langage
简体中文
English
Tiếng Việt
Scan to Download the APP
Partnered With:

Experience in the Dark Forest of Ethereum: Most DeFi users are suffering damage without knowing it

Read this article in 14 Minutes
Arbitrage robots are not yet at the top of the food chain. Once miners join the game, users may be at the mercy of others.
Original title: "The Dark Forest of Ethereum"
Written by: Tan Guopeng, founder of Ownbit

 

I have read several articles before The article about the dark forest of Ethereum is deeply shocked by the darkness and distortion in it. So I spent a few days writing my own robot, and experienced the danger in depth.       


Overview


What is the dark forest of Ethereum ? It refers to a little-known but widespread unfair and dark mechanism on Ethereum-the privileged use of Mempool's packaging mechanism. Generally speaking, miners sort and package according to the gas price given by the transaction. The order of these transactions has no effect on a single transfer transaction, but when it comes to DeFi transactions, the situation is different.


In DeFi, the order in which transactions are packaged profoundly affects their economic benefits. For example, in  Uniswap , for the same two buy orders for a certain trading pair, the transaction that is executed first will get more tokens. If you always buy the same token before a buy order and then sell it right after, you will profit "without risk". This is also known as front-running.


Details


Why early trading can be profitable? Taking Uniswap as an example, its price model is x * y = constant. For example initial x = 100, y = 100, then constant = 10000. Then when:

User A buys y with 10 x. At this point x = 110, y = 90.9, user A gets 9.1 y. (x * y is still equal to the constant 10000) User B buys y with 10 x. At this point x = 120, y = 83.33, User B gets 7.57 y. (x * y is still equal to the constant 10000) User A sells all y. At this point x = 108.18, y = 92.43, user A gets 11.82 x. (x * y is still equal to the constant 10000)


The above example shows that user A sent two transactions through the transaction in advance, and wrapped user B one after the other Trading, you can profit "without risk". The double quotation marks are used here because it needs to be assumed that no other user A with the same strategy appears. In a real market environment, User B is a real user and User A is a bot.


Taking Uniswap as an example, the current market is flooded with a large number of early trading robots. These bots constantly monitor user transactions that appear in the Ethereum mempool. If the user buys a certain currency in large amount, they immediately send two transactions, one is to buy the currency before the user (higher than the user's transaction GasPrice), and the other is to buy the currency after the user (can use the same GasPrice as the user) slightly lower or the same) to sell the coin.


This kind of advance trading robot is different from the robot that moves bricks for arbitrage between two DEXs, and they are harmful to the interests of users. In the above example, user B could have gained 9.1 y, but because of the existence of robot A, he only gained 7.57 y, thus losing 1.53 y in vain.


Example


This kind of robot is like a robber standing on the road and robbing in broad daylight . Let's take a look at an example:


The user bought 100 ETH of YFL on block 11331736 (user GasPrice 700GWei):

< br>


https://cn. etherscan. com/tx/0x4b7e5c9e25d0e4b0a0f87b68bde10b7b988bc6d7f83f7dd1fa1dd1b044a931c8


Several pairs of robots that robbed the user appeared before and after it, and two representative pairs were cited to explain . Robot A bought 95 ETH before users (and other robots) with a super high gas fee (23,835 Gwei):



https://cn.etherscan.com/tx/0x97ab6f31785068a8 4c47a39e55b2ee391ee6cac2f4c82dbb0ab34f0c5b71c5b9


Subsequently, robot A sold after the user's transaction at the same GasPrice (700Gwei) as the user, and obtained 99.24 ETH, excluding the miner's fee. This robbery made robot A profitable 2 ETH Above:



https://cn.etherscan.com/tx/0x9e5d8a1a179867a4dbca23bd5c7fa6c8db6dd0817165ec3c3474493d69bf6a5c


After the user’s transaction, there was also a move between DEXs Brick arbitrage robot B. It bought YFL from Balancer and sold YFL on Uniswap, making a profit of about 1 ETH:



https://cn.etherscan.com/tx/0x81528f2b5d0cbb217c73e1f60bbd8ed da6536a8efc85cd0a9466496d4aa999c0


Robot B won the benefits, but did not cause loss of interests to users. But this is not the case for robot A. The huge miner fees spent by robot A and its profit, totaling 4.2 ETH, will be paid by users. In this example, the user has lost 4.2 ETH without doing anything!


This example is not an isolated one, but a ubiquitous example that can be found in almost every Ethereum block. Currently, DeFi users of Ethereum are suffering serious damage to their interests, and most of them don't know it!


In-depth


It is not difficult to realize robot A or B technically. So wouldn't Ethereum become a place where robbers wantonly rob? Is there any way to restrict the robot?


The answer is: Yes, other robots. There are also different strategies among robots, and they are also divided into different levels. If you carefully analyze the current Ethereum transactions, not only ordinary users will be robbed by robots, but weaker robots will also be robbed by stronger robots.


Another point that restricts the robot is the user's transaction failure. The so-called transaction failure refers to the situation that the user's transaction cannot be completed because it exceeds the slippage set by the user when the user's transaction is executed. In the above example, if the user's transaction fails, the bot will not be profitable, not only that, but they will also lose miner fees and transaction fees.


It is very ironic that the failure of the user's transaction that makes the robot most afraid is caused by the robot itself (too many robots buy a certain amount before the user currency, resulting in a large price difference when the user buys). When you see such an error in a transaction in the browser, it is mostly due to robbery by robots:



< a href="https://cn.etherscan.com/tx/0xbc236137de0d6a9f82c04039b1c534b9d76789a8a4bda0f3546c87f9e509f016" target="_blank">https://cn.etherscan.com/tx/0xbc236137de0d6a 9f82c04039b1c534b9d76789a8a4bda0f3546c87f9e509f016


Ordinary users are afraid of robots, and small robots are afraid of big robots. Big robots aren't the end, however. The top of the food chain here is none other than the one everyone is familiar with: miners.


Miners


The order of transactions determines the distribution of profits, and the order of transactions determines The right is the miners. Miners join this harvesting game to completely change the robot landscape.


Under the rules of GasPrice high and low ordering, miners can arrange the order of transactions with the same GasPrice arbitrarily. Miners can also directly pack a transaction into a block without broadcasting the transaction. In this game, ordinary users are players with closed eyes, arbitrage robots are players with open eyes, and miners are from the perspective of God.


Once a miner with God's perspective joins the game, the result can be imagined. Miner bots will drive out non-miner bots. And these miners will become the biggest dark forces on Ethereum, using their power to harvest users wantonly!


Solution


Ethereum’s packaging mechanism is the root of the problem, as long as there is a sequence relationship Applications will all be subject to this type of attack. In order to completely solve this kind of problem, we must start with the Ethereum packaging mechanism and transaction privacy protection. Judging from the current development, it will not be easy in the short term.


Another option is to migrate such applications to Layer2. Many Layer 2 solutions have faster packaging speeds, which can effectively reduce the possibility of robot hijacking.


Conclusion


The public robbery, self-interested sorting, and evil miners are letting the ether The workshop has become a game of thrones. This runs counter to the concept of blockchain, fairness, openness, and equality!


If the future development of Ethereum cannot effectively curb the power of miners and supervise the behavior of miners, will it also become a decayed product and be abandoned by people? ? Water also carries a boat, and water also capsizes a boat. If Ethereum's DeFi can't be a fair game, how far can it go!


Extended reading:
《Ethereum is a Dark Forest》
《Escaping the Dark Forest》


Original link


Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit