# Treading the Dark Forest

By [Danki](https://paragraph.com/@danki) · 2023-04-17

---

Oh boy, I can’t wait to talk about this.

There is an underground market for all the transactions that people wanna send to the blockchain.

And it’s not like a small fry contraband buy-and-sell sidewalk kind of market. No, it iz HUGE. Every single transaction ever made has to pass through it before they get verified in the blockchain. And people are earning billions of dollars from reading your transactions before they’re executed.

This humongous underground market is akin to a Dark Forest because as soon as you’re found, yer as good as ded to predators.

So where can we find this Dark Forest, you say? Frend, it’s in the mempool.

I wished it was a meme-pool too…
--------------------------------

But it’s not, lmao. It is a kind of purgatory… a waiting room where your transactions go before they’re scooped up and validated by nodes. Technically speaking, it’s a memory pool- a data structure inside validator nodes where unverified transactions are stored.

Validators are responsible for choosing whose transactions get verified and executed first. And sometimes, really smart people can exploit that fact by adjusting the validator fees of their transactions. On top of it, most mempools are publicly accessible, so know that the barrier to entry to dis kind of bizniz is really low.

Ears, ears everywhere
---------------------

Now for the fun part…

You would think that your smol, innocent transaction could pass through that whole dark forest without getting noticed. But that’s not the case. Thousands of MEV bots are already on the lookout for the next opportunity, be it big or small.

There are many ways they can make $$$, but here are their most common techniques:

1.  **Frontrunning** - finding profitable transactions in the mempool, copying the transaction, and bidding higher fees so they execute it before the actual sender does.
    
2.  **Backrunning/ sniping** - finding a specific type of newly deployed contract (e.g. new token listings on a dex), sending a buy transaction right behind the transaction where liquidity was added, and then unloading the tokens to regular users at a higher price
    
3.  **Sandwiching** - dis one is a little complex, but if you’re familiar with supply and demand dynamics in a typical order book… the price of an asset goes up when someone buys and goes down when someone sells. The bot simply looks for a buy order in an exchange, frontruns the buy, and then sell at a higher price right after the victim’s buy order, practically pocketing the slippage. It can also happen with sell orders.
    

At the end of it all, the unsuspecting users become victims of MEV when their transactions get an invisible tax because of these techniques. The really unlucky ones lose millions because an MEV has frontran their transaction. And sometimes, it’s a thief stealing from another thief… there were many instances where a hacker’s loot was frontran by an MEV bot. Frens, das how predatory the Dark Forest is!

Looking for Wormholes
---------------------

Now you could be asking, _“If it’s that bad, then how, if there is any way, could we avoid MEV from listening to our transactions?”_

Well luckily we have a few handful of known wormholes, and the most common are:

1.  **Flashbots Auction:** it allows users to route to a private transaction pool. The validators are practically outsourcing their transaction ordering to Flashbots Auction, so there is no toxic bidding on fees
    
2.  **Chainlink’s Fair Sequencing Service (FSS):** lets the oracle network order the transactions that were sent to a particular smart contract
    
3.  **Permissioned Mempools:** like Flashbots Auction, users can send their transactions directly to a trusted validator for a subscription fee.
    

There are many more but some of these solutions have side effects to the ecosystem, like more centralization. The important thing is that you already know that MEV bots see your transactions and can frontrun you with enough incentive. If you have a critical transaction that you want to be private until it’s already executed, then go for the solutions mentioned above.

The Birth of a New Danki Jutsu
------------------------------

Danki haz some evil plans. As you can see, MEV bots sometimes look da same, just targeting different contracts. My premise is that these predators can also be preyed upon. But the dark little idea iz still being reserched and developed by Danki. I might wanna talk about it in the next episodes, but that’s all for now.

つづく

* * *

Anyway I’m giving out a free-to-mint nft for my first few subscribers. Catch it while u can mah frens:

[subscriber-edition://0x7674b264817b17BBCf6D983ee39391D4C851ED62?tokenId=0](subscriber-edition://0x7674b264817b17BBCf6D983ee39391D4C851ED62?tokenId=0)

---

*Originally published on [Danki](https://paragraph.com/@danki/treading-the-dark-forest)*
