On June 29, 2021, an interesting idea emerged in the Discord forum of Flashbots:
Using Flashbots to motivate censorship is a bit scary. This also runs counter to Flashbots’ mission to reduce negative externalities caused by MEV. Nevertheless, as another community member quickly pointed out, this kind of censorship is not economically feasible because it requires more fees than MEV searchers or users who want to include the same transaction:
@CuriousDefiUser, great work!
Escaped the crisis!
Well, not exactly. Although the initial idea of Austin Williams above might not cause panic, a follow-up idea put forward by another community member Nathan Worsley a few days later raised a more disturbing question.
Instead of reviewing transactions in the future, it is better to incentivize review/replace past transactions
After a while of discussion, this original idea quickly evolved into:
Implementing an incentivized block reorganization will mean building the necessary infrastructure on top of Flashbots’ MEV-Geth
Behind these posts is a story involving angry denunciations on Twitter, outstanding independent hackers, and some of the best examples of why social consensus is as important as consensus on encryption algorithms.
Let’s take a closer look.
The GHOST agreement and the “uncle” on the time shuttle
In its current state, Ethereum is a system that uses the Proof of Work (PoW) consensus mechanism proposed by Satoshi Nakamoto; this means that the network consensus between miners who protect the network depends on the original hash rate. This also means that the transaction has only probabilistic finality; the longer a transaction has been included in a block, the less likely it is that the transaction will be overturned. Therefore, it is generally recommended that users on the PoW blockchain wait patiently before the transaction is “completed”. On Ethereum, the transaction is assumed to be finalized after 7 blocks, which is usually a safe idea.
In the PoW system, two miners may dig out valid blocks at the same time and try to broadcast these blocks to the network. What happened in the end was that the network left two valid blocks, but only one can be added to the main chain before the next mining competition starts. This means that one of the blocks must become “stale”, or be discarded. This solution is not very good for two reasons. First of all, the miners who produced obsolete blocks were wasting their resources! Second, this makes the network prone to centralization risks, as miners are eager to ensure that they have sufficient hash rates to avoid producing obsolete blocks. For more information on this, please click here to learn more.
On the Bitcoin network, 10 minutes of block production time and less than one minute of propagation time make the probability of obsolete blocks very low. However, on Ethereum, the block production time is much shorter-about 12 to 13 seconds-and the probability of generating obsolete blocks is much higher. This makes the above-mentioned resource waste and centralization problem more prominent. Ethereum solves this problem by using an improved version of the GHOST (Greedy Heaviest-Observed Sub-Tree, also known as the Ghost Protocol) protocol. The GHOST protocol was designed in 2013 to solve the precise problem of obsolete blocks in the fast-producing block chain. The basic premise is simple: the “longest” chain accepted by miners has the highest cumulative PoW A chain of mining difficulty, including obsolete blocks with the same ancestry and ancestry as the current block. Such blocks are called “uncle blocks”. Ethereum adopts a variant of the GHOST protocol and uses the same screening principle to select the chain with the longest difficulty, but does not include the uncle block in the difficulty calculation. It will allocate some block rewards to uncle blocks so that the transactions in these blocks can be accessed, but those transactions in the main chain are not included. The process of adopting the new “longest” chain and ignoring obsolete blocks is called chain reorganization.
After talking for a long time, what does this have to do with MEV?
There are two main ways to incentivize network users to take advantage of uncle blocks and the situation caused by reorganization for profit. The first one has already occurred in practice and is much less threatening. It is called “Uncle Robber” and is exclusively enabled by Flashbots. As of mid-July 2021, about 86% of Ethereum hashrate uses Flashbots’ MEV-Geth client; however, Flashbots bundles may still be included in the uncle block, thereby creating opportunities for “uncle robbers”. This was first introduced in detail in a serial push by Robert Miller. Since the transactions contained in the uncle block will not change the state of Ethereum, but are still visible to others and are valid transactions, savvy MEV searchers can view the Flashbots bundle that enters the uncle block and publish a new bundle, in which Contains some transactions in the original bundle, as well as some of their own transactions, to capture arbitrage opportunities on the main chain.
But “uncle robbers” themselves do not pose a threat to the agreement; in the final analysis, they are the result of bundles having a certain probability of being included in the uncle block, while others seize this marginalized opportunity for profit. However, Uncle Robber’s nasty cousin, Time Robber, is even more worrying. As detailed in the seminal research paper on MEV, time bandit is a theoretical attack that occurs when the reward from the MEV starts to exceed the block reward. The premise of the time bandit attack is that miners who can obtain a large amount of Ethereum hash rate can re-mine previous blocks, capture all MEVs in these blocks, and reorganize the Ethereum chain. The clock reverses. The easiest way is to rent the 51% hash rate of Ethereum; through these operations, the attacker will return to capture a certain number of blocks, obtain all the MEV profits in these blocks now and in the past, and use this profit to make up for it. Attack cost.
MEV profit is roughly the percentage of transaction costs. Source: Flashbots
As shown in the figure above, MEV profits account for an increasing proportion of miners’ economic returns, and the threat of time bandit attacks and reorganizations will increase accordingly. This also means that theoretically it should be possible to reorganize the chain by bribing miners. The strategy is: wait for other users to submit profitable bundles, bribe miners to reorganize the chain, and then carry out “uncle robber” or time robber attacks for profit. The drama we are going to discuss in this article is hereby unveiled.
Chaos Magician and Nuclear Reorganization
When Nathan initially proposed an improved version of MEV-Geth (a chain reorganization that can inspire uncles/time bandits), MEV searchers immediately set out to develop the software, while Twitter bloggers in the cryptocurrency field were caught in a heated debate. This Meme accurately summarizes the main sentiments of the community:
The popular Twitter account MEV Intern expresses deep concern about the advent of such software but no tools to defend it; after all, although such incentivized chain reorganization techniques are allowed within the scope of consensus, they do destroy it. The stability of the protocol, and by creating scenarios where the security assumptions of miners’ behavior are challenged, too many stress tests have been performed on Ethereum.
In any case, Pandora’s Box has been opened.
Soon after, two high-profile MEV strategists and researchers-Edgar Arout and 0xbunnygirl-presented their own personal versions of the “reorganization request.”
Edgar’s repository is a fork of the MEV-Geth client created by Flashbots. The repository has been privatized, but the code base is still active, which will enable MEV searchers to request the reorganization of a certain number of past blocks, omit certain transactions and add new transactions, including payments to miners.
0xbunnygirl was then inspired to launch a smart contract on Ethereum, which will provide a very simple payment channel for this. The contract that requires chain reorganization enables users to attach a request that contains the relevant reward to the miner and the block they want to reorganize back. Then, the miner will perform a time bandit attack, which includes transactions that enable it to claim rewards in the chain reorganization, and transactions that need to be omitted/included, and the miner’s agreement that assets are cut due to dishonest behavior. Of course, this contract is also a proof of concept; in the rollback state, miners can decide to be dishonest and review asset reduction transactions. There is no code in the contract to include a specific transaction in the actual contract or review another transaction. .
Nothing happened (miners will not be punished).
Even without functional tools, people are dissatisfied with this type of development work. The work of creating a reorganized incentive system has made many well-known researchers, developers and industry leaders in the field angry. Edgar will eventually shelve the restructuring agreement. Flashbots issued an official statement condemning chain reorganizations as negative-sum games, emphasizing that they will lead to game theory instability, systemic risks, and possible reduction in long-term income of miners. Responding to the assertion that a mining pool like Ethermine may make a system reorganization request on its own, Flashbots responded as follows:
Social consensus, not algorithmic consensus, has prevented the development of tools that seem to harm Ethereum, and that’s it.
The cryptocurrency side did not respond to these news.
We will succeed, anonymous
Although all the development and debate surrounding the reorganization request may not bring any threat in the end, the question still remains: how big is the threat of time/uncle robber attacks now and in the future?
Well, it turns out, maybe not big. Let us see why.
MEV researcher 0x9116 did some great rough mathematical calculations on areas where restructuring might be profitable. To briefly summarize his serial push, assuming that a 30% hash rate is required (Ethermine has about this amount), its MEV needs to exceed 3.3 times the total cost, plus 0.58 ETH.
Let’s extend this example further. Given that controlling 51% of the network hash rate in the PoW system can achieve control of the entire network (thus achieving the maximum MEV), let’s look at how the calculus changes when we are just below this level or 50%. In this case, we can use the same calculation framework as the above serial push with some modifications. We did not assume that we (as a miner looking for a time bandit attack) could definitely get rewards from the next two blocks, as originally assumed, but relaxed the assumptions and weighted these results with probability. The basic block reward is 2 ETH.
Assuming that there is a block A that we have not yet mined, we have a hash rate of 50%, the miner reward of block A is denoted as X, and the expected MEV payment is denoted as Y. We hope to dig out two blocks (either for time bandits, or for normal operations in a proper manner). If we mine the next two blocks after A, we have a 50% chance to mine each block independently, so the expected return is 0.5 * (4 ETH + 2Y) or 2 ETH + Y. If we perform a time bandit attack (as originally assumed by 0x9116, if the next block B is mined, we will exit):
- There is a probability of 0.5 to mine the next block B, and then we can perform “uncle robber” processing on A and replace it with A`. Then we return to the origin, where we only need to dig out the next two blocks fairly. In this case, the expected return is 0.5 * (0.5 * (4 + 2Y)) or 1 + 0.5Y.
- The probability of block A` being mined is 0.5 * 0.5 = 0.25, but block B is mined before we can mine block B`. A` becomes B’s uncle block and receives a reward of 1.75 ETH, and then hopes to mine blocks after block B. In this case, the expected return is 0.25 * (1.75 + 0.5 * (2 + Y)) or 0.6875 +0.125Y.
- Our probability of mining blocks A` and C` is 0.25. In this case, the expected return is 0.25 * (4 + X + Y) or 1 + 0.25X + 0.25Y.
This means that the expected return is 2.6875 + 0.875Y + 0.25X, which must be greater than the expected return of honestly mining the next two blocks. This means that X> 0.5Y — 2.875 ETH is a necessary condition. This means that even if the controlled hash rate is close to 51%, X is greater than half of the MEV captured in the current block minus 2.875 ETH. Although this happens occasionally, as of mid-July 2021, the cost of renting an hour of Ethereum’s 51% network hash rate is approximately $1.1 million. This means that renting a 50% hash rate (to maximize the possibility of time bandits without completely hijacking consensus) will cost approximately $1 million. Therefore, for the restructuring to be profitable from the perspective of economic benefits, X> $1 million is required, or approximately 550 ETH based on the market price at the time of writing. As shown in the figure below, the total amount of MEV withdrawn every day is usually around millions of dollars, so the cost of trying to rent a 50% hash rate to initiate a time bandit attack is likely to far exceed the benefit.
Of course, perhaps some single block can justify this cost. For example, Justin Sun’s $1 billion position in Liquity was almost liquidated, and he had to pay a $300 million deposit to avoid liquidation. If the reorganization is carried out at the end of the chain by then, the profit of the reorganization will exceed the 50% hash rate of the lease. cost. However, it is unlikely that a single attacker can rent a 50% hash rate-for now, the Ethereum hashrate available for rent at any given time on NiceHash is usually less than 10%.
If you want to perform parameterized calculations here, I have made a tool that allows you to determine for yourself the expected benefits of honestly digging out two blocks and the expected benefits of attempting a time bandit attack on the most recent block, using the available network. The total amount of payment to miners in the Greek rate share and the time robber attack, as well as the expected payment to the miners for mining future blocks:
Please remember the total value calculated in ETH!
On the other hand, if the restructuring is sufficient to obtain sufficient economic stimulus, there should also be sufficient economic benefits to inhibit the restructuring.
Source: Daniel Goldman
Developer Daniel Goldman only reversed the original reorganization request contract of 0xbun nygirl to achieve this. Called Deorg, it will allow any user to create a bounty paid to miners in a future block. Malicious behaviors will reduce their rewards (after a certain number of confirmations, Deorg actually confirms good behavior by requiring a certain height of the block to be unchanged. Daniel pointed out this in good faith ), but it does show that most of the economic incentives faced by chain reorganization can be redesigned.
Another potential way to reduce the risk of restructuring is to adopt a “fee smoothing” method (as Ivan Bogatyy mentioned at the MEV.wtf Virtual Summit). As an honest miner, you dig up the block to the front Any miner forwards the MEV. The design space in this area is as rich as the space for incentives and reorganization; as Tom Schmidt said in our last article on MEV, “For every new firearm, there will be 1,000 firearms salesmen and 1,000 body armor manufacturers have created a prosperous business opportunity.”
Finally, it is worth noting that chain reorganization and selfish mining may evolve into a recursive negative-sum game, which may actually cost miners rather than profit. If all the miners are waiting for others to find the MEV and then reorganize, the network may get into trouble, leading to long transaction completion times and adversarial back-and-forth games. As miners continue to attempt time bandit attacks on the proceeds plundered by other miners, this will reduce profits.
Source: Charlie Noyes
A paper by IC3 researchers uses reinforcement learning (RL) to simulate selfish mining in the Bitcoin network, and combines various models to find that when all miners use selfish mining strategies (time bandit attack to capture the area) Block reward), the relative reward of miners will decrease.
This figure illustrates the relative rewards of selfish miners simulated by the RL model in this paper
A similar impact will definitely be seen on Ethereum. Facts have proved that the reorganization strategy will only work when a few people execute it; the three monks have no water to eat! These assumptions do not even include the reflexive price trend of ETH that may occur when chain reorganization breaks consensus. The unfavorable public relations impact exposed by the continuous reorganization of a chain and greedy miners is likely to have an adverse impact on the price of the chain’s tokens in the market, and may even damage the chain built on this chain or on other chains through beta. Other assets. In the long run, these will only harm the miners and the ecosystem.
Proof of Stake (PoS) and social consensus
As mentioned earlier, the strong voice against the development of MEV-Geth “Uncle Robber” fork or reorganization request is a powerful example of the role of social consensus. Social consensus has always been a part of cryptocurrency. Typical examples include: Binance decided not to roll back Bitcoin in order to recover the Bitcoin looted by hackers, and even more fundamentally, the mining pool decided to decentralize in the spirit of decentralization. Keep the hash rate below 50%!
As Ethereum moves towards the PoS consensus mechanism of Ethereum 2.0, MEV will not disappear, nor will the risk of restructuring. Although PoS does provide absolute transaction finality, it only occurs after 2 epochs (each epoch is a 6.4-minute period, during which a maximum of 32 blocks are proposed/proved, and the proposer knows before 1 epoch , The prover is 2), but there are the following scenarios: the reorganization can occur within about 13 minutes of the completion of the transaction, and the finality of the transaction can be completed in 13 minutes. However, by limiting the time window and other factors, restructuring will become more difficult.
However, PoS’s biggest isolation measure for reorganization can be said to be not the absolute finality after two epochs, but the concept of “identity”. In view of the transparent identity of the proposer, verifiers who are found to be malicious may be blacklisted from participating in network activities and the Flashbots network. In addition, as existing large-scale miners (such as Ethermine) switch to staking mining assets, large-scale exchanges and platforms (such as Lido and Kraken) dominate the field of validators, and these institutions are increasingly unlikely to take the initiative Restructuring and even charging MEV fees (as a social and regulatory issue) risked reputation damage.
Many pledge depositors are now well-known institutions!
MEV epilogue game
Obviously, MEV will not disappear on Ethereum in a short time. But this may not be a terrible thing either. MEV is unlikely to lead to frequent reorganizations that destroy Ethereum, both now and in the future. However, the role of MEV is to promote the creation of a fairer and more democratic design space for the financial system. The creation of research groups like Flashbots, the advancement of fair transaction sequencing, and the adoption of cryptographic technologies such as zero-knowledge proofs and threshold decryption at the protocol and application layers have all made progress in the process of trying to reduce and democratize MEV. In the long run, the encryption economy system we know and love will therefore become more powerful. Events such as the restructuring drama are positive alarm bells, always reminding us: when we are building the financial future, the crypto community can never take system assumptions for granted, we must continue to innovate to pursue anti-fragility, and we have a strong The community and talents can actually do this.
Written by: Saneel Sreeni, Junior Partner, Dragonfly Capital
Compiler: Perry Wang
Many thanks to Haseeb Qureshi, Tom Schmidt and Celia Wan of Dragonfly Capital and Stephane Gosselin of Flashbots for providing a lot of feedback on this article.
Source link: medium.com
Posted by:CoinYuppie，Reprinted with attribution to:https://coinyuppie.com/one-article-to-understand-the-reorganization-of-ethereum-no-longer-worry-and-even-fall-in-love-with-mev/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.