project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

evm-cosmos

Atomic swaps between Sepolia & Neutron using 1inch LOP & CosmWasm. Secure, trustless.

evm-cosmos

Created At

Unite Defi

Project Description

We build this project which enables trustless atomic swaps between Ethereum’s Sepolia testnet and Neutron’s pion-1 testnet, using forked 1inch Limit Order Protocol and cross-chain-swap contracts for EVM and a CosmWasm contract with dstEscrow/srcEscrow structs for Cosmos. Makers sign LOP orders (EVM) or equivalent orders (Cosmos), which a resolver contract validates and executes, securing funds in CREATE2-generated escrow addresses. This setup, leveraging 1inch’s audited code and CosmWasm’s flexibility, ensures secure, decentralized cross-chain transactions.

How it's Made

Project Overview Neutron Explorer is a cross-chain atomic swap solution that bridges Ethereum’s Sepolia testnet and Neutron’s pion-1 testnet. By extending the 1inch Limit Order Protocol (LOP), it enables trustless asset swaps between EVM and Cosmos ecosystems. The system ensures secure, decentralized transactions through smart contracts, leveraging deterministic address generation and robust frameworks to streamline cross-chain interactions.

Technology Stack The project integrates a combination of EVM and Cosmos technologies. On the EVM side, we forked the 1inch Limit Order Protocol and cross-chain-swap contracts, adapting them for Sepolia testnet compatibility. Solidity powers the EscrowFactory, EscrowSrc, and EscrowDst contracts, with funds secured in a pre-determined address via CREATE2. On the Cosmos side, a CosmWasm contract, deployed on Neutron’s pion-1 testnet using https://neutron.celat.one/neutron-1, manages funds with dstEscrow and srcEscrow structs, enabling seamless atomic swaps.

System Implementation The atomic swap process begins with the maker signing an LOP order on the EVM side or an equivalent order on the Cosmos side, defining swap terms. Funds are locked in EscrowSrc (Sepolia) or srcEscrow (Neutron) contracts. A resolver contract validates signatures and executes the swap, transferring funds to EscrowDst or dstEscrow. The forked 1inch cross-chain-swap contracts facilitate EVM-Cosmos communication, ensuring atomicity and trustless execution across chains.

Partner Technologies and Benefits Forking 1inch’s LOP and cross-chain-swap contracts provided a robust, audited foundation, significantly reducing development time. CosmWasm’s flexibility enabled efficient contract deployment on Neutron, supporting complex swap logic. The use of CREATE2 for deterministic address generation enhanced security by ensuring predictable escrow contract deployment, critical for cross-chain trust.

Notable Techniques Adapting 1inch’s contracts for Sepolia required custom modifications, a practical workaround to enable compatibility. Designing a Cosmos-compatible LOP equivalent in CosmWasm was a significant challenge, necessitating careful struct alignment with EVM functionality. The resolver contract’s ability to coordinate cross-chain swaps without intermediaries stands out as a key innovation, ensuring secure and decentralized operation.

background image mobile

Join the mailing list

Get the latest news and updates