The Relay VM runs the R-chain, a dedicated chain for cross-chain message
relaying. It is a sibling of the Bridge VM (B-chain, assets) and Oracle VM
(O-chain, data in): the R-chain moves arbitrary messages between chains
with verified inclusion proofs. Together B/O/R cover the three distinct
cross-chain concerns — assets, data, messages.
Precompile address nibble: C=B (see LP-129 Registry).
R-chain handles:
R-chain does NOT handle:
A typical cross-chain swap uses BOTH: Bridge VM holds the tokens,
Relay VM delivers the "release" instruction.
Each supported source chain has a light-client header chain:
type SourceChain struct {
ChainID uint32
ConsensusType uint8 // 1=Ethereum, 2=Cosmos, 3=Warp-Lux, ...
GenesisHeader []byte
LatestHeight uint64
LatestHeaderHash [32]byte
}
Headers arrive via relayer submissions. Each new header is verified against
the consensus protocol of the source chain (Ethereum's beacon consensus,
Cosmos Tendermint, etc.) before being accepted.
type Message struct {
SourceChainID uint32
DestChainID uint32
Nonce uint64
Sender [20]byte
Recipient [20]byte
Payload []byte
Proof InclusionProof
}
Relayers stake LUX to submit proofs. Submitting an invalid proof slashes
the full bond. Minimum bond: 100 LUX.
Keeping bridge, oracle, and relay as separate chains:
relay prioritizes liveness)
Consolidating them into one VM (as the deleted teleportvm tried) creates
a single point of failure and conflates distinct security properties.
github.com/luxfi/chains/relayvm/ |github.com/luxfi/chains/bridgevm/ |github.com/luxfi/chains/oraclevm/ |