# Bridging

> Moving USDC and other tokens between your own wallets on different networks with Circle CCTP or Across, and the agent's exact steps to send, follow and settle a transfer.
>
> Describes Orbit 0.1.9. Web page: https://docs.orbit.dialectic.com/0.1.9/using/bridging/

This page covers moving money between your own wallets on different networks, for example from Base to HyperEVM before trading perps, and back. The first part is in plain words; the rest is the agent's workflow.

## In plain words

If you have wallets on more than one network, your agent can move money between them. The money only ever goes from one of your wallets to your own wallet on the other network, inside your rules like any other action.

- **Usually you sign nothing per transfer.** Your wallet's permissions, approved at setup, already say which routes and which receiving wallets are allowed. If your rules ask you to review actions first, you approve it like any other action.
- **It is not instant.** The money counts as arrived only when the other network shows it. That can take minutes or longer, and nobody can promise an exact time.
- **Nothing needs to stay open.** Whenever Orbit next runs, it moves the transfer along and finishes it.
- **While it travels**, your Portfolio may show "Plus a move between networks on its way".

Orbit uses two bridges. [Circle CCTP](https://developers.circle.com/cctp) moves USDC: it is burned on one network and minted on the other, one for one on Circle's standard tier. [Across](https://docs.across.to/) moves other tokens, WETH between Ethereum and Base included: an independent relayer pays out on the other network and keeps a small fee. On a wallet set up with Orbit 0.1.9 or later, a WETH transfer is available once the owner has set the wallet's bridge loss limit; `get_module_state` shows it.

## For agents: moving money between the owner's Safes

This part is for agents moving money between the owner's own Safes on different networks. It covers route checks, the bridge call, amounts, claims, settlement and stuck transfers. As of Orbit 0.1.9.

Money does not have to come from outside: when the owner has Safes on more than one network, the agent can move it between them, inside the owner's limits like any other action.

### When to use it

- The owner asks to move funds to another network.
- A strategy on another network needs money the owner holds on Base (for example perps on HyperEVM).
- Money should come back to Base (for example to pay a subscription).

Relay is not a bridge for the owner's money: Orbit uses it for gas only. See [Funding and gas](https://docs.orbit.dialectic.com/0.1.9/using/funding-and-gas/#moving-gas-between-networks-with-relay).

## Routes

| `bridge_id` | Protocol | Tokens | Delivery |
|---|---|---|---|
| `1` | Across v4 | The pairs the installed signed package registers; the simulation refuses an unregistered pair | A relayer fills on the destination and takes a fee from the amount |
| `2` | LayerZero OFT | none | Refused; Orbit names Across instead |
| `3` | Circle CCTP v2 | USDC only | Burn on the source, attestation, then a claim (mint) on the destination |

Choosing: USDC goes by CCTP (`3`). Other tokens go by Across (`1`).

A route exists only when the installed signed package declares that exact direction. Each direction between two networks must be declared on its own; never assume a reverse route from a forward one. `get_package` shows the bridges a package declares.

## Preconditions

1. **Both Safes are configured in this Orbit.** A bridge to a network where the owner has no Safe that Orbit looks after is refused before it is tried (`bridge_destination_no_safe`). The bridge's recipient defaults to a matching bridge intent's recipient, else the Safe configured on the destination network, else this Safe. `list_safes` shows them, with `chain_id`.
2. **The route is set up.** For USDC, `get_setup_bridge_eligibility` (read only):

```json
{"tool": "get_setup_bridge_eligibility",
 "args": {"source_safe": "<base-safe>", "safe": "<hyperevm-safe>",
          "expected_source_chain_id": 8453, "expected_chain_id": 999}}
```

   It verifies both Safes, their active roots and native bridge controls, the installed signed CCTP route, and reads the sending Safe's USDC. An unavailable route is an **error**, not `routeAvailable: false`: when it answers with an error, the USDC route is not set up; tell the owner what it says. The sending Safe's balance is reported in `balanceRaw` and does not gate the verdict. The evidence is short-lived (`expiresAt` in the reply); it is a check, not an authorization.

   Across routes have no eligibility tool: the simulation is the route check.

3. **The destination recipient is whitelisted on the module.** Whitelisting is per destination network, not per bridge, and is a setup step (the onboarding batch adds it). A missing recipient is a setup gap, not a bridge failure.
4. **The loss cap allows it.** The module's bridge loss cap (`maxBridgeLossBps`, per `bridge_id`; read it in `get_module_state` → `loss_caps_bps`) is a rate: the module compares `min_output` with the amount less that rate, with no price oracle. On a CCTP 1:1 self-claim (`min_output` equal to `amount`) the cap never binds; a CCTP forwarding-fee budget must fit within it. The cap and the recipient whitelist apply in the FENCED and WALLED modes; Orbit sets up WALLED. A flat Across fee is a large rate on a small transfer, so a small Across transfer may be refused by an honest cap.
5. **Limits.** Once limits are signed, a bridge counts against them like any other action.
6. **The module's bridge cooldown.** The module keeps one bridge cooldown duration, timed separately per `bridge_id`. Orbit does not check it before sending. A send inside the cooldown is refused at simulation with a `refusal` block, code `wait_not_over`, whose `status_for_the_user` states the wait and the time left: relay it and retry once `limit.left_s` has passed (`left_s_is_upper_bound: true` means it is the whole wait).

Do not run `verify_setup` before each bridge. `execute_action` checks what this lane needs (encoder, route for this token and destination, recipient whitelist, loss cap) and refuses with the remedy if one is missing.

## The bridge call

A bridge is `simulate_action` and `execute_action` with `call.kind: "bridge"`. It is not a rooted action and never appears in `list_actions`.

```json
{"tool": "simulate_action",
 "args": {"safe": "<base-safe>",
          "call": {"kind": "bridge",
                   "order": {"bridge_id": 3, "dest_chain": "hyperevm",
                             "input_token": "USDC", "output_token": "USDC",
                             "amount": "250", "min_output": "250"}}}}
```

| Field | Meaning |
|---|---|
| `bridge_id` | `1` Across, `3` CCTP |
| `dest_chain` | The destination network's **name** (`base`, `mainnet`, `hyperevm`), not its id |
| `input_token`, `output_token` | Both required. An address, or a symbol when exactly one of the Safe's tokens on that network has it |
| `amount` | **Token units**: `"250"` is 250 USDC, `"0.05"` is 0.05 WETH |
| `min_output` | The least that must arrive, in the output token's units |
| `amount_raw`, `min_output_raw` | The same in **base units** (`"250000000"` is 250 USDC). Give each amount once, in one form |
| `recipient` | Usually leave out (see defaults above) |
| `cctp_finality` | CCTP only: `"standard"` (default) or `"fast"` (opt-in; needs a nonzero fee budget; its attestation can expire) |
| `fill_deadline_offset_s` | Across only: seconds after the deposit for the fill deadline. Omitted, a fixed default applies; the executed send's decoded `AcrossDeposit` event carries the `fill_deadline` |

Units are the trap here. In a bridge order, `amount` is token units, unlike a position's `mgmt_params` amounts, which are base units. Passing `"250000000"` as `amount` asks for 250 million USDC. The older `input_amount` and `min_output_amount` fields are base units.

### CCTP: `min_output` chooses the delivery

- `min_output` equal to `amount`: a 1:1 **self-claim**. No fee; Orbit claims it on the destination and the operator pays the destination gas.
- `min_output` below `amount`: the difference is a **forwarding fee budget** for Circle's forwarder. Never assume a lane is free or reuse an old fee; compare the current fee with the transfer size.

On a self-claim Circle reports the forwarder as declined (`forwardState` failed or insufficient fee). That is expected: relay it as "the forwarder declined, which is expected on a self-claim; Orbit delivers it itself".

### Across: leave room for the fee

The relayer takes a fee from the amount, so `min_output` must sit below `amount` by enough for that fee, within the Safe's bridge loss cap. A floor equal to the amount is unlikely to be filled; then the money comes back on the source network only after the fill deadline.

### Simulate, then execute

1. `simulate_action` validates the **source** send only. It cannot observe arrival; its policy block's `settlement` field says so. Relay `in_words`.
2. `execute_action` with the same `call`, the `sim_receipt` and an `idempotency_key`, before the receipt expires (`sim_receipt.valid_for_s`).
3. A successful send means the money has **left**, not arrived.

## Settlement and claims

Settlement is decided only by destination-chain events: the fill event for Across, the CCTP mint for CCTP. Explorers and Circle's attestation service are advisory; the attestation service only supplies the bytes a claim needs.

A CCTP transfer moves through: sent (burn mined), attestation available, claim submitted (`claim_tx`, which is not settlement), minted on the destination, `executed`.

The claim needs no one to keep anything open and nothing to sign. Any Orbit that starts (a new chat, the owner page, any `orbit-mcp` command) moves it on and claims it once it is ready, from the operator's wallet on the destination network. A claim still runs while actions are paused; it waits only while the receiving network is paused.

## Following a transfer

| You want | Call | Read |
|---|---|---|
| Where each transfer is, in words | `health_check` | `reliability.bridge_transfers`: `state` (`on_its_way`, `ready_to_claim`, `claimed`), `words`, `why` while it waits, `claimed_by_words`, and `next` when nothing is running to claim it |
| Everything in flight or stuck | `list_incomplete_operations` | `disposition` first (`notify`, `inform`, `silent`); never match on status strings |
| One operation's history | `list_operations` | the row, including its `bridge_refresh` review |
| What an in-flight transfer is worth now | `get_portfolio` | the in-transit sleeve; destination holdings are never counted twice |

Relay `words` and `why` as they stand.

### Refreshing a pending CCTP transfer

`get_cctp_attestation` without `source_domain` takes it from the route Orbit recorded with that burn.

`refresh_bridge_operation` rechecks the source and destination evidence for one pending CCTP transfer and records what it confirms. It claims, signs and sends nothing. Copy all five values exactly from the row's `list_operations.bridge_refresh` review:

```json
{"tool": "refresh_bridge_operation",
 "args": {"safe": "<base-safe>", "expected_safe": "0x…", "expected_chain_id": 8453,
          "operation_id": "<from bridge_refresh>", "expected_revision": "<from bridge_refresh>"}}
```

A stale review is refused: read `list_operations` again. Timeouts and unavailable evidence leave the transfer pending; that is not a failure.

## When a transfer looks stuck

| What happened | Meaning | What to do |
|---|---|---|
| CCTP standard, no attestation yet | Circle has not signed yet | Wait. Nothing is lost and nothing expires on the standard tier |
| CCTP attested but not minted | The claim has not landed | Any Orbit that starts claims it. If nothing is running, `bridge_transfers` says so with a `next`; a long-unclaimed burn is escalated in `health_check` with its remedy. Relay that as it stands |
| CCTP fast, attestation expired | The fast tier's expiry passed | The attestation must be requested again |
| Across, no fill by the deadline | The relayer declined, usually because the transfer is too small | The operation stays watched; a late fill or a refund can still land |
| Across refund | The tokens come back on the source network | Nothing to do. The refund may not be whole |
| Recipient not whitelisted | A setup gap | A permission/setup update adds the recipient; the owner signs it |
| Loss cap is 0 for that bridge | The lane is closed by the owner's setup | The owner changes it with a signed update |
| Revert with `code: "unknown"` soon after another bridge on the same `bridge_id` | Likely the module's bridge cooldown | Wait out the cooldown, then send once |
| `pending` bridge on a network without finality, send absent | Orbit could not find the send | `resolve_operation` may mark it `not_executed` once Orbit's own re-check of every provider finds the send absent |

Never send a transfer again because the first has not arrived. Never re-send under a new `idempotency_key`; a pending or unknown send is followed with the same key or in `list_incomplete_operations`.

## Timing

Orbit's documentation holds only a few historical measurements, and most directions have none. Treat timing as unknown and follow the transfer in `health_check`; never promise an arrival time.

## Common refusals

| Refusal | Meaning |
|---|---|
| Error from `get_setup_bridge_eligibility` | The USDC route is not set up for these Safes; relay it |
| LayerZero refused | `bridge_id` 2 is not supported; use Across |
| Recipient or route gap in `simulate_action` (`setup_gaps`, `gap_owners`) | A setup requirement for this lane is missing; `owner_actionable` says whether the owner can fix it. A gap on another lane appears under `dormant_lanes` and does not block |
| `mandate_required` | No limits signed for this Safe yet |
| `bridge_lanes_unverified` | Orbit couldn't read this wallet's bridge settings yet. Temporary: try again shortly (once read, they are remembered) |
| `bridge_lanes_not_covered` | This package's bridges don't cover this wallet's module, so no bridges are offered for it. Permanent: retrying won't change it |
| `bridge_destination_no_safe` | The owner has no Safe Orbit looks after on the destination network. Refused before the simulation; add that network first |
| `bridge_recipient_not_allowed` | The recipient is neither the owner's Safe there nor one set up for that move |
| Amount above the balance | Refused before it is tried; read `get_balances` |
| Loss cap exceeded | The fee is above the module's bridge loss cap: raise `min_output` toward the amount (CCTP), or send more (Across) |

## Pitfalls seen in real agents

- Not knowing that moving USDC between the owner's own Safes is possible at all. It is, with `kind: "bridge"`.
- Passing base units in `amount`. Bridge `amount` is token units.
- Waiting for `execute_action` to report arrival. It reports the source send only.
- Reporting a self-claim's "forwarder declined" as a failure.
- Trying Relay for USDC. Relay is gas only.
