Three kinds of arbitrage, one route graph
Scroll through the chapters and the graph redraws the route. Each price is the total, so you can start with the first and add a chapter later for the difference.
Cross-DEX · $500
USDC to SOL on Orca, then SOL to USDC on Raydium, in one transaction.
Illustration with invented pools. Not market data.
Cross-DEX arbitrage
Cross-DEX arbitrage buys a token where it is cheaper and sells it where it is dearer, across two pools on Solana.
- How the bot finds it
- It keeps the state of the pools on your pair list from Yellowstone gRPC account updates, so it compares prices as the validator sees them instead of asking an API.
- How it checks it
- It adds up both legs after pool fees, the priority fee and the tip. A route is sent only if what is left clears the minimum net you set.
- How it sends it
- Both legs go in one transaction, so if the second price has moved the transaction fails instead of leaving you holding the first leg. The bot simulates first and can send through a Jito bundle.
- What you configure
- Pairs, venues, minimum net, maximum position, slippage and tip policy.
Two venues, a fixed pair list, the net threshold, simulation before every send and a ledger of every decision.
Triangular arbitrage
Triangular arbitrage chains three swaps through three tokens and ends in the token it started with, so a price gap anywhere on the cycle can pay.
- How the bot finds it
- It builds a graph of the pools for the tokens you list and searches it for cycles, re-scoring only the edges whose pool state changed.
- How it checks it
- Every cycle is scored the same way: all three pool fees, the priority fee and the tip, against your minimum net.
- How it sends it
- Three legs in one transaction. If any leg’s price has moved, the whole transaction fails, and the bot has simulated it before sending.
- What you configure
- The token set, the venues for each token, the longest cycle, the minimum net and the position cap.
Adds three-leg routing and the cycle search across your token set.
Flash-loan arbitrage
Flash-loan arbitrage borrows the starting amount inside the same transaction, runs the legs, and repays the loan before the transaction ends, so you do not need the capital up front.
- How the bot finds it
- The same search as triangular arbitrage, with the borrow and the repay wrapped around the route using a lending protocol’s flash-loan instruction.
- How it checks it
- The borrow fee is added to the cost, and the route must still clear your minimum net after it.
- How it sends it
- Borrow, trade and repay are one transaction. If the route cannot repay, the whole transaction fails and the loan never happened. A second round of simulation and size caps apply.
- What you configure
- Which protocol to borrow from, the largest loan, and the minimum net after the borrow fee.
Adds the borrow-and-repay wrapper, a second layer of simulation and size caps.