KasMedia Logo

Let's talk about MEV in crypto. You might hear this term a lot. It stands for Maximal Extractable Value, which sounds complicated; however, it's simply a methodology for miners or validators to extract additional profit by gamifying the ordering or inclusion of transactions inside a block.

MEV is a major topic in the future of blockchain technology for both layer ones, such as Ethereum's layer one (where complex Proposer-Builder Separation systems try to manage it), and layer twos, primarily with Optimistic Rollups. For an explanation of Optimistic and Based rollups, see my post here: 

https://x.com/coinathlete/status/1910598233954345046?t=SVVyiHjIR9VPU4bRmUeHRQ&s=19  

Entities ordering transactions (e.g., a layer one validator/builder or layer two sequencers) can monitor your transactions and act on them in several ways. For example, innocent users may receive unwanted prices on trades from MEV extractors front-running—jumping ahead of your trade—or they may be trapped in sandwich attacks (where someone places orders before and after yours). This often feels unfair and mainly benefits sophisticated players.

Common MEV Attack Possibilities

Imagine you're on an L2 DEX running on Kaspa. The current price is 1 ETH = 20,750 KAS (based on 1660 ETH / 0.08 KAS USD). You decide you want to buy 1 ETH, so you prepare a transaction to swap 20,750 KAS for that 1 ETH. You send your transaction.

An MEV bot sees your incoming order to spend 20,750 KAS to buy 1 ETH. It knows this will make ETH slightly more expensive than KAS) in this specific DEX pool. The bot instantly sends its own transaction first. Let's say it uses 41,500 KAS (worth ~3,320 USD) to buy ETH. This pushes the price up slightly in the pool. Now, 1 ETH costs 20,850 KAS. The bot gets roughly 1.99 ETH for its 41,500 KAS, buying at an average price of around 20,800 KAS/ETH.

Your transaction goes through next. But because the bot bought ETH right before you, the price is already higher, as 1 ETH now costs 20,850 KAS. Your buy pushes it up even more. During your swap, you end up paying an average price of maybe 21,000 KAS per ETH. So, your 20,750 KAS only gets you about 0.988 ETH instead of the full 1 ETH you aimed for. The price after your trade is now 21,150 KAS per ETH.

Right after your transaction, the MEV bot immediately sells the 1.99 ETH it bought just moments before. Since the price is now higher – 21,150 KAS/ETH – thanks to your buy pushing it up, the bot sells its ETH for approximately 42,088 KAS (1.99 ETH * 21,150 KAS/ETH).

You wanted 1 ETH for roughly 20,750 KAS, but you only received 0.988 ETH. You effectively lost 0.012 ETH, worth about 254 KAS or ~20 USD at that moment, due to the worse price caused by the MEV bot sandwiching your trade. The MEV bot spent 41,500 KAS and got back 42,088 KAS. It made a quick profit of 588 KAS (worth about ~47 USD) minus its transaction fees directly from the price movements forced around your transaction.

Kaspa and Block Parallelism

But here's how Kaspa differs due to its core design, especially after the Crescendo upgrade. First, Kaspa's inherent properties help fight against MEV naturally. High speed with 10 blocks per second is one factor, but more importantly, Kaspa's BlockDAG creates block parallelism. Unlike typical blockchains where only one miner 'wins' and creates the next block, Kaspa often has multiple blocks created by different miners simultaneously within very short intervals (like 100 milliseconds). This means no single miner controls the exact sequence for any moment; instead, competition ensues. This natural 'chaotic' competition makes it much harder for any single actor to reliably predict and manipulate the transaction order to execute quick MEV strategies like simple front-running compared to slower, single-leader systems. This inherent parallelism aims for a fairer system from the start. 

However, while this speed and parallelism make some common MEV strategies much more difficult, it might not eliminate all possible types, especially more complex ones or potential censorship issues.

Further Potential Kaspa MEV Solutions

So, what's Kaspa's plan? Research and development (likely happening after the Dagknight L1 upgrade) to build specific L1-level solutions to minimize or stop harmful MEV. What might these solutions look like? Based on Kaspa discussions and research, possibilities include leveraging high BPS further. Yonatan Sompolinsky has discussed research directions where Kaspa's high block rate and miner competition could potentially lead to an environment where miner payments ("kickbacks") naturally match the extractable MEV, essentially making unfair extraction unprofitable – a kind of "wash."

There are also ideas around fair ordering protocols – exploring ways to make the L1 order transactions based more on when they were received globally, such as a fair queue, rather than letting miners choose the most profitable order. This is complex in a distributed system but aims directly at ordering fairness.

Threshold encryption is another avenue—a technique that locks (via encryption) transactions when they are submitted. Miners would order the locked transactions without knowing their contents, preventing front-running based on what's inside. Only after the order is set would the transactions be unlocked for execution.

And then there's the idea of MEV auctions – potentially designing systems where the right to extract MEV is auctioned openly, with the proceeds burned or going to the community, making the value capture transparent and shared.

Kaspa's research will focus on finding the best fit for its unique fast BlockDAG to achieve its fairness goals.

So, how big is this MEV issue in crypto generally? It's significant. Data sources (such as the Bank for International Settlement's report) estimated that well over 650 million USD had been extracted on Ethereum alone by mid-2022, and the total across all chains since then is certainly much higher, likely running into billions. It shows that a lot of value is being diverted from users or protocols via these strategies.

What if this MEV wasn't extracted? Users would get fairer prices on trades without worrying as much about front-running or sandwich attacks. This could also lead to less network spam from bots fighting over MEV, potentially resulting in lower base fees and a smoother network experience overall. Lastly, it would build more trust that the system isn't rigged against the average user.

Enjoyed reading this article?

More articles like this

Comments

No comments yet!

Post a comment

KasMedia logo