Skip to content
vaporifPublic

About

IBC v2 relayer in Rust — plain traits, no macro frameworks

Topics

Resources

Contributing

Stars

8 stars

Watchers

0 watching

Forks

Latest commit

 

History

248 Commits

Folders and files

Repository files navigation

Mercury

Cosmos ecosystem

CI E2E Audit codecov

An IBC v2 relayer in Rust. Plain traits, no frameworks.

Mercury moves packets between IBC-connected blockchains, even when the chains are completely different types. Cosmos↔Cosmos, Cosmos↔EVM, and Cosmos↔Solana all work today.

Hermes handles Cosmos/Tendermint chains with a sync architecture. hermes-sdk gets the cross-chain abstraction right but buries it under 250+ component traits. Mercury keeps the same insight with less machinery: ~21 plain Rust traits, an adapter pattern for orphan rules, and all relay logic shared across chain pairs.

Adding a new chain doesn't touch Mercury's core. Chain support goes in independent crates with plugin traits. No forks, no rebasing, no enum variants to extend. See why rewrite and adding a chain.

Status

Early development. Not tested against live chains yet, so use at your own risk. Core implementation complete for all chains.

Mercury is an independent project. It isn't affiliated with Cosmos Labs and has no production support. Cosmos Labs licenses its own IBC v2 relayer through Cosmos Enterprise; the public mirror, cosmos/ibc-relayer, was archived in August 2026. Mercury explores a simpler relayer design that shares one set of traits across Cosmos, EVM, and Solana. See why rewrite for how the two compare.

Feature Cosmos↔Cosmos Cosmos↔EVM Cosmos↔Solana
Basic transfer E2E E2E E2E
Bidirectional transfer E2E E2E E2E
Packet timeout E2E Untested E2E
Near-expiry packet timeout E2E Untested Untested
Client refresh E2E Untested Untested
Concurrent transfers E2E Untested Untested

Solana has no state proofs, so Cosmos tracks Solana with ibc-go's attestations light client, fed by signatures from IBC attestors. Solana tracks Cosmos with the ics07-tendermint light client.

How it works

EventWatcher    ─┐
                 ├→ PacketWorker → TxWorker (dst chain)
PacketSweeper   ─┘       ↓
                    SrcTxWorker (src chain)

ClientRefreshWorker → TxWorker (dst chain)
MisbehaviourWorker (independent, cancels relay on detection)

Each relay direction (A→B, B→A) runs its own workers connected by tokio::mpsc channels. See architecture for the full pipeline and trait hierarchy.

Docs

Usage

# start the relayer
mercury-relayer start --config relayer.toml

# query chain status
mercury-relayer status --config relayer.toml --chain cosmoshub-4

See examples/relayer.toml for config.

Contributing

See CONTRIBUTING.md.

License

Apache-2.0 OR MIT

About

IBC v2 relayer in Rust — plain traits, no macro frameworks

Topics

Resources

Contributing

Stars

8 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages