CardanoSwap+

Atomic swaps between EVM chains & Cardano using 1inch Fusion+ with partial fills & timeout recovery

CardanoSwap+

Created At

ETHGlobal New Delhi

Project Description

CardanoSwap+ - Bridging EVM Chains and Cardano through 1inch Fusion+

CardanoSwap+ is a groundbreaking extension of the 1inch Cross-chain Swap (Fusion+) protocol that enables seamless, trustless atomic swaps between any EVM-compatible chains and Cardano. Built upon the solid foundation of C, our implementation incorporates Fusion+'s Dutch auction model and extends the original design to support partial fills with Merkle tree optimization.

By integrating Cardano as a non-EVM target chain into the 1inch Fusion+ infrastructure, we unlock bidirectional DeFi interoperability between the Cardano ecosystem and all supported EVM networks (Ethereum, Polygon, Arbitrum, Base, BSC, and more) without relying on traditional bridges or wrapped tokens.

The Problem We Solve

Current cross-chain solutions between EVM chains and Cardano rely on centralized bridges that introduce custody risks, have suffered billions in hacks, and create friction through wrapped tokens. Users wanting to move value between Cardano and EVM ecosystems (Ethereum, Polygon, Arbitrum, Base, BSC, etc.) face:

  • Bridge custody risks - $2.5B+ lost to bridge exploits
  • Wrapped token complexity - Additional contracts and counterparty risk
  • Limited liquidity - Fragmented across multiple bridge providers
  • Poor UX - Multi-step processes with high failure rates

Our Solution

CardanoSwap+ leverages Hash Time-Locked Contracts (HTLCs) and the proven 1inch Fusion+ infrastructure to create truly atomic cross-chain swaps. Users maintain full custody of their assets throughout the swap process, while professional resolvers compete in Dutch auctions to provide optimal pricing and execution.

Key Technical Innovations

πŸ”— Enhanced Atomic Swap Foundation Building upon CardanoSwap's proven HTLC implementation, we've integrated Fusion+'s sophisticated Dutch auction mechanism. This combines the security guarantees of atomic swaps with the competitive pricing and professional market maker ecosystem of Fusion+, creating optimal execution for users.

🌳 Advanced Partial Fill Mechanism We've extended the original CardanoSwap design with our Merkle tree-based partial fill system, allowing large orders to be executed incrementally across multiple transactions. This innovation improves capital efficiency, reduces slippage, and makes institutional-size swaps viable across different blockchain architectures.

πŸ“‘ Robust Timeout Contingency If a resolver fails to complete a swap within the specified timelock, our relayer service automatically publishes the necessary secrets to IPFS, enabling public resolution of the swap. This ensures that user funds are never permanently locked, even in edge cases of resolver failure.

Architecture Deep Dive

Cross-Chain Relayer Service

Our TypeScript-based relayer monitors both EVM chains and Cardano simultaneously, validating order parameters for consistency across different network architectures and managing the cryptographic secrets that enable atomic execution. The relayer ensures that escrow contracts on both EVM and Cardano chains are properly configured before signaling resolvers to proceed.

Cardano Smart Contracts

Built using Plutus V3 and optimized with HarmonicLabs's plu-ts wrapper, our validators implement secure HTLC functionality while integrating seamlessly with Cardano's native token system. The contracts handle both ADA and custom Cardano native assets, with built-in timelock mechanisms for automatic refunds.

Resolver Network

Our resolver implementation participates in Fusion+ Dutch auctions, competing to fill cross-chain orders by providing optimal pricing. Resolvers lock funds in escrow contracts on both chains and receive secrets only after successful validation, ensuring atomic execution.

Demonstrated Capabilities

βœ… Bidirectional swaps - Any EVM token ↔ ADA and cross-network token swaps
βœ… Multi-chain support - Ethereum, Polygon, Arbitrum, Base, BSC, and all Fusion+ networks
βœ… Hashlock preservation - Cryptographic security maintained across different architectures
βœ… Timelock functionality - Automatic refunds prevent fund loss across all chains
βœ… On-chain execution - Live testnet demonstrations
βœ… Partial fill support - Merkle tree optimization for large orders
βœ… Timeout recovery - IPFS-based contingency for resolver failures

Market Impact

CardanoSwap+ opens the $15+ billion Cardano ecosystem to seamless DeFi integration across all major EVM networks while providing Cardano users direct access to liquidity on Ethereum, Polygon, Arbitrum, Base, BSC, and other Fusion+-supported chains. By eliminating bridge risks and maintaining atomic guarantees, we enable a new class of cross-chain DeFi applications that were previously impossible or prohibitively risky.

