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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Bridge a running app chain over IBC

> Keep a Cosmos SDK chain running and bridge its token to Solana with a Tendermint light client program, an escrow module, and proof-checked mints. Covers architecture, operators, authorities, limits, and the Akash reference design.

Use this guide when the Cosmos chain keeps running and you want its token on
Solana. It covers the [programs](/developers/docs/core/programs), the Cosmos
module, the operators, and the authorities a light-client bridge needs, using
Akash's published design as the reference.

**Keep the chain. Prove every mint.** Tokens are locked on Cosmos and minted on
Solana only against a proof the Solana programs verify themselves, through a
light client of your chain.

<Columns cols={3}>
<Card title="Verified, not attested">

A light client program checks validator signatures on Cosmos headers, and the
token program checks a storage proof of each deposit.

</Card>
<Card title="Supply stays on Cosmos">

Every token on Solana is backed by escrow on Cosmos. Monitor that invariant
continuously.

</Card>
<Card title="An ongoing operation">

Relayers, reporters, pause guardians, and upgrade authorities need owners for as
long as the bridge runs.

</Card>
</Columns>

## When to bridge instead of halting

Bridge when the Cosmos chain keeps running but you want its token on Solana: for
Solana liquidity, wallets, and applications, while validators, governance, and
the rest of the product stay where they are.

In this design the canonical supply stays on Cosmos. Each token on Solana is
backed by a token locked in escrow on Cosmos, and the Solana side mints only
after it verifies that lock onchain, through a light client of the Cosmos chain.
There is no multisig or oracle attesting to deposits.

If you plan to retire the chain, use [halt and
claim](/developers/docs/migrate-to-solana/cosmos/app-chain/halt-and-claim)
instead, or bridge first and run a final claim later. The
[overview](/developers/docs/migrate-to-solana/cosmos/app-chain) compares the
paths.

