You are on page 1of 11

Ethereum is a Dark Forest

The concept of a “dark forest”


• An environment in which detection means certain death at the hands
of apex predators.
• In this environment, publicly identifying someone else’s location is as
good as directly destroying them. (This concept is also the inspiration
for the Dark Forest game on the Ethereum testnet.)
How Ethereum mempool works?
- What is a mempool?
• In Ethereum, a mempool is a waiting area for the transactions that haven't
been added to a block and are still unconfirmed
• Ethereum uses proof-of-stake (POS) mechanism. In this mechanism, validators
are chosen at random to create blocks and are responsible for checking and
confirming blocks they don't create
• To become a validator, an account must stake at least 32 ETH or 10000 BNB in
BSC.
Popular forms of apex predators in EVM
compatible chains
1. Arbitrage bots
• Cryptocurrency arbitrage is a method in which investors purchase a
cryptocurrency on one exchange and sell it for a better price on
another exchange.
2. Frontrunning bots
2.1. Sandwich bots
• Example:
1. Alice makes 1 tx:
• swap 10,000 BUSD for 100,000 THC (0.1$/THC) with gas price 5 at 19:00:00 (tx1)
2. Bob (bot) see Alice’s tx in mempool
3. Bob makes 2 txs:
• swaps 50,000 BUSD for 500,000 THC (0.1$/THC) with gas price 5.1 at 19:00:01 (tx2)
• sell 500,000 THC for xxx BUSD with gas price 5 19:00:02 (tx3)
• Validation order: tx2 -> tx1 -> tx3
- Because of higher gas price, tx2 gets validated first. Tx1 is submitted sooner than tx3
=> tx1 gets validated before tx3.
• Result: By sandwiching Alice’s tx, Alice had to buy THC for a higher price than
usual. Bob made some profit, Alice lost money.
2.2. Sniper bots
• Example:
1. Project A makes 1 tx:
• Add LP (list) XYZ token on PancakeSwap with gas price 5, listing price 0.01$/XYZ (tx1)
2. Bob (bot) sees this tx in mempool
3. Bob makes 1 tx:
• Swap 150,000 BUSD for xxx XYZ token with gas price 5 (tx2)
• Validation order: tx1 -> tx2 -> other investors transactions
• Result: Because Bob saw the Add LP tx in the mempool, he managed
to buy XYZ token at listing price
Solutions
1. Higher liquidity makes frontrunning and sniping bots harder to profit
2. Encrypt or hide mempool from being accessed
3. Some anti sniping bots methods:
• set a maximum limit that a wallet can buy tokens
• make a rule in the token’s contract that users can only buy after 20-30 minutes when the Add LP tx
is confirmed/validated
4. Binance will fine 10,000 BNB to any validator that cheats on their network

*Enigma Protocol:
• Enigma enables to create a safe and secret environment for traders while building a protocol
where users and workers nodes cannot see transactions in the network.
*Optimism, StarkWare
Self-defense
1. Set slippage as low as possible
2. Split large transactions to smaller ones
3. Use CEXes such as Binance, Gate.io

You might also like