The Capital: The Lesser Known Miner Fee
You wake up one morning with a desire for apples, maybe you’ve been living an unhealthy lifestyle and want to change that around, so getting this apple is very important to you. You live in a rural town, and your local grocer is the only seller of fresh fruits. You are huge of Rick and Morty and put on your “Got Apples” shirt you got online before heading out of your house because why not? You are an honest person who expresses your thoughts openly. On your way to the grocer, you bump into Flash, the local financier who moved to the town from the city and is always out to make a quick buck. You don’t say a word to him, but he sees your shirt and makes a run to the local store. You chase after him, but he is faster. By the time you get to the store, all the apples are gone. You see Flash holding all the apples proudly. He offers you one for 5 dollars, but the standard price is 1 dollar. You have no choice but to buy it off him because you committed to changing yourself. You walk away with an apple in your hand, shaking your head.”You just got front ran.Front running is one of the main tactics miners use to gain more profit (besides other methods) during the block processing stage. (This analogy isn’t 100 percent accurate, but it covers the main picture).What is MEV?Although the Ethereum blockchain is written by consensus, the content of each block is chosen by just one miner. Hence whilst the whole blockchain is decentralised, the management at a block level is centralised. This control over the content allows them to decide without contest what transactions to include and how to order them, which essentially cascades down to impact the flow of funds for the block.This opens up opportunities to parties who benefit from this. Consider, for example, an automated market maker (AMM) that allows assets to be traded without counterparties. Buying Token X from the AMM causes the price of Token X to rise with respect to a paired asset, say Token Y as there will be less of Token X whilst more of Token Y in the liquidity pool after the trade. A miner can exploit this when Alice is about to buy some Token X in a transaction. If the miner gets to include the smart contract in a block it mines, it can do the following:The miner creates two of its own transactions (T1 and T2) and sandwiches the transaction (T) between them. On a block the structure would be in order: [T1, T, T2].T1 buys some Token X, whilst T2 sells the same amount of Token X bought in T1.The first miner transaction T1 causes the price of Token X to rise, Alice’s transaction T causes the price of Token X (all relative to Token Y) to rise further as she is buying after the miner (thus withdrawing more liquidity out of the pool). After this price rise, the second miner transaction T2 sells all the bought Token X at the latest price, which is higher than the purchasing price in the first transaction T1 hence getting more Token Y by the end of this.The profit here is only possible because Alice’s purchase has increased the token price after the miner purchased the token. If the miner was to perform the same strategy without sandwiching, the profit would not have been possible.In other words, the miner has extracted value from Alice since Alice pays more than she would have if she weren’t attacked by the miner. This is an example of a sandwich attack.More like maximum extractable valueThe MEV is not limited to just miners, and as such maximum extractable value is probably a more suitable name. Now, in the strategy highlighted above, the miner has directly profited from the arbitrage, however, the MEV can also be captured by traders through the aforementioned structural arbitrage trading strategies. Due to the nature of transactions entering a mempool or txpool before they are confirmed by miners, many bots and miners take advantage of this to draw value from user transactions.Even though bots can execute the strategies, miners directly profit from all these traders’ transaction fees from the arbitrage contracts that are deployed for the sole purpose of extracting value from another transaction.Bots BiddingWith the mempool placing transactions in a queue, a miner can “broadcast” their block to arbitrage bots, essentially outsourcing the right to pick a position on the block for a fee in a bidding auction in mempool.The bidding auction works as follows:An arbitrageur issues a smart contract transaction that performs the arbitrage identified with a gas price (g). This counts as the first bid placed.To increase the bid (because a contract with the highest offered gas is accepted), the arbitrageur reissues the transaction with the same nonce and a higher gas price (g1).When two or more arbitrageurs are running this process, the result is a bidding auction for the contract. An example of this happening can be seen below:Priority Gas Auctions (PGA)The bidding strategy of bots falls within two types:Blind bidding: when bots do not take into account the actions of other bots and work on a fixed conditional strategy.Reactive bidding: when bots observe the actions of other bots and react to the behaviour as a part of their strategy.Choices between which of these two strategies to implement depends on latency. If latency of the arbitrageur is expected to be high, then a blind bidding strategy is more effective since by the time the bot is able to react to what other bots are doing, those actions might have already been executed.Further technical detail can be found in the Flash Boys 2.0 paper where this image was extracted from. The paper also explores the strategies used in the bidding auctions in more detail such as the eventual “grim reaper equilibrium” that occurs as a compromise between the bidding bots deploying the above bidding strategies; with the miner unable to capitalise on all the profits obtained via the bots bidding towards 99.9% of the extractable value.Further ReferencesThe idea of MEV was first formally discovered by a Reddit user by the name of pmcgoohan, who is also an advocate for stopping the issue and resolving it (more on this in a future post).The term Miner Extractable Value was formally coined by the Flash Boys 2.0 paper, which is also a major reference point for this article and the following articles covering MEV. Check the paper out for more technical detail on the topic.Check out our new platform 👉 https://thecapital.io/https://twitter.com/thecapital_iohttps://medium.com/media/3b6b127891c5c8711ad105e61d6cc81f/hrefThe Lesser Known Miner Fee was originally published in The Capital on Medium, where people are continuing the conversation by highlighting and responding to this story.
Additional Info
- Read full article on: The Capital
Leave a comment
Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.
Disclaimer: As a news and information platform, also aggregate headlines from other sites, and republish small text snippets and images. We always link to original content on other sites, and thus follow a 'Fair Use' policy. For further content, we take great care to only publish original material, but since part of the content is user generated, we cannot guarantee this 100%. If you believe we violate this policy in any particular case, please contact us and we'll take appropriate action immediately.
Our main goal is to make crypto grow by making news and information more accessible for the masses.
Our main goal is to make crypto grow by making news and information more accessible for the masses.