Trustless Cross-Chain Atomic Swaps Between Ethereum and Sui
Fission enables secure, decentralized token exchanges across Ethereum and Sui blockchains without requiring trusted intermediaries. Using cryptographic hash locks and time-locked escrows, Fission guarantees that swaps either complete atomically or allow safe fund recovery.
- π Trustless: No custody of funds by centralized parties
- βοΈ Atomic: Swaps complete entirely or fail safely with fund recovery
- π Cross-Chain: Seamless exchanges between Ethereum and Sui ecosystems
- π‘οΈ Secure: Time-locked escrows with cryptographic guarantees
- π Flexible: Support for partial fills and multiple order fulfillment
- π Economically Secure: Safety deposits prevent griefing attacks
Fission operates through a dual-escrow system:
- Source Escrow: Holds maker's tokens on the origin chain
- Destination Escrow: Holds resolver's tokens on the target chain
- Hash Lock: Cryptographic secret enables atomic claiming
- Time Locks: Escalating permissions ensure safe fund recovery
π For detailed technical specifications, see Architecture Documentation
The following diagrams illustrate the contract interaction flows for cross-chain atomic swaps between Ethereum and Sui:
- Node.js 18+ and npm/yarn
- Rust and Cargo (for Sui development)
- Foundry (for Ethereum development)
# Clone the repository
git clone https://github.com/Suryansh-23/fission.git
cd fission
# Install dependencies for cross-chain SDK
cd cross-chain-sdk
npm install
# Install dependencies for off-chain services
cd ../off-chain/resolver
npm install
import { SuiCrossChainOrder, EvmCrossChainOrder } from '@fission/cross-chain-sdk'
// Sui β Ethereum swap
const suiOrder = SuiCrossChainOrder.new({
makerAsset: new SuiAddress('0x2::sui::SUI'),
takerAsset: EvmAddress.fromString('0xA0b86a33E6441E27'), // USDC
makingAmount: 1000000000n, // 1 SUI
takingAmount: 2000000n, // 2 USDC
maker: new SuiAddress('0x...'),
receiver: EvmAddress.fromString('0x...')
}, escrowParams, auctionDetails)
// Ethereum β Sui swap
const evmOrder = EvmCrossChainOrder.new(
factoryAddress,
orderData,
escrowParams,
auctionDetails
)
cd off-chain/resolver
npm run start
fission/
βββ contracts/ # Smart contracts
β βββ evm/ # Ethereum Solidity contracts
β β βββ resolver/ # Resolver and escrow contracts
β βββ move/ # Sui Move contracts
β βββ fusion_plus/ # Source/destination escrow modules
βββ cross-chain-sdk/ # TypeScript SDK
β βββ src/ # SDK implementation
β βββ tests/ # Integration tests
βββ off-chain/ # Off-chain infrastructure
β βββ resolver/ # Order fulfillment service
β βββ relayer/ # Order broadcast service
βββ docs/ # Documentation
cd contracts/move/fusion_plus
sui move test # Run tests
sui move build # Build contracts
cd contracts/evm/resolver
forge test # Run tests
forge build # Build contracts
forge script Deploy # Deploy contracts
cd cross-chain-sdk
npm run test # Run unit tests
npm run test:integration # Run integration tests
npm run build # Build SDK
# Resolver service
cd off-chain/resolver
npm run dev # Development mode
npm run test # Run tests
# Relayer service (Go)
cd off-chain/relayer
make build # Build relayer
make test # Run tests
# Start local networks
npm run start:anvil # Ethereum local node
npm run start:sui-local # Sui local network
# Run integration tests
cd cross-chain-sdk
npm run test:e2e
# Sui Move tests
cd contracts/move/fusion_plus
sui move test
# Ethereum tests
cd contracts/evm/resolver
forge test -vvv
- Ethereum: Mainnet, Arbitrum, Polygon
- Sui: Mainnet
- Ethereum: Sepolia, Arbitrum Sepolia
- Sui: Testnet, Devnet