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

# Verifiers and routes

> A route is a router on the destination chain paired with an inbox on Ethereum that only believes that router.

![The router and the inbox that trusts only it](https://mintcdn.com/ambi/zxJ8qP3zW6Y_3Fqs/images/art/pairing-light.webp?fit=max\&auto=format\&n=zxJ8qP3zW6Y_3Fqs\&q=85\&s=9e70803fe8987c5598286cf98a33799d)

## The router (destination chain)

The router is the only place a payment counts. For a statement it accepts exactly one of two outcomes:

* **Paid**, via `pay(order)`: only the matched filler, only before `payBy`, only the exact amount of the exact asset to the exact recipient, and never to the payer. The router checks the recipient's balance rose by exactly the amount, records Paid, and sends the outcome in the same transaction.
* **ExpiredUnpaid**, via `expire(order)`: anyone, at or after `payBy`, while the statement is still pending.

`resend(order)` repeats the message for a recorded outcome, if delivery ever needs a second try. It can never change the outcome.

## The inbox (Ethereum)

The inbox is the order's **verifier**. It does three things:

* `accepts(request)`: at listing, confirms the request names this inbox, its router, its chain, a 20-byte non-zero recipient and a supported asset encoding.
* `record(statement, outcome)`: stores an outcome, but only when called by the chain's canonical messenger on behalf of the configured router. A repeated identical outcome is ignored. A conflicting one reverts.
* `verify` and `verifyExpired`: tell the market which outcome is recorded. They are view functions, so the market reads them with no way for them to change state.

| Route | Router sends with | Inbox accepts only when |
| - | - | - |
| OP Stack (Base) | `L2CrossDomainMessenger.sendMessage` | Caller is the L1 messenger and `xDomainMessageSender()` is the router |
| Arbitrum Nitro | `ArbSys.sendTxToL1` at `0x64` | Caller is the bridge and the active outbox's `l2ToL1Sender()` is the router |

Every router and inbox field is `immutable`. Neither contract has an owner.

## The verifier registry

The market only lists against approved inboxes.

* `approve(verifier, route)` pins the inbox's code hash and a route label such as `base`.
* `list` requires the verifier to be approved and its current code hash to equal the pinned one.
* `matchOffer`, `fulfill` and `refundExpired` check the code hash again against the one saved in the order.
* `disable(verifier)` stops new listings on that route. Orders already listed keep working, because each order carries its own pinned hash.

![Approved routes with their pinned verifiers and code hashes](https://mintcdn.com/ambi/YFcg3UdfEoAyYkl8/images/app/chains-light.webp?fit=max\&auto=format\&n=YFcg3UdfEoAyYkl8\&q=85\&s=080f020984c547ec76956ba6c5cc68bc)


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