fermi swap can fill an Ethereum token swap from a market maker’s inventory when the pair is active, the maker quotes the requested size, and execution meets your minimum output. For an integration, discover the pair, obtain a fresh quote, submit an exact input swap with a price floor, then check the receipt for the amount and venue that actually filled.

  • Check the token contracts, trade direction, and executable size for each market.
  • Quote against streamed maker state; ordinary onchain state can lag the price available at inclusion.
  • Set a minimum output and deadline, then verify the settled result.

Supported Markets Depend on the Pair and Trade Size

FermiSwap is a proprietary AMM on Ethereum: one market maker prices trades and fills them from its own inventory. It is closer to a dealer quoting from its stock than to a pool whose price follows a fixed reserve formula. A listed pair tells you which assets may trade; it does not promise a fill in both directions at every size.

Observed markets include the following pairs, using Ethereum token contracts rather than ticker strings as integration identifiers:

  • WETH/USDC
  • WETH/USDT
  • USDC/USDT
  • cbBTC/USDC

For discovery, read the venue’s getPairs() result, which includes inactive pairs, then check isActive(tokenIn, tokenOut) for the direction you intend to trade. Finally, request a quote for the actual amountIn. Inventory, pricing limits, or a temporarily inactive side can make a supported pair unfillable at that size; a small test quote cannot establish capacity for a larger order.

Fresh Quotes Depend on Builder State

A useful quote reflects the maker’s latest streamed price and inventory state, which can update several times within an Ethereum block. A plain eth_call against settled chain state can therefore miss liquidity that a builder will apply while constructing the next block. For fermi swap, use a quote source that applies the current state override, or simulate with the stream’s state and block overrides through an RPC that supports them.

The LambdaClass PropAMM Router SDK is one example of an integration path: its quote returns amountOut and the venue that supplied it. Restrict the quote to the Fermi venue if your application needs its price specifically. Otherwise, a router quote may describe a different venue, so keep the venue address alongside the quoted amount rather than treating the number as a Fermi fill.

Quote the user’s exact input in atomic units and set the floor from the resulting output. Say 1 WETH quotes 2,700 USDC; with a 50 basis point tolerance, amountOutMin is 2,686.50 USDC, or 2,686,500,000 units for a six decimal token. That 0.5% is an illustrative tolerance, not a venue fee: tighter floors reduce adverse execution but raise the chance of a revert when the maker reprices.

A Swap Needs a Floor, Deadline, and Allowance

An exact input swap specifies tokenIn, tokenOut, amountIn, amountOutMin, recipient, and a Unix timestamp deadline. Approve the contract that will pull the input token for at least amountIn; using the router means approving its spender address. For native ETH through a router that supports it, use its ETH sentinel and attach the input as transaction value instead of granting an ERC-20 allowance.

FermiSwap quotes are indications until the transaction executes against the state available in its block. fermi swap fills from the maker’s inventory only when its execution price clears the caller’s minimum; a stale price or depleted inventory can prevent that fill. At inclusion, the builder applies a fresh maker update before the swap, so simulate with current overrides before sending, while treating the minimum output as the enforceable protection.

A deadline around five minutes is a practical example for an interactive swap; shorten it for a time sensitive strategy. When using a router, passing one venue confines its initial selection to that venue, but a configured conventional AMM fallback may still execute if the maker cannot fill. If the trade must settle specifically against Fermi inventory, check the router’s fallback behavior and the executed venue before treating a successful transaction as a Fermi trade.

The Receipt Determines the Cost and Result

The settled receipt gives the input spent, output delivered, recipient, and executed venue. Compare the received output with amountOutMin and record the venue for attribution. A successful router transaction alone does not prove which market maker supplied liquidity, particularly when a fallback path was available.

The economic cost is the quoted spread and size dependent price, plus Ethereum gas and any fee your integration adds. The router itself need not charge a swap fee; an optional frontend fee can be taken from output, so calculate the minimum against the net amount the recipient must receive. Budget gas for the execution branch that could run: quoting several venues onchain or taking a fallback can cost more gas than a direct single venue fill.

You end with a usable integration when pair discovery, fresh quoting, execution constraints, and receipt checks agree for the same token addresses and size. Decide differently when the pair is inactive, the requested size has no executable quote, or another allowed route gives a better net output after gas and fees within your fill requirements.