Read the protocol description and spec - Train Documentation
- Introduces Train, an improved version of HTLC for practical atomic swaps
- Permissionless and trustless protocol without reliance on 3rd parties
- Supports multi-hop transactions for bridging between indirectly connected chains
- Alpha version available for testing on multiple testnets
This repository is organized so that audited, stable implementations live on the main branch, while networks that are still under active development or audit live on dedicated branches.
The following networks are considered stable enough to live directly in main:
-- EVM (Solidity) – chains/evm/solidity
-- Solana – chains/solana
-- Starknet – chains/starknet
-- Fuel – chains/fuel
The following networks are still under active development, testing, or audit.
Each one lives in its own long-lived branch:
- Aptos –
main-add-aptos - Aztec –
main-add-aztec - Bitcoin –
main-add-bitcoin - Stacks –
main-add-stacks - Sui –
main-add-sui - TON –
main-add-ton - XRP –
main-add-xrp
Train is a revolutionary bridging protocol designed to address the challenges of seamless asset movement across the rapidly expanding cryptocurrency ecosystem. As the number of blockchain networks grows, including L1s, L2s, side-chains, and app-chains, the need for efficient and secure cross-chain asset transfer becomes critical.
- Trustless: No reliance on oracle-based systems or 3rd parties
- Permissionless: Open for any participant to join without compromising security
- Multi-hop Transactions: Enables bridging between chains without direct Solver connections
- Censorship Resistant: Decentralized design resistant to censorship attempts
Train introduces an improved version of HTLC that addresses key limitations:
- User creates a PreHTLC, committing funds for the selected Solver
- Solver detects the transaction, generates a Secret, and creates an HTLC on the destination chain
- User observes the destination transaction and converts their PreHTLC to an HTLC on the source chain
- Solver reveals the Secret on both chains to complete the transfer
This approach resolves issues with secret management, claim transactions on the destination chain, and liveness requirements.
Please note that this project is actively under development. It is not ready for deployment on any mainnet environments, unless mentioned as audited. As we continue to experiment and test new ideas, expect significant changes to the interface. Please be prepared for ongoing modifications.
- The initial HTLC implementation was based on the work done in the atomic-port project by Yuki Uichiro