DEV Community

Cover image for Fake AI trading bot tutorials: the victim deploys the drainer
cryptostrapon
cryptostrapon

Posted on AI-assisted

Fake AI trading bot tutorials: the victim deploys the drainer

The video is calm and well edited. "Claude-assisted arbitrage bot, no coding needed." Open a browser IDE, paste the contract, deploy it from your own wallet, fund it with 1 or 2 ETH of "liquidity", press Start.

The contract you deploy is not the one on the screen.

In September 2026 TRM Labs published its analysis of a campaign built on nine near-identical YouTube tutorials. It linked 234 contracts deployed by 224 victim wallets to six operator collection addresses, and attributes 274.60 ETH (about $517,205) to those addresses between February 12 and August 11 (TRM Labs). A year earlier SentinelLabs documented a similar operation that used the real Remix with malicious source code, hiding the attacker's address with XOR and string tricks; one attacker address they linked to a video had received 244.9 ETH (SentinelLabs).

This is a nice scam from the attacker's point of view: the wallet shows an ordinary contract deployment, not a suspicious approval. Every security habit people have about "do not sign weird things" passes.

Three identities that must match

Any time you deploy code that will hold money, there are three versions of it:

  1. The script: the source you read on screen.
  2. The compiler: the tool that turns it into bytecode. In TRM's "fake compiler" variant, a background script throws away the code you see and fetches a different contract from the operator's server.
  3. The deployment: the bytecode the network actually received. Only this one controls the funds.

If 1 and 3 do not match, nothing you read matters.

Check the deployed bytecode against your own compile

Compile the source yourself with the official compiler (npm solc, Foundry or Hardhat), then compare with what is on chain. Solidity appends a CBOR metadata block to the runtime bytecode, and its length is in the last two bytes. Strip it before comparing, because it changes with things like file paths.

import { ethers } from "ethers";

function stripMetadata(hex) {
  const code = hex.startsWith("0x") ? hex.slice(2) : hex;
  if (code.length < 4) return code;
  const metaLen = parseInt(code.slice(-4), 16);        // CBOR length in bytes
  const cut = (metaLen + 2) * 2;                      // + the 2 length bytes, in hex chars
  return cut < code.length ? code.slice(0, -cut) : code;
}

// localRuntime: deployedBytecode from your own compile of the source you read
export async function matchesSource(provider, address, localRuntime) {
  const onchain = await provider.getCode(address);
  if (onchain === "0x") return { ok: false, reason: "no contract at this address" };

  const a = stripMetadata(onchain).toLowerCase();
  const b = stripMetadata(localRuntime).toLowerCase();
  return a === b
    ? { ok: true }
    : { ok: false, reason: "deployed bytecode differs from the source you compiled" };
}
Enter fullscreen mode Exit fullscreen mode

Contracts with immutable variables embed their values in the runtime code, so for those you compare with the values masked or use the explorer's "verify and publish" flow, which does this properly. The rule stays the same: do not fund a contract until its deployed bytecode matches source you compiled yourself.

Read the money paths, not the button labels

Even with matching source, read where ETH can go. In the TRM variant, calling Start or Withdraw forwarded any balance above 0.05 ETH to the operator. The button label had nothing to do with the bytecode.

  • Follow every function that moves value: start, withdraw, receive, fallback.
  • Look for hardcoded address fragments, uint160 casts, XOR and string concatenation that build an address at runtime.
  • Ask where the trading logic is. A real arbitrage contract has venues, price quotes, slippage limits and failure handling. A contract that mostly accepts ETH and has a start() is a donation box.

Red flags in the tutorial itself

  • A fixed return, "1 ETH every 20 hours", or identical profits across several videos
  • "No coding needed", while you deploy unaudited Solidity from your own wallet
  • A compiler or IDE link in the description instead of the address you type yourself
  • "Fund first, inspect later"
  • A made up error like "gas nonce liquidity" asking for a second deposit. Ethereum has no such thing.

If you already funded one: stop interacting with it, ignore requests for more gas, save the video URL, contract address and transactions, move remaining assets to a fresh wallet if the same machine ran untrusted files, and report it.

Full case file: Fake AI trading bot scam: you deploy the drainer.


Question for you: when you deploy a contract from a tutorial or a template, do you ever check the deployed bytecode, or do you trust the IDE?

If this was useful, a star on npm-install-audit, our open source check for repos and code that attack developers, helps other people find it.

Written with AI assistance and fact checked by the CryptoStrapon team.

Top comments (0)