How to Create a MEV Bot: From Mempool to First Bundle
By Merunas Grincalaitis (X · GitHub · DEV · Hashnode · Telegram), Founder & Lead MEV Engineer at MEV DAO — Ethereum smart contract, Flashbots & MEV builder since 2017. Last updated: October 2026.
TL;DR: Learning how to create a mev bot on Ethereum in 2026 requires four concrete components—not a copy-pasted YouTube Remix script: (1) a low-latency Ethereum execution client (Reth or Geth) or orderflow stream (MEV-Share), (2) an off-chain searcher engine in Rust, Go, or TypeScript that spots price dislocations or liquidations, (3) an on-chain Solidity executor contract that borrows capital via flash swaps and enforces require(profit > bribe), and (4) a multi-builder eth_sendBundle broadcaster. Below is the complete starter roadmap from your first local Anvil fork to landing your first mainnet bundle.
Part of the Custom MEV Bot Architecture, Arbitrage, Liquidations & Hiring Topic Cluster: Start with our Pillar Guide, Custom MEV Bot Development: What to Know Before You Hire, for the complete architectural blueprint. This guide focuses specifically on how to create a mev bot with production Ethereum mainnet parameters and runnable verification steps.
Every day, aspiring developers search how to create a mev bot, how do i create a mev bot, or how to create your own crypto trading bot—and land on a trap. Half of the search results are YouTube scam videos telling you to paste obfuscated Solidity into Remix and deposit 1 ETH (which immediately steals your funds), and the other half are 2021 tutorials using web3.py over a free Infura HTTP endpoint that hasn't won a competitive trade in four years.
Real mev bot development is pure systems engineering. I have built and deployed production MEV searchers, liquidation engines, and launch snipers across Ethereum mainnet. Below is the honest, step-by-step architecture for how to make a crypto bot that actually works in 2026, what the stack costs to run, and a realistic answer to is crypto arbitrage still profitable for solo builders.
The 4-layer architecture of a real Ethereum MEV bot
Before writing a single line of code, understand this core separation: an MEV bot is NEVER just a Solidity smart contract. Smart contracts on Ethereum cannot wake up on their own, cannot monitor the mempool, and cannot decide when to submit a transaction.
Every real bot for crypto trading or MEV extraction consists of two halves: an Off-Chain Searcher Brain (running 24/7 on your Linux server) and an On-Chain Solidity Executor (deployed on Ethereum mainnet).
| Architecture Layer | What It Does | 2026 Recommended Tech Stack | Beginner Mistake to Avoid |
|---|---|---|---|
| 1. Data Ingestion Layer | Streams pending mempool transactions, new blocks, and private OFA hints (MEV-Share / MEV Blocker) |
Local Reth or Geth node (IPC/WS) + Flashbots mev-share SSE stream |
Polling a free public Infura/Alchemy HTTP URL every 2 seconds |
| 2. Opportunity Detection & Sim | Decodes calldata, updates local AMM pool reserves in memory, and simulates candidate bundles | Rust (Alloy, revm, Artemis) or TypeScript/Foundry (viem, Anvil) |
Sending un-simulated transactions on-chain and burning gas on reverts |
| 3. On-Chain Executor Contract | Executes atomic flash swaps, multi-hop DEX trades, or liquidations; pays block.coinbase only if profitable |
Solidity (0.8.26+) or Yul/Huff with onlyOwner and custom errors |
Storing funds in an unverified "Remix bot" or leaving callbacks unprotected |
| 4. Multi-Builder Broadcaster | Signs and dispatches eth_sendBundle / mev_sendBundle payloads simultaneously to top builders |
Parallel HTTPS RPC client to Titan, Beaverbuild, Rsync, and Flashbots | Submitting only to relay.flashbots.net and missing 75% of Ethereum blocks |
For an in-depth look at the production Rust stack, read Rust MEV Bot in 2026: The Alloy, Reth & Artemis Stack and review our Best Open-Source MEV Bot Repos on GitHub.
Step-by-step: How to create a MEV bot from scratch
If you are asking how do i create a mev bot and want to go from zero to your first working mainnet bundle in two weeks, follow this exact five-step progression.
Step 1: Pick ONE narrow strategy (do not start with WETH/USDC top-of-block arb)
The biggest reason beginners fail at cryptocurrency trading bot development is trying to compete with Wintermute and SCP on top-of-block WETH/USDC CEX-DEX arbitrage. Instead, pick a structural niche where smart contract engineering beats raw fiber-optic latency:
- Atomic DEX Backrunning (
mev-share backrun+ long-tail ERC-20 pools): Backrunning large swaps across Uniswap V2, V3, V4, and Curve where a token trades on 2+ pools. - Lending Protocol Liquidations: Monitoring underwater positions on Aave V3, Morpho Blue, Euler v2, or Spark and backrunning Chainlink oracle updates (see How Liquidation Bots Work on Aave).
- Block-0 Token Launch Sniping: Bundling same-block buys behind
addLiquidityETHwith automated honeypot simulation (see How Ethereum Sniper Bots Work).
Step 2: Write your minimal Solidity flash-swap executor contract
Your on-chain contract should hold almost zero passive capital. Instead, it borrows the trade size via a Uniswap V3 flash swap or Balancer flash loan (0% fee), executes the two legs of the trade, repays the loan, checks that net profit exceeds your builder tip, and pays block.coinbase:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
interface IWETH is IERC20 {
function withdraw(uint256) external;
}
contract MinimalBackrunExecutor {
address public immutable owner;
IWETH private constant WETH = IWETH(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
error NotOwner();
error Unprofitable(uint256 wethAfter, uint256 wethBefore);
constructor() {
owner = msg.sender;
}
function executeBackrun(
address targetPoolA,
bytes calldata swapDataA,
address targetPoolB,
bytes calldata swapDataB,
uint256 minNetProfitWei,
uint256 coinbaseBribeWei
) external payable {
if (msg.sender != owner) revert NotOwner();
uint256 balanceBefore = WETH.balanceOf(address(this));
(bool okA, ) = targetPoolA.call(swapDataA);
require(okA, "Leg A failed");
(bool okB, ) = targetPoolB.call(swapDataB);
require(okB, "Leg B failed");
uint256 balanceAfter = WETH.balanceOf(address(this));
if (balanceAfter < balanceBefore + minNetProfitWei + coinbaseBribeWei) {
revert Unprofitable(balanceAfter, balanceBefore);
}
if (coinbaseBribeWei > 0) {
WETH.withdraw(coinbaseBribeWei);
(bool paid, ) = block.coinbase.call{value: coinbaseBribeWei}("");
require(paid, "Bribe failed");
}
}
receive() external payable {}
}
We publish complete, audited reference contracts in our open-source mev-arbitrage-and-liquidation-reference GitHub repository.
Step 3: Test everything on a local Foundry Anvil mainnet fork first
Never debug a new bot with real ETH on mainnet. Spin up a local fork pinned to a real historical Ethereum block where a large whale swap occurred:
anvil --fork-url https://eth-mainnet.g.alchemy.com/v2/$ALCHEMY_KEY --fork-block-number 21000000
Replay the target transaction, run your executor contract right after it, and verify your gas usage and net profit down to the wei. Follow our step-by-step tutorial in How to Test an MEV Bot on a Mainnet Fork with Anvil.
Step 4: Simulate with eth_callBundle and broadcast to all major builders
Once your Anvil tests pass, hook your off-chain script up to eth_callBundle to simulate [targetTxHash, yourSignedBackrunTx] against the live pending block. Whenever eth_callBundle returns a positive net profit and zero reverts, fan your eth_sendBundle request out in parallel to:
https://rpc.titanbuilder.xyzhttps://rpc.beaverbuild.orghttps://rsync-builder.xyzhttps://relay.flashbots.net
Read our full troubleshooting checklist in Flashbots Bundles Explained: How to Send eth_sendBundle and Why Yours Isn't Landing and Simulate a Flashbots Bundle With eth_callBundle.
Is crypto arbitrage still profitable in 2026?
Let's answer is crypto arbitrage still profitable with real numbers rather than hype:
- Naive 2-pool Uniswap V2
WETH/USDCarbitrage via a public RPC: No ($0/month). Hundreds of existing bots with local Reth nodes and Yul assembly contracts will beat a beginner script 100% of the time on major blue-chip pairs. - Long-tail token backruns, Uniswap V4 hook pools, cross-protocol liquidations, and launch sniping: Yes ($2,000 to $50,000+/month for well-engineered bots). Every week, hundreds of new ERC-20 pools, custom Uniswap V4 hooks, and niche lending markets launch on Ethereum where generalized institutional bots have not written custom adapters yet.
- Why builder bribes compress margins: In competitive auctions, searchers bid 80%–92% of the gross arbitrage profit to the block builder (
block.coinbase) to win the bundle slot. That means your edge comes from discovering routes other bots miss (so you only need to bid 20%–50%) or writing lower-gas Solidity so your bundle pays a higher effective gas price per unit of gas.
For a deeper breakdown of revenue vs. builder fees, read How to Build a Profitable MEV Arbitrage Bot.
DIY vs. Hiring an MEV bot development company
Should you spend 3 to 6 months building your own infrastructure, or work with a specialized mev bot development company / crypto trading bot development company?
- Build it yourself if: You are a Rust, Go, or Solidity engineer who enjoys low-level EVM debugging and wants to iterate on custom strategies full-time.
- Use an existing battle-tested execution bot if: Your goal is profitable token launch sniping rather than writing Reth indexers from scratch—start with the MEV DAO Ethereum Sniper Bot.
- Hire a custom MEV engineer if: You have capital and a specific strategy (custom arbitrage, market making, Polymarket cross-venue execution, or protocol liquidations) and want full source-code ownership without months of R&D. Check our guide on MEV Bot Development Cost: Custom Pricing in 2026 and our Custom MEV Bot Development service.
Frequently asked questions
How do I create a MEV bot on Ethereum as a beginner?
Start by cloning an open-source reference repository (such as MEV DAO's mev-arbitrage-and-liquidation-reference), installing Foundry (forge and anvil), and writing a Solidity executor contract that performs a two-pool flash swap on a local mainnet fork. Once your local simulation is profitable, connect a Rust (Alloy) or TypeScript (viem) listener to stream pending transactions and submit bundles via eth_callBundle and eth_sendBundle.
Can I create a MEV bot using only Remix and ChatGPT?
No. Any video or tutorial claiming you can create a passive-income MEV bot solely by deploying a ChatGPT script in Remix (remix.ethereum.org) and sending ETH to it is a wallet-draining scam. Real MEV bots require an off-chain server monitoring pending transactions and submitting signed bundles to block builders.
Is crypto arbitrage still profitable on Ethereum in 2026?
Yes, but not on simple blue-chip pairs using public RPCs. Profitable arbitrage in 2026 comes from backrunning long-tail ERC-20 tokens across multi-hop paths, integrating MEV-Share and MEV Blocker orderflow auctions, arbitraging newly launched Uniswap V4 hook pools, and combining arbitrage with protocol liquidations.
How much does it cost to build and run your own MEV bot?
If you write the code yourself, server and node costs run roughly $150–$400/month for a bare-metal Linux box running Reth + Lighthouse (or a low-latency dedicated RPC stream), plus 0.2–1.0 ETH in wallet working capital for builder bribes. Since flash loans supply the trade principal and unincluded Flashbots bundles cost zero gas, your ongoing burn rate is very low.
What should I look for in a legitimate MEV bot development company?
A legitimate mev bot development company or freelance searcher developer will deliver 100% open, un-obfuscated Solidity and Rust/TypeScript source code, demonstrate the bot working live on an Anvil mainnet fork before milestone release, and never ask you to deposit trading capital into a contract they control.
Related articles
- How to Build a Profitable MEV Arbitrage Bot
- How to Test an MEV Bot on a Mainnet Fork with Anvil
- Rust MEV Bot in 2026: The Alloy, Reth & Artemis Stack
- MEV Bot Development Cost: Custom Pricing in 2026
- Custom MEV Bot Development: Hire an Ethereum MEV Bot Developer
Want to hire an experienced Ethereum MEV engineer to architect your custom arbitrage, liquidation, or sniping system—or jump straight into our live tools? Visit our Custom MEV Bot Development page, start a 3-day trial at mevdao.org/subscribe, or message me directly on Telegram (@merunas).