TALENTRE

Execution

Crypto arbitrage: calculate what a two-pool trade returns

Two paper order tickets passing through metal rollers beside the title Arbitrage

The useful number in crypto arbitrage is what returns to your starting asset after the complete route. A price gap leaves out order size, the sell leg and execution costs. For a Solana pool-to-pool trade, carry the buy output into the sell quote before counting a return.

In this article

Match the asset before comparing prices

Crypto arbitrage seeks to capture a price difference by buying and selling the same asset across markets. On Solana, a familiar ticker can appear on unrelated mints. Match the full mint address, network and quote currency before comparing two pools.

Use Talentre's Solana pool comparison to locate markets for the mint and compare their displayed price, liquidity and activity. Its comparable view uses token/WSOL pairs. Those figures help identify markets worth examining; the next step is obtaining quotes for your intended amount.

Keep each pool address with its observation time. The token mint identifies the asset, while the pool address identifies a market. A market's last reported price can persist after its useful liquidity has moved elsewhere. A token/USDC price also needs conversion before comparison with a token/SOL price.

Feed the buy output into the sell quote

Write the route in full: SOL → token through market A → SOL through market B. Evaluate it at one defined input amount:

  1. Obtain the first-leg quote and record the expected token amount received, including how its quoted charges are handled.
  2. Use that token amount as the input for the second-leg quote. Do not substitute the amount a chart price suggests you could buy.
  3. Record the SOL expected back, both route plans and the quote times.
  4. Compare the returned SOL with the starting SOL after accounting for additional costs.

An aggregator can split a swap across several pools. Inspect the route it actually proposes: two different interfaces may route through the same underlying market. Changing the website does not establish a second source of liquidity.

Subtract costs in the starting currency

Let A be the starting amount, B the second quote's returned amount and C the additional costs not already included in those outputs.

Estimated net result = B − A − C
Estimated net return on starting amount (%) = (B − A − C) ÷ A × 100

Use the same unit throughout. When the route starts in SOL, convert any separately charged dollar cost into SOL using the price used for that estimate. Include relevant network fees, tips and platform charges once. Check which fees the quotes already reflect.

Do not subtract a price-impact percentage again when the quote's output already incorporates it. Slippage tolerance is also not an automatic fee. It defines permitted execution movement. Our slippage and price-impact guide explains the fields to compare.

Repeat the calculation for a changed input size using fresh quotes on both legs. Multiplying a small order's result by a larger amount ignores how that amount changes the pools.

Check whether both quotes can coexist

Two individually valid quotes can describe a route that will not return their combined estimate. The first swap changes pool balances. If the second route touches those pools, a quote obtained before the first swap may use a state that no longer exists.

Record shared pool addresses across both route plans. For a proposed combined transaction, simulation must evaluate the complete instruction sequence against its resulting state, including the final balance condition. Two independent quote responses cannot do that job.

With separate swaps, the second leg faces the market after the first has landed. Its input must match the tokens actually received. An unfilled or failed sell leaves a token position, so record that inventory instead of treating the route as completed profit.

Separate atomic execution from a finished trade

Solana executes the instructions inside one transaction atomically: all succeed or their state changes revert. Transaction fees can still be charged on failure. Two swaps submitted as separate transactions do not inherit that shared outcome.

Atomic execution alone does not establish a profit. The transaction must enforce the intended final-output condition, and the accounting still needs costs charged outside that output.

For a completed route, retain its signatures, actual starting and ending amounts, separately charged costs and any remaining inventory. A positive quote estimate belongs in the research record; a realized result requires confirmed balance changes for the whole route.

Frequently asked questions

Does a price gap prove a crypto arbitrage opportunity?

No. Match the exact asset and compare amount-specific quotes for the full route. The sell output, fees and changing pool state determine whether the gap survives execution.

How do I calculate crypto arbitrage profit?

Subtract the starting amount and costs not already included from the final returned amount, all in one currency. Quote-based figures are estimates; actual profit requires confirmed results from every leg.

Can I arbitrage two pools on the same Solana DEX?

Separate pools can hold the same token, so a different DEX brand is not required. Check the exact pool addresses and route composition, including any liquidity shared between the two legs.

Do I need a crypto arbitrage bot?

You can compare markets and calculate routes without a bot. Automation affects how quickly quotes and instructions are processed; it does not make an otherwise unprofitable route profitable or guarantee a fill.

Is an atomic arbitrage transaction risk-free?

Atomicity prevents partial state changes within that transaction. It does not guarantee positive proceeds, prevent every implementation error or remove fees on a processed failure. Check the final-output condition and all charged costs.

What can I compare in Talentre?

Compare the displayed price, liquidity and activity of token/WSOL markets for one mint, with each pool identified separately. Then use execution quotes for the amount-specific buy and sell legs.

Questions or corrections? Contact the Talentre team.

← All articles