Combatting MEV with TEA

Tea Project Blog
3 min readFeb 3


Miner extractable value (MEV) is a problem that’s plagued DeFi across multiple blockchains. MEV is based on miners’ ability to add, remove, or rearrange transactions within blocks that can be gamed for financial gain. These are most commonly done with financial transactions as seen with front-running, back-running, and sandwich attacks. Since MEV can be extracted by bots, that indicates a leak in the system where bots (and the miners they pay higher gas fees to) are benefiting at the expense of dApp end-users.

Is MEV Unavoidable?

Phillip Daian, who’s one of the core team members behind Flashbots, argues that MEV is fundamentally part of any distributed system secured by economic incentives. His sobering conclusion also implies that MEV will never go away.

We certainly agree that protocols will have their hands full dealing with MEV in all of its variant forms. For example, a dApp or blockchain could take measures to combat MEV opportunities intrinsic to their own platform. But this still leaves open the possibility of MEV through arbitrage. Indeed, even if all dApps on a certain chain optimized their transaction flow it could still leave them open to MEV extraction via arbitrage with external exchanges.

But that doesn’t change the fact that it’s often simple front-running that are the most popular style of MEV attacks on DeFi platforms like Uniswap. These can be seen when addresses front-run other people’s trades and pay validators extra gas fees to be included first on a block in order to make a profit. This results in price slippage for the user which is ultimately a tax paid to the MEV bot.

But what if bots couldn’t peek into pending transactions, wouldn’t that be a marked improvement in the fight against MEV?

TEA Project Inherently Protects Against MEV

The TEA Project has a very different design where bots don’t have visibility into pending transactions and miners have no control over the code running in their nodes.

The TEA Project architecture is therefore able to prevent certain types of MEV attacks, notably front-running and sandwich attacks. TEA uses time as one of its three roots of trust, attaching timestamps to each transaction. All transactions are ordered by their true time timestamp that comes from GPS satellites. Nodes can have differing timestamps for the same transaction, though any conflicts are sorted through a conveyor algorithm.

In order to engage in front-running or a sandwich attack, a MEV bot would have to see a transaction in the mempool waiting to be confirmed. But TEA’s layer-2 isn’t a blockchain and doesn’t function like one. There’s no concept of a ledger, and transactions will only post ex-facto if a developer chooses to log their TApp’s events.

The MEV bot would still have to bribe the miner with a higher gas fee in order to get their transaction ahead of their front-running target. But even if the bot could see the pending transactions, this kind of selective re-ordering isn’t possible in the TEA Project. Every transaction in the TEA network has a timestamp attached to it. This timestamp is signed by an enclave that’s connected to a GPS receiver. If the miner wanted to rearrange transactions by altering timestamps, the miner would need to break into the enclave and modify the code. Breaking into the enclave would cause the remote attestation from other nodes to fail, which would remove the compromised node from the network.

This fundamentally eliminates MEV flashbot front-running and sandwich attacks which result in price slippage for end-users. This type of innovation is only possible with new architecture like what TEA Project is bringing to web3.