Adha-Inch is a proof-of-concept implementation that extends the capabilities of 1inch’s Fusion+ intent-based cross-chain swap protocol to the Etherlink Ghostnet testnet.
The Core Problem:
Presently liquidity across chains is heavily fragmented and precariously reliant on centralized bridges, creating vulnerabilities like collusion adn economic misalignment. 1inch brings a great approach with robust architecture to sew this fragmented ecosystem.
How It Works:
- The system builds on 1inch’s Fusion+ four-phase protocol:
- Intent Broadcast: A maker publishes a swap intent with token details and chain specifications.
- Order Fill: A taker accepts and commits to the swap, and a shared secret is generated.
- Escrow Deployment: Smart contract factories on both chains create individual escrow contracts locked by hashlock (for authenticity) and timelock (for fallback safety).
- Atomic Claim: The taker claims their funds by revealing the secret, enabling the maker to claim their counterpart—guaranteeing atomicity. This ensures that either both sides succeed or both recover—an elegant enforcement of symmetry without requiring third-party validators.
Security Model:
- Adha-Inch enforces cryptographic security:
- Hashlocks ensure only the secret holder can unlock funds.
- Timelocks provide structured timeout mechanisms for fund recovery.
- Asymmetric Timeout Logic: Shorter on destination chains to encourage prompt claims, longer on source chains to enable reliable refunds.
Smart Contract Architecture
Following Fusion+ patterns, we implemented a minimal and gas-optimized EscrowFactory on Etherlink that mirrors Base Sepolia’s factory. Escrows are per-order, stateless outside their lifecycle, and emit full transparency logs for offchain validation and dispute resolution.
Technical Stack:
Solidity using Foundry for high-performance compilation and testing
TypeScript + Ethers.js for orchestration and simulation
1inch Cross-Chain SDK (manually patched for Etherlink support)
Anvil for local fork testing of Base Sepolia
Notably, 1inch’s SDK did not natively support Etherlink. We manually deployed the necessary 1inch contracts to Ghostnet and modified node_modules internals to recognize Etherlink as a supported chain—allowing us to test Fusion+ flows without altering 1inch’s upstream codebase. This controlled hack let us test core features as if Etherlink was natively supported.
Why Etherlink?
Etherlink provides ultra-low latency, fast finality, and low fees, making it a compelling testbed for cross-chain experiments. Its modern tooling and responsive developer support helped us extend the 1inch architecture without friction. As sponsors, Etherlink’s support enabled meaningful experimentation with Tezos’ next-gen infrastructure.
Current Capabilities
- Full end-to-end swaps between Base Sepolia and Etherlink
- Escrow-based logic with timelock & hashlock enforcement
- Refunds on timeout
- Multi-token ERC-20 support
- Accurate gas simulation
Limitations + Future Improvements:
- Only testnet deployments
- Manual intent matching (no relayer or automated resolver yet)
- CLI-based interaction; no frontend UI
- No security audit (not mainnet-ready)
We built Adha-INch, a cross-chain swap protocol that extends 1inch Fusion to operate seamlessly between EVM chains (Base Sepolia) and non-EVM-standard Layer 2s such as Etherlink. The system centers around intent-based swapping, where offchain orders are fulfilled by resolvers with programmable escrow contracts using hashlocks and timelocks.
The core architecture includes:
- A custom implementation of the 1inch LOP, pruned and tailored for the Etherlink testnet. Since Etherlink is still gaining ecosystem support, this required a clean-room deployment of the essential 1inch contracts.
- The 1inch cross-chain SDK, which currently does not natively support Etherlink. To bridge this gap, we forked the SDK and modified it locally (including hardcoded address maps and chain configuration in node_modules) to enable offchain order signing and resolution logic on Etherlink.
Our test suite leverages jest, ethers.js, and deterministic Anvil forks with controlled mining to ensure reliable simulations of cross-chain execution flows, including failure scenarios like invalid secrets or expired orders.
One of the most hacky (yet rewarding) parts was modifying the cross-chain SDK internals to trick it into recognizing Etherlink as a first-class citizen. This involved not only updating chain configs, but also patching resolver lookups, token maps, and signature encodings to align with Etherlink’s chain ID and quirks.
It was great learning.