Skip to main content
A solver fulfills intents on destination chains in exchange for the source-chain reward. This recipe walks through registration and the steady-state operating loop.

What you need to provide

See the API Reference for full request/response schemas.

1. Implement the V2 endpoints

Your /api/v2/quote handler:
  1. Parses the candidate intent (source chain, destination chain, route tokens, requested output)
  2. Calculates your cost (destination gas, capital cost, slippage)
  3. Returns reward tokens you’d accept on the source chain (covering cost and margin), or rejects if unprofitable
/api/v2/quote/reverse is the same idea for exact-output intents.

2. Register your solver

Routes V2 only, do not include quotesUrl, reverseQuotesUrl, or receiveSignedIntentUrl. Those are V1 legacy fields.

3. Monitor Portal events for SELF_PUBLISH intents

Watch the source-chain Portal for IntentPublished events. Match on intents that used your quote (your reward tokens will be present in the event).

4. Fulfill on the destination

The Portal transfers your reward tokens to the Executor, runs route.calls atomically, and emits IntentFulfilled.

5. Wait for proof, then withdraw

The chosen prover dispatches the fulfillment proof to the source chain. Once the source-chain Portal verifies it:
You receive the reward tokens.

Capital efficiency

Two patterns reduce your inventory needs:
  • Crowd Liquidity: flash-borrow stablecoin liquidity for fulfillment, repay from the destination outcome. See Crowd Liquidity.
  • Issuer-direct integration: if you have native mint/burn for a stablecoin, use it instead of pre-positioned inventory.

Best practices

  • Pre-simulate route.calls before fulfilling to avoid wasted gas on calls that would revert
  • Use batchWithdraw to amortize tx costs across multiple proven intents
  • Set deadline margins that allow for proof verification time on your chosen prover
  • Treat Fulfillment event detection as the success signal, not the tx receipt
You’re now operating as a solver.