Real-World Use Cases

  • Multi-chain arbitrage - Exploit price differences across Cardano and multiple EVM DEXs
  • Cross-ecosystem yield farming - Access opportunities across Cardano, Ethereum, Polygon, and L2s
  • Portfolio rebalancing - Move assets between any supported network without custody risk
  • Institutional trading - Large-scale swaps across multiple chains with partial fill optimization

Technical Excellence

Our implementation showcases deep technical innovation across multiple domains:

  • Protocol Design - Successfully adapted intent-based architecture to UTXO model
  • Smart Contract Engineering - Robust Plutus V3 contracts with comprehensive error handling
  • Cross-Chain Coordination - Sophisticated relayer logic managing dual-chain state
  • Developer Experience - TypeScript integration bridging Haskell and JavaScript ecosystems

Future Vision

CardanoSwap+ represents just the beginning of true blockchain interoperability. Our architecture provides a foundation for:

  • Multi-asset support - Native tokens beyond ADA across all supported chains
  • Layer 2 integration - Cardano sidechains and all major Ethereum L2s
  • Advanced order types - Options, futures, and structured products across networks
  • Mobile integration - Wallet SDKs for seamless multi-chain user experience

By proving that secure, trustless cross-chain swaps are possible between fundamentally different blockchain architectures, CardanoSwap+ paves the way for a truly unified DeFi ecosystem where users can access the best opportunities across Cardano and the entire EVM universe without compromise.

How it's Made

How It's Made Architecture Overview CardanoSwap+ extends 1inch Fusion+ to support Cardano through a three-component architecture: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ EVM Chains β”‚ β”‚ CardanoSwap+ β”‚ β”‚ Cardano β”‚ β”‚ (Multi-chain) β”‚ β”‚ Relayer β”‚ β”‚ (Plutus V3) β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ Fusion+ Escrow │◄──►│ Dutch Auction │◄──►│ HTLC Validator β”‚ β”‚ 1inch Settlementβ”‚ β”‚ Merkle Sum Tree β”‚ β”‚ Partial Fills β”‚ β”‚ Multi-resolver β”‚ β”‚ IPFS Fallback β”‚ β”‚ Cardano Resolverβ”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Core Components

  1. Cross-Chain Relayer (./relayer)

Monitors EVM chains and Cardano for swap orders Coordinates Dutch auction between resolvers Validates cross-chain order parameters IPFS secret publishing: After resolver deadline expires, automatically publishes secrets to IPFS for public resolution Manages Merkle sum tree state for partial fills

  1. Cardano Validators (./cardano-validator-ts)

Plutus V3 smart contracts implementing HTLC with timelock Partial fill support: Uses Merkle sum tree method to track remaining order amounts Escrow contracts for secure ADA and native token custody TypeScript integration layer for seamless dApp interaction

  1. Cardano Resolver (./cardano-resolver-plu-ts)

Participates in Fusion+ Dutch auctions for cross-chain orders Executes atomic swaps between any EVM chain and Cardano Built with HarmonicLabs's plu-ts wrapper for TypeScript compatibility

Key Innovations Merkle Sum Tree Partial Fills: Instead of simple Merkle trees, we use Merkle sum trees to efficiently track remaining order amounts across partial executions, enabling precise fill tracking with minimal on-chain storage.

IPFS Timeout Recovery: When resolvers fail to complete swaps within the timelock window, our relayer automatically publishes the necessary secrets to IPFS, allowing anyone to resolve the swap and prevent fund lockup.

Plutus V3 Integration: Leveraged latest Cardano smart contract capabilities for enhanced performance and developer experience.

Technology Stack

1inch Fusion+ SDK: Cross-chain swap infrastructure and resolver network Plutus V3: Latest Cardano smart contract platform HarmonicLabs plu-ts: TypeScript wrapper for Plutus development Blockfrost API: Cardano blockchain data provider IPFS: Decentralized storage for timeout contingency TypeScript/Node.js: Unified development stack

*Reference: Used CardanoSwap as technical reference for HTLC patterns### Technology Stack & Integration Points

Core Infrastructure

1inch Fusion+ SDK: Foundation for cross-chain swap orchestration CardanoSwap Base: Starting point for atomic swap contract logic Fusion+ Cross-chain Protocol: Intent-based architecture and resolver network

background image mobile

Join the mailing list

Get the latest news and updates

CardanoSwap+ | ETHGlobal