Skip to main content
You need BopAMM API access to call authenticated endpoints and receive production support.
BopAMM (Block Oracle Priced AMM) is Bebop’s Ethereum execution primitive: a coordinated, oracle-priced AMM updated by participating market makers and built for best execution at size.

Contracts

BopAMM now has two Ethereum contracts: The core BopAmm contract is ERC-20 only. Native ETH is supported at the router boundary with the sentinel address 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE.

Swapping

There are two integration surfaces.

Direct Pool Integration

Use the core BopAmm contract when you are building a router, solver, or contract integration that can manage token movement itself.
swap is a push-payment entrypoint. The caller must transfer amountIn of tokenIn to BopAmm before calling swap, similar to how Uniswap-style pools consume tokens already sent to the pool. BopAmm does not pull the taker’s input with allowance on this path. swapWithCallback is a flash-style entrypoint. BopAmm delivers tokenOut first, then calls msg.sender.bopAmmSwapCallback(...); the callback must provide enough tokenIn before returning so maker payment can complete. Direct pool integration does not support native ETH and does not apply router fees.

Router Integration

Use BopAmmRouter for normal taker and integrator flows.
swapWithAllowance pulls ERC-20 input from msg.sender after the taker approves the router. For native ETH input, pass the native ETH sentinel as tokenIn and send msg.value == amountIn. For native ETH output, pass the sentinel as tokenOut; the router unwraps WETH and sends ETH to recipient. swapWithFallback first tries the BopAMM leg. If that leg reverts or cannot satisfy minAmountOut after fees, the router calls an allowlisted fallback adapter with pre-encoded Bebop RFQ calldata. See Falling back to RFQ.

Fees

BopAmmRouter supports integrator fees on successful BopAMM output. The router fee argument packs an integrator fee recipient and fee bps into a single uint256: The router charges the total fee before minAmountOut is checked. A configured percentage of that fee goes to the protocol, and the rest goes to the integrator recipient. Fallback output is not fee-charged by the BopAMM router. The /quote endpoint accepts fee and fee_recipient, packs them into the returned swapWithFallback calldata, and returns output amounts net of the BopAMM router fee. Custom router integrations can also pack the fee directly in calldata:
Both router functions accept an optional packed fee argument for integrator fees. See Fees.

Builder Support

Plain BopAMM settlement should be submitted through a builder that receives BopAMM updates. Current supported builders are:
  • Titan
  • BuilderNet
  • Quasar
  • Bombora
swapWithFallback can still settle through the fallback path when the BopAMM leg misses.

API Surface

Router quickstart

Quote, simulate, and submit a swapWithAllowance transaction.

Fees

Add optional integrator fees to BopAMM router swaps.

Request BopAMM access

Get API access and direct support from the Bebop team.