
Note: Full article was written and published by the Taostats team.
This week, the chain launched MEV Shield – the final nail in the coffin for MEV bots running sandwich attacks on staking and unstaking on Bittensor. In this post, we’ll describe how it works, and why it is so successful.
Want to know how it works? Read on!
What is a MEV Bot?
Lets start off by describing the problem: MEV Bots.
MEV = Maximal Extractable Value. A MEV Bot watches transactions on the chain, and looks to insert transactions to the chain that can extract a lot of value.
The most common approach is the “sandwich attack”
Not a real sandwich, of course. But the bots are able to read the queue for upcoming transactions, and then perform transactions in front and behind the transaction (like the bread that holds the contents of your sandwich.)
Say the bot sees a transaction in the queue: “Buy 50t of SN19” (transaction A)
The bot immediately inserts a “buy 75t of SN19” (transaction B) to occur before transaction A.
The bot gets its alpha at the expected price. Transaction A (assuming loose slippage values) pays a higher price, and gets less alpha. The price increases even more. Now the bot can unstake its position at the higher price – with a tidy profit. A successful sandwich attack.
What the chain tried first
Strong slippage limits stopped most MEV activity. Stakers could limit their loss with a slippage percentage. A 1% slippage means “I am ok with losing up to 1% of my trade.” But:
- It was not required. So some folks still did huge trades without the slippage protection.
- 1% of a 100tao trade is 1 tao.
So, while most people were protected, it wasn’t universal enough, and large transactions still had potential for MEV Bots to exploit some value.
MEV Shield
Mev Shield is the fix to block the MEV bots in their tracks. Most tools on Bittensor (including Taostats) that enable staking have made MEV shield default – protecting trades across the ecosystem.
How does it work?
- Every block, The chain creates a MEVShield encryption Key.


This key is used to encrypt all transactions in that block that request encryption.
- Here we see extrinsic 18 is a MEVshield submitted transaction

I’ll leave it to the reader to open the link and see that the text is encrypted text (its a jumble of letters and numbers).
No one can read this transaction. Not the chain. and most importantly – NOT THE MEV BOTS.
The encryption is valid for just one block. On the next block,
the transaction is decrypted and processed on chain
. In this case it is a batch call with a number of unstake calls inside:

So when a transaction is MEV encrypted – the bots cannot see what transaction you are performing. So they cannot sandwich attack you. They cannot see anything until the transaction has completed! This makes your staking safe and secure from any sort of attack.
Looking at MEVshield calls in taostats
If your account has staked or unstaked, you can check if the transaction was MEV shielded.

Your taostats account page is taostats.io/account/<your coldkey>. In the extrinsics tab, we show all actions that are taken on chain. in the screenshot above, you can see (reading older to newer):
- Block 7081328 – the mevshield encrypted transaction was submitted.
- Block 7081329 – the utility.batch all was performed. (This is the decrypted transaction, and it will always occur on the block after the encrypted block was placed.)
(We do have some reports of the 2nd transaction not actually occurring, and we are working with OTF to diagnose and resolve this issue.)
If you are Staking – make sure your stakes are encrypted with MEV shield
Most of the tools on chain are using MEV shield to protect your transactions – and let you know that your transactions are protected.
When you submit a protected transaction – you have to sign the transaction twice – once for the encryption, and once for the transaction.
So – stake/unstake and trade away! Using MEV Shield, you know that you are protected from the MEV Bots.

Be the first to comment