
1Link
1inch Fusion+ for trustless ETH-NEAR cross-chain swaps based dApp
About
This project is a cross-chain bridge that enables token transfers between Ethereum (EVM) and NEAR Protocol (non-EVM) blockchains. It is built on three components: - Ethereum Smart Contracts (Solidity): Manage escrow, partial fills using Merkle tree verification, and contract creation via a factory pattern. - NEAR Contracts (Rust): Handle escrow, token storage, and resolver logic, with deployments managed through NEAR CLI and WASM upgrades. - Python Relayer Service: Listens to chain events, manages transaction states, and exposes APIs for order management. Key features include: - Hashed Timelock Contracts (HTLC) for secure transactions. - Escrow + Merkle Tree Verification for partial fills and split transactions. - State Management & Monitoring by the relayer for reliable cross-chain execution.
How it's made
This project is a cross-chain bridge connecting Ethereum (EVM) and NEAR Protocol (non-EVM) with a modern full-stack architecture. Frontend: Built with Next.js + React, using NEAR Wallet Selector for NEAR integration, Ethers.js for Ethereum connectivity, Zustand for state management, and Tailwind CSS for styling. Relayer System: A Python + FastAPI service that runs Ethereum (Web3.py) and NEAR listeners, monitors events, manages swap states, and securely transmits secrets for atomic swaps. Smart Contracts: Ethereum: Solidity-based escrow and factory contracts. NEAR: Rust-based escrow contracts. Both coordinated through Hashed Timelock Contracts (HTLC) for secure, atomic transfers. When a user initiates a transfer, the system deploys escrow contracts on both chains, tracks their states, and uses the relayer to coordinate token transfers securely.