> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Becoming an Eco solver

> End-to-end guide to integrating as a solver, implement the V2 quote endpoints, register, monitor Portal events, fulfill, withdraw.

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](/api-reference/introduction#solver-interface) 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

```bash theme={null}
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
  }'
```

<Warning>
  Routes V2 only, do not include `quotesUrl`, `reverseQuotesUrl`, or `receiveSignedIntentUrl`. Those are V1 legacy fields.
</Warning>

## 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).

```solidity theme={null}
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

```solidity theme={null}
portal.fulfillAndProve{value: route.nativeAmount + bridgeFee}(
    intentHash,
    route,
    rewardHash,
    claimant,
    proverAddress,
    sourceChainDomainID,
    proverData
);
```

The Portal transfers your reward tokens to the [Executor](/routes/architecture/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:

```solidity theme={null}
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](/routes/primitives/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.
