1
Deploy your provider
The provider is the contract that holds your inventory. Use the reference implementation as is: copy
IMMProvider.sol to src/interfaces/IMMProvider.sol and BasicMMProvider.sol to src/periphery/examples/BasicMMProvider.sol in a Foundry project, then:--interactive prompts for the deployer key. A provider must implement IMMProvider, including available(token), which reports how much of token it can pay out now; BasicMMProvider returns its balance. Details and custom contracts: Provider contract.2
Fund it
Inventory is the output token of each direction you quote:The executor caps your ladder to what
available reports, so the venue quotes only what the provider can pay.3
Register
Email support@biconomy.io:
Until registration the stream returns
UNREGISTERED_MARKET_MAKER. The stream also needs an API key from Biconomy.4
Stream your ladder
Connect to Each accepted message returns
wss://propamm-staging.biconomy.io/v1/ws with your API key in the x-api-key header, subscribe as your signer, and send a signed price-ladder per direction. Both mock tokens have 18 decimals, so 2,000 USDC per WETH is 2000e18 for WETH to USDC and 5e14 for USDC to WETH.{ "type": "ack" }. Send a new ladder with a higher nonce on every price change. Runnable client: Stream prices.5
Read your ladder back
After Biconomy commits it,
board() returns your levels with remaining equal to your top size, or less if the provider cannot pay that much:Empty arrays and
remaining == 0: not committed yet, expired, (Reprice) no live anchor for the pair, paused with setPaused, or the provider’s signer() is no longer $SIGNER. remaining == 0 with levels present: the ladder is fully filled, this block’s cap is used, or the provider holds no tokenOut. Check the acks and that expiresAt or the anchor’s ttl leaves time for the commit.6
Watch a fill
A fill calls
executeSwap on your provider and emits MMFillExecuted on the executor. board() then shows filled up and remaining down.Next
- Stream prices: Rewrite and Reprice, nonces and expiry, a runnable client.
- Risk and inventory: the four protections, how much a ladder can fill, how to stop.
- Mainnet: change the endpoint to
wss://propamm.biconomy.io/v1/ws, thechainIdand the token addresses. Contract addresses are the same, see Addresses.