top of page

The Pedagogical Palette: Exploring Diverse Teaching Methods

Aleph Zero's Fight Against MEV




On December 5th, just a few days ago, someone minted a BTC inscription (ordinal) on Magic Eden, five hours later, his transaction was finally verified and he got his NFT in the early hours of the next day. 5 WHOLE HOURS for a single transaction!


He recounted watching the block where his transaction lay in getting pushed back multiple times and other blocks get pushed forward in the mempool. What was going on? Transactions are supposed to be verified in the order they come in. However, this isn’t usually the case, especially when the network is congested. 




As you can see in the images above, notice the arrows. The 1st image shows the date (Dec 5th, 23:32:27) when the order to mint order was placed, just about close to midnight. The 2nd image shows the date (Dec 6th, 04:47) when the transaction was finally confirmed, in the early hours of the next day. What happened here was a clear case of MEV. 



What is MEV?

MEV, formerly known as Miner Extractable Value but now generally called Maximal Extractable Value is the maximum value that can be obtained from block production beyond the usual block reward and gas fees which may be altered by adding, removing, rearranging, or censoring the transactions within a block. 


For PoW blockchains, miners are responsible for securing the network and as such, perform the task of building blocks, validating and sending blocks of transactions to be added to other chains of blocks. For PoS blockchains, validators are responsible for these functions. These roles give them an unfair advantage in manipulating the order in which transactions are sent to the blockchain. Due to this, some miners/validators take advantage of their positions and as a result, re-order transactions in a way that benefits them. They can insert their transactions in the first set of blocks heading for the blockchain or they can push transactions of those who pay higher fees to the front while other transactions get pushed back (more like a bribe to manipulate a standard order). Miners and validators do this to maximize their profit separate from the gas fees distributed to them and the reward they earn for producing blocks. Traders who want their transactions to be ahead can also influence MEV by paying very high gas fees so the miners/validators send their transactions to the front.


Before Ethereum’s Merge, $675,623,114 was the estimated dollar value extracted by miners from manipulating transaction orders from 2019 to September 2022. According to Flash Bots, this figure is undervalued as it only contains data from a few protocols and two types of MEV (liquidations and arbitrage). Post-Merge, over $74 million has been realized by Ethereum validators from MEV. This goes to show that MEV has become very lucrative for miners and validators.




Reason MEV occurs

The most basic reason why MEV occurs is that miners/validators can see each transaction's details before they add them to the blockchain. Imagine a scenario where they won’t be able to see the transaction details. They won’t know which transaction is next, so they can’t manipulate them. This is what Aleph Zero is building, a method that not only mitigates the risks of MEV, but one that drastically reduces it.



Different types of MEV attacks

There are various ways an MEV attack can occur:


Front-running: Most mempools are democratized such that every participant can see what goes on in there. Traders can monitor their transactions to see how it goes into the blockchain. While this is a benefit, it also has its disadvantages., front-running for example.


Front-running is a process by which a trader observes transactions ongoing for the sole purpose of disrupting the order. For instance, trader A executes a transaction while waiting for it to get into the blockchain, he watches it in the mempool. Another observing trader B copies the transaction of trader B but with a higher gas fee. A miner sees this and then puts trader B’s transaction at the front so it enters the blockchain first before trader A’s transaction. All the while, trader A watches his transaction getting pushed back to front-run those with higher gas fees. MEV bots are specialized in this.


Liquidations: MEV bots can continuously scan lending protocols for chances to liquidate a user's stake and earn from the liquidation charge. When the chance presents itself, these bots take advantage of weak positions by liquidating them, earning profit from the fees of liquidations. 


Back-running: As opposed to front-running, back-running is making money by placing an order after a high-value transaction. The back-running transaction takes advantage of the remaining arbitrage opportunity resulting from the price impact of the initial transaction. This doesn’t affect the targeted transaction.


Sandwich attack: This combines both front-running and back-running by placing a transaction before and after a targeted transaction. Firstly, Trader A monitors and targets a buy order transaction of Trader B. Trader A then copies Trader B’s transaction but places a higher gas fee so it goes into the blockchain before Trader B’s transaction (front-running).


Trader A's buy-order gets in first, thereby pushing the price of the token up to the slippage tolerance set by Trader B (remember Trader A copied Trader B’s transaction except for the gas fee). This results in the token’s price increasing. Then Trader A also performs a back-running sell-order transaction behind the targeted transaction (sandwiching it) capturing the arbitrage and selling the token at a profit.



Problems caused by MEV

MEV can have negative effects on users and the network. Let’s take a look at some of these problems:


Network congestion: Front-running attacks can lead to the network being congested due to an overload of transactions.


Threatens decentralization: Miners and validators choosing preferred transactions to enter into the blockchain contrast the whole idea of blockchain being a decentralized platform. It breeds censorship, thereby reducing decentralization.


The increasing volatility of the market: The effect of some of these attacks is fluctuation in the prices of tokens.


Reduce fairness: The whole idea of MEV is unfair to victims who have fewer resources to counter the attacks.


Threatens a blockchain’s security: MEV bots can threaten the stability and security of the blockchain network by incentivizing dishonest or harmful activity. MEV bots can even work with miners or validators to rig a block's transaction order.



Aleph Zero on the fight against MEV

Aleph Zero counters the negative effects of MEV through two means: its privacy layer called Liminal and submarine sends.



Liminal is Aleph Zero’s privacy layer and it combines both ZKPs and sMPC, you can read more about how Aleph Zero combines the best features of ZKPs and sMPC in its base layer here. Executed transactions are ordered in batches to be sent into the blockchain but the contents of these transactions will be hidden for the most part, so validators won’t have the opportunity to manipulate transactions ordering. The details of the transactions are only revealed after they have been finalized.


In a traditional submarine send, users have to send decrypted transactions manually after the allotted time has elapsed, however, the process is automated in Aleph Zero’s Liminal. In Aleph Zero, users are obliged to send threshold encryption to an assigned committee which is responsible for decrypting the transaction info.



What is Aleph Zero?

Aleph Zero is a layer 1 blockchain that provides developers with the right platform to deploy projects that are scalable, secure, decentralized, and privacy-enhanced to be used across various applications.


Comments


Recommended

Subscribe Us

Get the latest creative news from CodeTavren magazine