Revolutionary cross-chain DEX enabling seamless atomic swaps between Ethereum & Aptos
ChainShift is a production-ready cross-chain atomic swap protocol deployed on Ethereum Sepolia and Aptos Testnet that enables trustless token swaps without traditional bridging delays or risks.
What We Actually Built:
π Atomic Cross-Chain Swaps Our core innovation uses Hash Time Locked Contracts (HTLCs) to guarantee atomic execution across chains. Users can swap mUSDC on Ethereum for mUSDC on Aptos (or vice versa) with cryptographic guarantees - either both sides complete or both automatically refund.
ποΈ Smart Contract Infrastructure
π± Dual Execution Modes
π Live Integrations
π― Proven User Flow Connect both wallets β Select cross-chain tokens β Get 1inch-optimized quote β Execute atomic swap with single signature β Monitor automatic cross-chain completion in 5-10 minutes.
π§ͺ Currently Deployed Working on testnets with mUSDC-ETH and mUSDC-APT tokens, comprehensive test suite, and production-ready smart contracts awaiting mainnet deployment.
Technical Achievement: We've solved the cross-chain atomic swap challenge with actual deployed contracts, 1inch integration, and a polished interface - not just a concept, but working code.
Bridging DeFi across chains with atomic swap technology
A novel cross-chain swap extension for 1inch Fusion+ that enables secure, trustless, bidirectional token swaps between Ethereum and Aptos networks using atomic swap protocols
ChainBridge Protocol implements a trustless cross-chain atomic swap mechanism that enables users to exchange tokens between Ethereum and Aptos networks while preserving the security guarantees of both blockchains. Built for the 1inch Cross-Chain Hackathon.
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Smart β
β (React) βββββΊβ (Node.js) βββββΊβ Contracts β
β β β β β β
β β’ Swap Interfaceβ β β’ Event Monitor β β β’ Ethereum β
β β’ 1inch SDK β β β’ Cross-chain β β β’ Aptos (Move) β
β β’ Multi-wallet β β Coordination β β β’ Token Mgmt β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
# Clone the repository
git clone https://github.com/Rakesh-sahoo07/chainbridge.git
cd chainbridge
# Install Ethereum dependencies
cd smart-contracts/ethereum
npm install
# Install Aptos dependencies
cd ../aptos
npm install
# Copy environment files
cp .env.example .env
# Fill in your API keys and configuration
# Compile Ethereum contracts
cd smart-contracts/ethereum
npm run compile
# Run tests
npm test
# Compile Aptos contracts
cd ../aptos
npm run compile
ChainBridge Protocol has been thoroughly tested with real on-chain transactions:
0x0375c6db...
0xba85c646...
CrossChainSwapEthereum.sol
Core atomic swap functionality with hashlock/timelock mechanisms.
function initiateSwap(
bytes32 swapId,
bytes32 hashlock,
address recipient,
uint256 amount,
address token,
uint256 timelock
) external;
function completeSwap(bytes32 swapId, bytes32 secret) external;
function refund(bytes32 swapId) external;
TokenManager.sol
Token registry and cross-chain mapping management.
CrossChainSwapAptos.move
Move-native implementation of atomic swap protocol.
public entry fun initiate_swap(
initiator: &signer,
swap_id: vector<u8>,
hashlock: vector<u8>,
recipient: address,
amount: u64,
timelock: u64,
)
public entry fun complete_swap(
completer: &signer,
swap_id: vector<u8>,
secret: vector<u8>,
)
cd smart-contracts/ethereum
npm run compile # Compile contracts
npm test # Run test suite
npm run deploy:sepolia # Deploy to Sepolia
npm run node # Start local node
cd smart-contracts/aptos
npm run compile # Compile Move modules
npm run publish # Publish to testnet
npm run deploy # Initialize contracts
chainbridge/
βββ smart-contracts/
β βββ ethereum/ # Ethereum contracts (Solidity)
β β βββ contracts/
β β βββ test/
β β βββ scripts/
β β βββ hardhat.config.js
β βββ aptos/ # Aptos contracts (Move)
β βββ sources/
β βββ scripts/
β βββ Move.toml
βββ frontend/ # React application (future)
βββ backend/ # Node.js services (future)
βββ docs/ # Documentation
ChainBridge Protocol is designed for seamless integration with 1inch Fusion+:
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
This is a hackathon project for demonstration purposes. While built with production-ready practices, please conduct thorough testing and security audits before any mainnet deployment.
For questions and support, please open an issue in the GitHub repository or contact the development team.
Built with β€οΈ for the 1inch Cross-Chain Hackathon
Bridging the future of DeFi, one atomic swap at a time. πβοΈ