Hermes is a Fusion+ implementation enabling swaps between Stellar and Ethereum.
Hermes is a Fusion+-style cross-chain bridge enabling atomic swaps between Ethereum-compatible chains and Stellar using HTLCs on Stellar, deterministic contract addresses, and a custom EVM deployment. It features bespoke relayer and resolver services that coordinate off-chain verification, guarantee atomicity, and optimize finality. By integrating Stellar’s native capabilities with EVM programmability, Hermes ensures secure, trust-minimized, and deterministic asset movement across both ecosystems without centralized custody.
Hermes implements a cross-chain atomic swap protocol using Hash Time Locked Contracts (HTLCs) with time-locked escrow contracts on both Ethereum and Stellar chains. The system ensures trustless, atomic exchanges without requiring centralized custody.
Ethereum (EVM): Solidity contracts built with Foundry framework
EscrowFactory
deploys source and destination escrow contractsEscrowSrc
and EscrowDst
handle the actual token locking and unlockingStellar: Rust-based Soroban smart contracts
The resolver service (resolver/nevm.ts
) orchestrates the four-step atomic swap process:
The system uses deterministic contract deployment to ensure both parties can independently verify escrow addresses before funding, eliminating trust requirements.
Sophisticated timelock encoding ensures proper sequencing:
The resolver maintains state consistency across chains by:
const secret = random32Bytes();
const hashlock = keccak256(secret);
Each swap uses a unique 32-byte secret, with its keccak256 hash serving as the commitment.
The system doesn't actually "bridge" tokens but rather enables atomic exchanges of native tokens on each chain, avoiding the complexities and risks of wrapped token approaches.
Extensive environment variable configuration supports multiple networks and deployment scenarios, with separate variables for frontend and backend services.
This architecture creates a trustless bridge that leverages the strengths of both Ethereum's programmability and Stellar's efficiency while maintaining security through cryptographic commitments and time-based constraints.