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

# List a chain

> What a chain needs, the two contracts you build, the rules they must enforce, and how a route is approved.

![Five steps from pending to live](https://mintcdn.com/ambi/zxJ8qP3zW6Y_3Fqs/images/art/pipeline-light.webp?fit=max\&auto=format\&n=zxJ8qP3zW6Y_3Fqs\&q=85\&s=fdb65ad571f7aff4cf716f7e56d56eee)

## What a chain needs

* **A finality rule Ethereum can check:** a canonical bridge, a light client, or accumulated proof of work.
* **A way to enforce payment rules:** a smart-contract router, or, for UTXO chains, a payment format that a proof can bind to the statement.
* **Infrastructure:** public RPCs with archive history and a published contract registry.

## The verifier (Ethereum)

Implement `IOutcomeVerifier`:

```solidity theme={null}
interface IOutcomeVerifier {
    function accepts(Ambi.Request calldata request) external view returns (bool);
    function verify(bytes32 statement, bytes calldata proof) external view returns (bool);
    function verifyExpired(bytes32 statement, bytes calldata proof) external view returns (bool);
}
```

* `accepts` runs at listing. Reject any terms your destination can't encode or enforce.
* `verify` returns true only when the destination recorded Paid for that statement.
* `verifyExpired` returns true only when it recorded ExpiredUnpaid.
* All three must be `view`, and the contract must be immutable: no proxy, no owner, no settable fields. The registry pins the code hash but can't detect a proxy, so reviewers reject one.
* A recorded outcome must stay true forever.

## The destination ledger

Whatever runs on the destination chain must enforce, per statement:

1. **One terminal outcome.** Paid or ExpiredUnpaid, never both, never changed.
2. **Payment only before the deadline,** only from the matched filler, only in the requested asset and exact amount, only to the requested recipient, recorded atomically with the transfer.
3. **Expiry by anyone** at or after the deadline while still pending.
4. **Safe repeated delivery,** and authentication of the specific application and ledger the outcome came from.

Use the market's `quoteStatement` as a cross-implementation test vector. See [Statement encoding](https://docs.ambichain.org/specs/statement.md).

## Testing

A route must complete, without changing `src/Ambi.sol`:

* a paid fill, end to end;
* an expired-unpaid refund, end to end;
* rejection of: the wrong statement, another order's outcome, a conflicting outcome, a late payment, the wrong payer, the wrong amount, the wrong recipient, and a forged sender.

## Approval

**1. Apply**

Use **List a chain** on the Chains page, or `POST /chains/applications`.

**2. Review**

Code review of both contracts, a check that the verifier is immutable, the test results, and a written statement of what the route trusts.

**3. Approve**

The registry owner calls `approve(inbox, label)`, pinning its code hash. The chain goes live in the app and API.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.