Navigating the Dark Forest, Polkadot’s MEV arena

In the world of decentralised finance, there’s a dark and mysterious place known as “The Dark Forest.” This is where the forest folk, bots and traders compete fiercely to exploit profitable opportunities through MEV.

MEV, or Maximal Extractable Value, is a powerful concept that has taken the blockchain world by storm. It refers to the maximum value that users can extract from a blockchain by leveraging their understanding of block production mechanics. By strategically ordering, inserting, or reviewing pending transactions, savvy users can unlock significant profits.

In the fast-paced world of crypto, information is power. MEV is like having a crystal ball, granting users perfect insights into future block production. With this knowledge, a wide array of profitable opportunities emerge. Arbitrage becomes viable, allowing users to capitalise on price discrepancies across different platforms. Front and back running, once the domain of sophisticated traders now become accessible to anyone with the right MEV strategies.

One crucial aspect of MEV is the ability to monitor and analyse the mempool. This is the pool of pending transactions waiting to be included in the next block. The mempool provides a real-time view of the transactions that users are submitting to the chain. By observing the mempool, MEV searchers can gain valuable insights into market activity, user behaviour, and potential opportunities for profit.

For example, by monitoring the mempool, an MEV searcher might notice a large pending transaction that could significantly impact the price of a particular token. Armed with this information, they could quickly submit their own transaction to buy or sell the token before the price changes, capitalising on the anticipated price movement. This is just one example of many that could be profitable in the dark forest.

Moreover, advanced MEV techniques often involve strategically placing transactions in the mempool to influence the order in which they are included in a block. By carefully crafting and positioning their transactions, MEV searchers can take advantage of other users’ transactions.

The Good and the Bad of MEV:

MEV transactions can be both beneficial and malicious. Let’s explore two examples:

The Hero: Imagine a savvy operator who monitors the blockchain for mis-priced assets. They see that due to a large sell order, the opportunity to buy this token then sell it again in the same block would be profitable. This user would then trigger a function on their own smart contract which would atomically buy a token in Pool A and then sell it in Pool B. All in the same transaction.

We see many examples of this, below is a GLMR-MANTA trader that used his smart contract to batch a transaction allowing him to trade a synthetic DOT-MANTA pair which does not natively exist on chain. These actors not only submit the majority of on-chain transactions, but they are life blood of every DeFi application. Without them, pools would be mis-priced, collateral would go unsold and native yields would be extremely low.

The Villain: Picture a nefarious bot waiting for you in the forest, hidden in the trees. You submit a transaction to buy your favourite memecoin. In the shadows, the algorithm sees this transaction being submitted. Reads the transaction details and sees that you are trying to buy DED with USDT but you have set your slippage to 10%. Noticing this opportunity, the searcher submits their own set of transactions. The first pays a higher gas fee than your transaction, and buys DED tokens, pushing up the price. Your transaction then is confirmed to buy at this higher price. The attacker then submits another transaction straight away selling these DED tokens back into the pool at the higher price. You get a worse price, and they collect the slippage you set on your transaction. This is a sandwich attack.

A very popular pool to do this was the LcDOT-DOT pool on Acala. Since inception many people have operated back running and sandwich attack strategies in this pool. Below is a perfect example of wallet u7xska seeing large sell orders pending in the memepool, realising this and placing their own buy order later in the block to benefit from this lower price. A fantastic back running strategy. These strategies are not limited to only this pool, searchers are now on every parachain watching transactions trying to profit all the time.

Top Tip If you want to avoid being sandwich attacked or taken advantage of, just set your slippage to a low number. This will make it much harder to extract value from your transaction.

The future of sandwich attacks:

When volumes fell and uninformed traders were sparse during the bear market. We saw a new type of attack occur. Users became wise to sandwich attacks and began to set their slippage very low. Well this must have shook the dark forest to its core? Think again, a more cunning strategy is now being deployed.

The new strategy goes like this, Alice wants to buy PINK meme coins, she knows from Twitter to set her slippage low. But hidden in the bushes an algorithm sees this and submits its own buy order. The algorithm’s order gets filled, pushing up the price. Sadly Alice’s order fails. Believing that “DOT is Pink” Alice is determined to buy her tokens. She submits another order and gets filled at the higher price. Practically speaking, if someone wants to buy X token now and is unable to, they are highly likely to still be in the market for that token. The forest folk know this.

Now, another random buy order gets submitted… what? We thought the attack was on and it is so why did the attacker not sell. This attacker is happy to wait. 5 minutes pass, another buy order is filled. Then all of a sudden a new actor comes along and submits a sell. The algorithm will now decide to sell Alice’s front run tokens. They’ll place their order once more in front of this new sell order and the attack has been completed.

In the ever-evolving landscape of the dark forest, the cunning and adaptable forest folk are constantly devising new strategies to maximise their profits. Like the shifting shadows and rustling leaves, their tactics are always in motion, adapting to the changing environment and the behaviour of their prey. As an investor or builder in the DeFi space, it is crucial to remain vigilant and aware of these ever-changing dynamics.

Polkadot’s MEV Landscape:

While Polkadot’s architecture differs from traditional MEV-enabled chains, it’s not immune to the challenges of MEV. Polkadot’s parachains block production is handled by a consortium of collators who collect parachain transactions from users and produce state transition proofs for Relay Chain validators. MEV searchers can still operate in this domain. Meaning the dark forest is alive and well on Polkadot, I just hope you won’t get lost in it as I have.

If you would like to read more content about Decentralised finance, crypto and MEV you can follow me on Twitter for more @OnlyDeFiGuy

0
@OnlyDeFiGuyPost author

Came for the future of finance, stayed for the MEV.

The Official Account Of WagMedia. Create 2 Earn media and content uoıʇnןos All welcome: http://discord.gg/YUXqjVXWtp

0 comments

The Official Account Of WagMedia. Create 2 Earn media and content uoıʇnןos All welcome: http://discord.gg/YUXqjVXWtp