The MEV Bot Scams On YouTube
If you find a video like this on YouTube, it’s a scam
Here’s the 30-second version of my blog post: If you find a promoted video on YouTube with a title like “MEV Slippage Bot,” “Earn $1000 A Day With MEV bot ChatGPT,” or “Introduction of ChatGPT in MEV Bot | Generate 1.16 ETH,” then you probably stumbled on a scam. You probably knew this was a scam. AI-generated videos that promise returns over $1000 a day are generally not trustworthy.
That being said, this looked to me like a good window into the evolving world of cryptocurrency. The video is the perfect cocktail of cryptocurrency gone wrong, AI gone wrong, and the YouTube algorithm gone wrong. I know very little about Ethereum, Web3, and Solidity, other than the small bit of research I did to write this, but I want to learn more. It also combines three wonderful things: Trading, bots, and coding.
The Scam
I found this particular bit of code from a Reddit thread, but the video itself has been taken down due to a copyright strike. We can’t seem to stop them. Anytime one of them gets taken out, 50 identical ones appear…and all of them are apparently getting past YouTube’s vetting process.
According to one user, this code simply transfers your funds to a scammer’s address. That’s it. I found it pretty neat that someone who codes was able to identify suspicious activity and then use that information to warn people who do not code. Before the video was taken down I had the opportunity to look myself, but I am not familiar with the programming language and came away with questions.
For example, on line 29 is a function called frontRun. How does it front run? If you trace the functions in the full file (which is only 305 lines of code), it looks like something is missing…the important call is to swap, in the DexInterface contract, but all swap apparently does is make a call to swapTokensForExactTokens…and that function, in turn, is just a one-liner that provides a memory amount.
It looks like the file you would have as a driver in a large codebase, but the original video instructs you to use this code and only this code.
If MinimalGravitas is right about the spirit of the scam, then nothing really matters except this:
The code uses getDexRouter to obfuscate a call to get the scammer’s address. When you run this it transfers your fund to the scammer irreversibly. The rest is just dummy code.
What The Video Claims This Code Does
The video claims this is ChatGPT-generated code that creates transactions with slippage. It searches for transactions, then executes them at a higher price. To run it you need a minimum of 0.5 Ethereum (at the time of writing this, that translates to $1700), but the more you put in the more profit you will make. The video claims that by using this code you will obtain 1.3 Ethereum every day.
What This Code Actually Does
Someone named Dean Alma described his experience actually running one of these. The Start button sends your Ethereum to the scammer, the withdrawal button does nothing and gets stuck, and the other buttons do nothing.
That is the closest I want to get to actually running the code.
Wider Context
Using Dean Alma’s video as a point of reference, I can get a better idea what this code probably does (though I would have to actually run it to be sure). I start by pressing a button called “Start.” That calls a function called StartNative, which simply calls a function called startArbitrageNative.
I then call getDexRouter, which gets me the address of a scammer. Then I just…transfer my money. That is really all there is to it. From there I can use withdrawal, which looks like it might work, but there would be no point. My money is gone.
The frontRun function definitely looks like it is never being called anywhere.
MEV, or Maximal Extracable Value, is a real thing that you can read about on Ethereum’s official website.
Maximal extractable value was first applied in the context of proof-of-work, and initially referred to as “miner extractable value”. This is because in proof-of-work, miners control transaction inclusion, exclusion, and ordering. However, since the transition to proof-of-stake via The Merge validators have been responsible for these roles, and mining is no longer part of the Ethereum protocol. The value extraction methods still exist, though, so the term “Maximal extractable value” is now used instead.
— Source
MEV leads to something called sandwich trading, which that same page explains here:
Sandwich trading is another common method of MEV extraction.
To sandwich, a searcher will watch the mempool for large DEX trades. For instance, suppose someone wants to buy 10,000 UNI with DAI on Uniswap. A trade of this magnitude will have a meaningful effect on the UNI/DAI pair, potentially significantly raising the price of UNI relative to DAI.
A searcher can calculate the approximate price effect of this large trade on the UNI/DAI pair and execute an optimal buy order immediately before the large trade, buying UNI cheaply, then execute a sell order immediately after the large trade, selling it for the higher price caused by the large order.
The page goes on to state that MEV is not necessarily bad, but sandwich trading results in worse experiences for users. This whole thing seems reminiscent of flash trading, but nothing in the scam code looks like it is actually doing what the video claims.
I can just imagine the commenters I will get for writing that.
“No way, really? Tell me more. May you enlighten us by dropping more shocking surprises to amaze and inspire.”
Closing Thoughts
Researching this is a little bit hard. Searching for information about MEV bots yields identical versions of the scam, sometimes even on Medium itself. In fact, by even using these keywords, it is possible that my comments section will be targeted by scammers, and the post itself could be misidentified as a scam. I hope this does not happen, as it is supposed to be an anti-scam. But the scam video itself cautions against scammers in its first sentence, so the video is scam posing as anti-scam, and this post is meant to be anti-scam.
The Ethereum site itself is a trustworthy resource, as is the official Solidity documentation. Ethereum itself is perhaps a topic for another day. I had thought of using this post as an opportunity to talk about the pros and cons of a potentially decentralized Internet, cryptocurrency, and NFTs, but it was long enough as it was.
Full code but with exact addresses removed: