Skip to main content
PropAMMVenue merges every maker’s ladder, best price first. Integrate it like a pool. No API, no signatures, no per-trade requests. The venue implements the IPropAMM pool interface and its IPropAMMFillable extension.
1

Discover pairs

Re-read getPairs() on PairAdded.
2

Quote

All four are view functions; call them with eth_call. Segment output is floor(take * price / 1e18). Per-block caps and each maker’s payable inventory are already applied in all four, so the venue quotes only what makers can pay. A splitting router can size the venue with one quoteFillable call and send fillableAmountIn.
3

Swap

Push payment: transfer exactly amountIn to the venue, then call swap in the same transaction.
quote does not include your fee: with swapWithFee the recipient receives quote - quote * extraFeePpm / 1e6. A short push reverts. An over-push stays in the venue.
4

Refresh

Ladders can reprice every block, and per-block caps reset each block. Re-read each block, or on AnchorCommitted, LadderCommitted, OffsetsCommitted, ControlsCommitted, MMFillExecuted and MakerPaused from the executor 0x0000006f9bBA066e4efda2e0CAbE4FF8cf9030aC. An AnchorCommitted reprices both directions of its pair.

Fees

When either fee is non-zero the venue also emits FeesTaken(uint256 protocolFee, address feeRecipient, uint256 routerFee, address feeReceiver), topic0 0x2e155316dd41148f34c353563f59940c4496861ec9264f7b97847857203340a5. Both fees come from the taker’s output; the maker’s price is not changed.

Reverts

Events

Each swap emits Swapped, then PropAMMSwap, for the same trade and the same amounts. Index one of them. Do not add them together.

Selectors

Test on Base Sepolia

Pairs: MockWETH/MockUSDC, MockDAI/MockUSDC. Anyone can call mint(address,uint256).