Onchain Program
Overview of the SolanaMevBot onchain program and its V10 and V9 instructions
The onchain program takes in mints and pools, and will calculate the most optimal arbitrage trade between them and execute the trades.
If you want maximum flexibility, you can write your own bot and just call the onchain program from there. This allow you to do whatever customization you want but still utilize the onchain program to get maximum arb opportunity.
Demo bot: https://github.com/Cetipoo/solana-onchain-arbitrage-bot
- Program id:
MEViEnscUm6tsQRoGd9h6nLQaQspKj7DB2M5FwM3Xvz(Solscan) - Address lookup table:
4sKLJ1Qoudh8PJyqBeuKocYdsZvxTcRShUt9aKqwhgvC. It's recommended for both instructions as it has all the fixed keys needed.
Instructions
| Instruction | Opcode | Status | What it does |
|---|---|---|---|
| V10 | 61 | Current | Everything V9 does, plus bridge pools: arbitrage a token that has no deep pool against SOL or USDC by routing through a second token. |
| V9 (old) | 28 | Supported, unchanged | Arbitrage one target token directly against SOL or USDC. |
New integrations should use V10. V9 keeps working and existing integrations do not need to migrate.
Supported DEX
Both instructions support Raydium, Raydium CPMM, Raydium CLMM, Pumpfun Swap, Meteora DLMM, Meteora Dynamic Pool, Meteora DAMM V2, Orca Whirlpool, Pancake Swap and Byreal.
Humidifi, Vertigo, Heaven Dex and Futarchy are only supported by V9. In V10, each of the ten DEXes above works in every pool role, so all four hops of a route can use any of them. See DEX requirements for the pools each DEX accepts.
What changes in V10
- Routes: V9 only runs
S → X → S. V10 also considersS → T → B → SandS → B → T → Sthrough a bridge token, plus SOL ↔ USDC variants of up to four hops with an explicit conversion pool. - Pool roles: instead of one flat pool list per DEX, V10 pools are grouped as intermediate, bridge or direct. Direct-only groups behave like V9.
- Compute unit limit: required in the instruction data, between 1 and 1_400_000.
- Trade size: always present at offset 16,
0means automatic sizing. - Account counts: the number of accounts for each pool is given explicitly in the instruction data.
The per-pool key sets are the same in both versions. See Differences from V9 at a glance for the full comparison.