Skip to content
Reading depth

Each view includes the earlier layers; the complete engineer or auditor page is shown by default.

Arbitrage trades related markets when their executable prices differ enough to cover fees, gas, latency, financing, and execution risk.

Opposed arrows category cue

Arbitrage trades a price difference only when the executable proceeds can exceed every acquisition, trading, financing, gas, latency, and failure cost.

Markets form prices separately. Arbitrageurs connect them by buying where an asset is cheaper and selling where it is more expensive. Their trades help move quotes toward one another, but alignment is not instantaneous or free.

Cross-venue arbitrage is the direct analogy. Blockchain execution adds public pending transactions, atomic composition, flash liquidity, reverts, gas auctions, block-building competition, chain finality, and sometimes bridges. Those mechanics can reduce one risk while creating another.

  1. An external market price changes while the AMM still quotes from its existing reserve state.
  2. An arbitrageur compares executable prices and every trading, gas, financing, latency, and failure cost.
  3. When the difference remains positive, the arbitrageur trades against the AMM and the offsetting venue.
  4. The pool’s inventory and marginal price move as the AMM leg settles.
  5. The executable difference shrinks until another trade is unprofitable or unavailable.

The pool does not receive the external price as information. It changes because traders move its state. The LP side of the correction is an inventory transfer, which can create adverse-selection cost even when the pool also earns a fee.

The arbitrageur trades assets on at least two related venues. LPs or makers take the other side. Validators, sequencers, and block builders affect ordering. Lenders can supply temporary capital. Atomic flash borrowing creates an obligation that must be repaid before the transaction ends; non-atomic strategies leave inventory and settlement exposure between legs.

netProfit
= saleProceeds
- purchaseCost
- tradingFees
- gasCost
- financingCost
- executionLosses

All terms must use one valuation unit and a consistent time. A quoted spread is not profit. Token transfer behavior, decimals, reverted attempts, hedging, bridge fees, and inventory left after partial execution also belong in the ledger.

Capital flow moves purchase assets, sale proceeds, fees, gas, financing, and any residual inventory across the strategy’s legs. Claim flow records temporary borrowing, unsettled orders, bridge or venue receivables, and any obligation left by partial execution. Return flow is the net executable price difference transferred from counterparties or pool inventory after every cost. Risk flow reaches the arbitrageur through failed, delayed, reordered, or adverse legs and can reach LPs, makers, lenders, or connected protocols through the trades that do settle.

Arbitrage profit comes from counterparties executing at different prices. In an AMM correction, part can be transferred from pool inventory relative to a better-informed or continuously rebalanced benchmark. Fees return some value to LPs. A losing arbitrageur absorbs gas, adverse movement, and failed-leg costs; lenders are repaid only under their contract’s settlement rules.

Test atomic repayment, profit checks after every fee, price and decimal normalization, callbacks, reentrancy, allowance scope, route identity, minimum outputs, deadlines, partial fills, reorgs, stale data, and failure on each leg. Do not encode “arbitrage will fix it” as a synchronous invariant: capital, inclusion, external liquidity, and profit must all be available.

The research paper Automated Market Making and Loss-Versus-Rebalancing formalizes stale-price adverse selection from the LP perspective. The paper’s model is not identical to every realized pool outcome and LVR is not a synonym for the simpler impermanent-loss benchmark.

  • “A price difference is risk-free profit.” Only executable, cost-adjusted, successfully settled differences count.
  • “Arbitrage gives an AMM an oracle.” Trades update state; correction can be delayed, incomplete, or manipulated.
  • “Price alignment benefits everyone equally.” It improves consistency while allocating fees, inventory changes, and adverse-selection costs across actors.

Next examine the LP benchmark in impermanent loss.

Machine-readable model

Key equations

Canonical expressions come from the structured concept record. KaTeX renders the notation, while the plain-text expression and variable table keep its meaning and units inspectable without JavaScript. Read the narrative above for the model's domain, assumptions, and rounding rules.

  1. Equation 1

    Plain-text equation: netProfit = saleProceeds - purchaseCost - tradingFees - gasCost - financingCost - losses

Assurance contract

Security properties

These structured statements define desired behavior. Their stable IDs can bind tests, invariants, specifications, audit findings, or proof results without turning descriptive review advice into an assurance claim.

Desired · not evaluated: No test, audit, or proof result is implied until scoped evidence is linked to this property.

  1. Atomic strategies revert without leaving an unpaid loan or unintended partial position

  2. Profit checks include every asset flow, fee, gas payment, repayment, and rounding effect

  3. Non-atomic strategies bound inventory, latency, counterparty, and settlement exposure explicitly

  4. Arbitrage-dependent protocols do not assume correction is immediate, free, or always available

Knowledge check

Quiz

Answer in your own words, then open the model answer.

What problem does Arbitrage exist to address?

Model answer

Arbitrage links otherwise separate venues and helps move quoted prices toward one another while rewarding the trader who bears execution costs and risk.