top of page
Search

11th May 2023 > > MEV bots and how to neutralise them.

tl;dr

Memes, MEVs, and possibly one of the most useful tools I urge you to use.


Market Snap (at time of writing)








Market Wrap

The meme-frenzy around coins such as PEPE and GENSLR, upon which we have touched several times recently, has driven transaction fees ever higher. Owners of ETH, who have staked either directly, or through pools, or using liquid staking options (*), are now enjoying annualised yields approaching 9%. The kicker? The burn rate for ETH is at all-time highs. Stakers are increasing their bag of ETH whilst it is in deflationary mode. That looks tasty to me.


The CCC team is here to help if you want to get involved.


Occasional Series – the BBC is biased after all

Sir Robbie Gibb, BBC board member, “… ordered a news chief not to interrogate Vote Leave’s £350mm Brexit bus campaign …” (The Times 10th May 2023).


Regardless of your emotional state regarding Brexit, this is unacceptable.


Hard on the heels of losing a chairman who resigned due to his lack of impartiality, it is time that the BBC makes the case loudly and proudly that it needs to break free from the shackles of the TV license, so that it can truly represent the views of its staff and the audience it wishes to appeal to.


Will the government listen to the desires and needs of BBC employees? I guess we won’t find out for a general election or two.


Curious Cryptos’ Commentary – MEV (maximum extractable value) BOTs

The advent of AMMs (automated market makers) in DeFi (decentralised finance) protocols was rapidly followed by the creation of MEVs.


AMMs have many advantages, but equally some disadvantages.


The key disadvantage is that bereft as they are of any decision making process (as opposed to market makers in the TradFi world) the trade price of any asset versus any other asset is set according to a simple mathematical formula. This formula is often “x times y = k” where x and y refer to the coin in a liquidity pool and k is a constant, but there are many other variations in use.


As an interesting side point, crypto OG Vitalik Buterin wrote a piece published on an obscure website about AMMs several years before they became a thing. Without AMMs, DeFi cannot exist. The man is undoubtedly a genius of our times.


But back to the point.


A mathematical formula like the one above that is used to set prices will always lead to what is referred to as “slippage”. You can see slippage in action on a traditional centralised exchange for any asset, but it is normally referred to as the liquidity available with the stack of orders both bid-side and offer-side.


DeFi does not have an order book (or generally does not). Slippage depends upon the size of the order relative to the size of the pool. Unsurprisingly liquidity pools of just stablecoins have tiny slippage. Liquidity pools of low cap and new coins have high slippage. A good example of the latter are meme coins such as PEPE and GENSLR.


Yep, we are back there again.


MEVs work by examining the mempool to look for what are essentially arbitrage opportunities. The most common is known as a “sandwich” attack in which the BOT front-runs an interaction with a DeFi protocol and closes any residual position after the interaction. This is made possible by the inherent existence of slippage. The competitive advantage of MEVs is to pay higher fees to get ahead of the original trade in the ordering of the block.


In February this year a new, very effective MEV bot was put to work.


Transactions from this bot now appear in 60% of all ETH blocks. It is estimated that with revenues of $40mm and fees of $34mm this bot has rewarded its creator with $6mm net profit in just three months.


The winners here are the validators (that’s you and me if you stake ETH – see market commentary above) and the owner of the bot. The losers are users of DeFi.


Though perfectly legal, and working in accordance with the code, this is not ideal in the round for DeFi.


But I have stumbled across a solution.


h/t to The Milk Road for this one, which is just one of the best crypto newsletters out there:



Flashbots (https://www.flashbots.net/) describes itself as “ …a research and development organization formed to mitigate the negative externalities posed by Maximal Extractable Value (MEV) to stateful blockchains … ”.


If you are a MetaMask user (preferably secured with a Ledger Nano X) you can easily install an RPC (remote procedure call) that facilitates two incredibly useful functions:


i) Prevents any trade of yours with a DeFi protocol from being front-run by an MEV bot.


ii) Stops you having to pay fees for failed transactions.


If you like the sound of that – and who wouldn’t – head on over to your MetaMask wallet and click on the network shown at the top of the dialog box. Scroll down and hit “Add network”, then “Add network manually”.


Input the following information and then you are good to go:


Name: Whatever name you choose. I suggest “MEV bot RPC” or similar.

Chain ID : 1 (the same as ETH)

Symbol: ETH


Easy peasy, lemon squeezy, but as always when using DeFi, a few trades of small amounts using a burner wallet when testing new functionality is the only sensible course of action.


(*) The CCC covered staking options in a series of six articles during November and December last year. Back copies are available on request or at https://www.curiouscryptos.com/blog.


9 views0 comments

Recent Posts

See All

Comments


bottom of page