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
| Endpoint | Required for | Purpose |
|---|
POST /api/v2/quote | All solvers | Return pricing for a candidate intent (exact-input) |
POST /api/v2/quote/reverse | All solvers | Return pricing for an exact-output intent |
See the API Reference for full request/response schemas.
1. Implement the V2 endpoints
Your /api/v2/quote handler:
- Parses the candidate intent (source chain, destination chain, route tokens, requested output)
- Calculates your cost (destination gas, capital cost, slippage)
- 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
curl -X POST https://quotes.eco.com/api/v1/solverRegistry/registerSolver \
-H "Content-Type: application/json" \
-d '{
"solverName": "your-solver",
"intentExecutionTypes": ["SELF_PUBLISH"],
"crossChainRoutes": [ ... ],
"quotesV2Url": "https://your-solver.com/api/v2/quote",
"reverseQuotesV2Url": "https://your-solver.com/api/v2/quote/reverse",
"useSolverDataFormat": true
}'
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).
event IntentPublished(
bytes32 indexed hash,
uint64 destination,
bytes route,
address indexed creator,
address indexed prover,
uint256 deadline,
uint256 nativeAmount,
TokenAmount[] tokens
);
4. Fulfill on the destination
portal.fulfillAndProve{value: route.nativeAmount + bridgeFee}(
intentHash,
route,
rewardHash,
claimant,
proverAddress,
sourceChainDomainID,
proverData
);
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:
portal.withdraw(destination, routeHash, reward);
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.