This guide follows the design
[Akash](https://github.com/akash-network/node/tree/main/contracts/solana)
published for bridging AKT, which is the most complete open-source example. It
had not run on mainnet when this guide was written.

## Architecture

Three Solana programs and one Cosmos module do the work, connected by off-chain
relayers that anyone can run. A transfer moves through six steps:

| Step | Where | What happens |
| --- | --- | --- |
| 1 | Cosmos | The holder sends a deposit message naming a Solana recipient and an amount. |
| 2 | Cosmos | The escrow module locks the tokens and stores a transfer record in the chain's state. |
| 3 | Relayer to Solana | The relayer submits newer Cosmos headers. The light client program verifies the validator signatures and stores the consensus root. |
| 4 | Relayer to Solana | The relayer uploads a membership proof for the transfer record to a proof buffer account. |
| 5 | Relayer to Solana | The relayer calls mint. The token program checks the proof against the stored root. It records a permanent void if the recipient is invalid; otherwise it checks the mint limits and mints SPL tokens. |
| 6 | Reporters to Cosmos | Reporters read the finalized Solana outcome and report it back. The escrow module settles the transfer or refunds it. |

- **The escrow module on Cosmos** locks deposits and keeps a record of each
  transfer, keyed by a unique ID, in the chain's state.
- **The light client program on Solana** tracks the Cosmos chain. It accepts a
  new header only if it is signed by enough of the validator set it already
  trusts, then stores that block's state root.
- **The token program on Solana** owns the mint. It mints only when given a
  storage proof that the transfer record exists under a root the light client
  has verified.
- **An access manager** controls who may submit header updates to the light
  client.

Relayers move headers and proofs, but they cannot forge either one, so a
malicious relayer can delay transfers but not create tokens.

## The Solana programs

### Light client

You do not need to write the light client. The IBC contracts project publishes
Solana programs, including an ICS-07 Tendermint light client and an access
manager, in
[ibc-contracts/ibc-solana](https://github.com/lfdt-ibc/ibc-contracts/tree/main/ibc-solana).
Akash deploys a fork of these programs pinned to a specific commit.

Storage proofs are larger than one Solana transaction allows, so the relayer
uploads them in chunks to a proof buffer account before calling mint. Header
verification cost grows with the size of the validator set, so measure it
against your chain's real validator count before you size relayer fees.

### Token program

The token program holds the mint authority as a PDA, so no key can mint outside
the program's checks. Its mint instruction looks like this:

```rust
// Sketch of the mint instruction, modeled on Akash's AKT program. Account
// types and helpers such as trusted_root and verify_membership are yours.
pub fn mint_transfer(
    ctx: Context<MintTransfer>,
    transfer_id: TransferId,
    recipient: Pubkey,
    amount: u64,
) -> Result<()> {
    let bridge = &mut ctx.accounts.bridge;
    require!(bridge.enabled && !bridge.paused, BridgeError::Disabled);

    // Pinned client for the expected chain ID, not frozen, and its consensus
    // state at the proof height still inside the trusting period.
    let root = ctx.accounts.light_client.trusted_root(
        &bridge.chain_id,
        ctx.accounts.proof_buffer.height,
    )?;

    // Prove the escrow module stored this exact transfer record.
    verify_membership(&ctx.accounts.proof_buffer, &transfer_id, &recipient, amount, &root)?;

    // The status account is created with init from the transfer ID, so a second mint
    // or void for the same transfer fails before this handler runs.
    let status = &mut ctx.accounts.status;
    if !is_valid_recipient(&recipient) {
        status.outcome = Outcome::Voided; // the Cosmos side can refund it
        return Ok(());
    }

    // Apply mint limits only to transfers that mint, so voids never use up the
    // daily allowance.
    require!(amount <= bridge.per_transfer_max, BridgeError::OverTransferLimit);
    bridge.add_to_daily_minted(amount, Clock::get()?.unix_timestamp)?; // errors above daily_mint_cap

    token::mint_to(
        CpiContext::new_with_signer(
            ctx.accounts.token_program.to_account_info(),
            token::MintTo {
                mint: ctx.accounts.mint.to_account_info(),
                to: ctx.accounts.recipient_token_account.to_account_info(),
                authority: ctx.accounts.mint_authority.to_account_info(),
            },
            &[&[b"mint_authority", &[ctx.bumps.mint_authority]]],
        ),
        amount,
    )?;
    status.outcome = Outcome::Minted;
    Ok(())
}
```

- **One status account per transfer** prevents replays. Mint and void create the
  same account, so once either succeeds, the other cannot.
- **Invalid recipients become voids** rather than errors. A permanent void is a
  provable outcome the Cosmos side can use to refund the deposit.
- **Mint limits** per transfer and per day cap the damage from a bug or a
  compromised verifier.
- **Top-level calls only.** Akash accepts mint calls only as top-level
  instructions, preceded by nothing except compute budget instructions, which
  narrows what an attacker can compose.
- **No freeze authority.** Akash creates the mint with the classic Token
  Program, six decimals, zero initial supply, and Metaplex metadata.

## The Cosmos escrow module

The Cosmos side needs a module that does more than lock tokens. In Akash's
`x/sink` module, each transfer moves through explicit states:

| State | Meaning |
| --- | --- |
| Pending | Locked on Cosmos, not yet minted or voided on Solana |
| Minted | Minted on Solana; the escrow keeps backing it |
| Voided | Proven void on Solana; eligible for refund |
| Refund pending | Refund requested and waiting out a challenge window |
| Refunded | Returned to the depositor on Cosmos |

The module's escrow balance must always equal the sum of pending, minted,
voided, and refund-pending amounts, and the escrow behind mints must equal the
supply on Solana. Monitor both invariants continuously.

Cosmos cannot verify Solana state directly in this design. Instead, a set of
independent reporters reads finalized Solana outcomes and reports them back, and
the module acts only on a quorum of more than two-thirds of them, after a
challenge window. Governance can also confirm or void transfers. This is the
trust assumption to explain to holders: refunds depend on reporters and
governance, while mints depend only on onchain verification.

Other details Akash handles in the module: the escrow address is blocked from
receiving ordinary bank transfers, a deposit message must be the only message in
its transaction, and deposits, refunds, and accounts have their own rate limits.

## Off-chain operators

- **Relayers** watch Cosmos for deposits, keep the light client current, upload
  proofs, and call mint. Mint and void calls are permissionless. Header updates
  need a relayer role from the access manager, unless you open relaying to
  everyone.
- **Reporters** each run their own Cosmos and Solana nodes, so one bad RPC
  provider cannot mislead the quorum. They sign reports on Cosmos and hold no
  Solana keys. Akash plans seven reporters with a quorum of five.

### What happens when they stop

Relayers affect liveness, not safety. If nobody updates the light client for
longer than its trusting period, the client expires, mints stop, and recovering
requires a governed re-pin to a new client. Pause deposits on Cosmos before that
happens, so holders do not lock tokens that cannot be minted. Reporters that go
quiet never trigger a refund or veto by themselves.

Fund relayer fee payers for several days of header updates, proof buffers, and
token account rent, and alert on low balances.

## Authorities and limits

Whoever can upgrade the token program, the light client, or the access manager
can mint without limit, by replacing the program or the verifier it trusts.
Treat all three upgrade authorities as one security tier.

| Power | Recommended holder |
| --- | --- |
| Upgrade authority for all three programs, and the token program's admin instructions | A multisig with a time lock, such as [Squads](https://squads.xyz), with members on hardware wallets |
| Pause guardian on Solana | An on-call key that can only pause minting; only the multisig can resume |
| Pause guardian on Cosmos | A key or group set by governance that can turn off deposits or refunds; only governance turns them back on |
| Relayer role | One hot key per relayer, able to update headers but not to forge them |
| Escrow module parameters | Cosmos governance |

Start with low per-transfer and daily mint caps, and raise them only after the
bridge has run under real load. Akash sets higher caps for one planned seed
transfer and lowers them afterward.

## Design limits

- **One direction.** Akash's design mints on Solana but has no burn-and-release
  path back to Cosmos; the only return path is a refund of a deposit that was
  never minted. A return path needs Cosmos to verify Solana state, through a
  Solana light client on Cosmos or another attestation you are willing to trust.
- **Supply on two chains.** Market-data sites, explorers, and exchanges need to
  know that Solana supply is backed by the Cosmos escrow and not additional
  issuance. Publish the mint address and the escrow address together.
- **Token program choice.** Akash's program supports the classic Token Program
  only. If you need Token Extensions, design the mint path and limits for them
  from the start.
- **Ongoing operations.** Unlike a claim program, the bridge never finishes.
  Plan staffing for relayers, reporters, monitoring, and incident response for
  as long as it runs.

## Case study: Akash

Akash, a Cosmos SDK chain for decentralized compute, published its AKT bridge in
[akash-network/node/contracts/solana](https://github.com/akash-network/node/tree/main/contracts/solana),
alongside the `x/sink` module in the same repository. It includes the AKT
program, the light client and access manager build, a TypeScript relayer and
reporter with release builds, deployment runbooks, and an audit scope.

Its own documentation states that it has not run on mainnet and that audits of
the programs, the module, and the services are still required before launch.
Read it as a reference design and check the repository for current status.

### Design choices worth copying

- **Proofs verified in the token program.** The AKT program checks the storage
  proof against the light client's stored root itself, rather than trusting a
  separate attestation program.
- **Mint and void share one status account,** which makes every transfer resolve
  exactly once.
- **Pause is separate from resume.** On-call keys can stop minting or deposits
  immediately, but only the multisig or governance can turn them back on.
- **Written invariants.** The deployment runbook names the supply equations
  operators must monitor, so a mismatch is an alert, not a forensic exercise.

## Launch checklist

- Audit the token program, the light client build you deploy, the Cosmos module,
  and the relayer and reporter services.
- Produce verifiable builds and record program hashes, commits, and IDLs
  together.
- Move all three upgrade authorities to the time-locked multisig and verify them
  onchain.
- Initialize the light client from a checkpoint you verify independently.
- Set low mint caps, assign pause guardians on both chains, and rehearse a pause
  and resume.
- Run at least two relayers and the full reporter set on independent
  infrastructure.
- Monitor the escrow and supply invariants, light-client freshness, and fee
  payer balances, with alerts.
- Publish the mint address, escrow address, and token metadata to wallets,
  explorers, exchanges, and market-data sites before the first deposit.
- Rehearse the full flow on devnet or testnet with a copy of your chain,
  including a void and a refund.
