Skip to content

vaporif/mercury

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 works today. Cosmos→EVM is in progress.

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. Cosmos↔Cosmos/EVM packet relay works in E2E tests. Solana in progress. Not tested against live chains yet, so use at your own risk.

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

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Stars

Watchers

Forks

Contributors

Languages