Cross-chain swap protocol enabling secure, atomic token swaps between Ethereum and Cardano testnets.
Cardano warmhole is a decentralized, bidirectional atomic-swap bridge that extends 1inch’s Fusion+ protocol to enable secure token swaps between Ethereum and Cardano without requiring an EVM environment on Cardano. The project bridges these two fundamentally different blockchains by implementing custom Hashed Timelock Contracts (HTLCs) on both sides—leveraging Ethereum's keccak256-based hashlocks and Cardano's native Plutus scripts written in Aiken.
On the Cardano side, the solution consists of two distinct Plutus validator scripts developed in Aiken: a “source” contract and a “destination” contract. Each swap generates two UTxOs per contract—a primary UTxO locking the swap funds under a hashlock (using keccak256 hash from Ethereum) and a POSIXTime timelock, and a secondary UTxO containing a safety deposit that incentivizes the resolver. This architecture was designed to simulate 1inch’s factory-pattern contracts on Cardano, ensuring that each swap instance is isolated and verifiable. The Aiken code compiles into CIP-57 blueprints (plutus.json files) and .plutus scripts, which define the on-chain logic and addresses used in the swap process.
For off-chain Cardano interactions, the project uses Mesh.js along with the Blockfrost API. Mesh.js facilitates wallet management with light clients such as Eternl (which can import seed phrases from Daedalus or Lace), transaction building, datum encoding, and UTxO submission. Blockfrost webhooks provide near real-time monitoring of script address UTxOs to detect locking events and secret revelations. This setup enables seamless off-chain coordination without running a full Cardano node.
On the Ethereum side, the project leverages and adapts 1inch’s existing Fusion+ cross-chain resolver and Limit Order Protocol contracts deployed on testnets like Sepolia. A Node.js relayer service continuously listens to both blockchains, detecting locks and reclaims UTxOs on Cardano, then triggering corresponding HTLC calls on Ethereum. It also extracts secrets revealed in transactions on either chain’s logs and atomically redeems the counterpart swap.
By combining these elements—the Aiken-written Plutus on-chain HTLC scripts on Cardano, Mesh.js off-chain tooling, Blockfrost infrastructure, and 1inch’s tested Ethereum contracts—cardano-warmhole delivers a secure, performant, and incentive-aligned atomic swap experience. It preserves the hashlock and timelock guarantees of Fusion+, while realistically fitting Cardano’s extended UTxO model and architecture, without relying on heavyweight EVM compatibility layers. This makes it a robust and extensible foundation for cross-chain liquidity and DeFi interoperability between Cardano and Ethereum ecosystems.
I built cardano warmhole by carefully integrating custom smart contracts and off-chain infrastructure to bridge Cardano and Ethereum according to 1inch Fusion+ atomic swap standards. The backbone of the Cardano side is two validator scripts written in Aiken—each simulates a “source” or “destination” factory contract, producing swap- and safety-deposit UTxOs per instance. After authoring the contracts, I compiled them to CIP-57 blueprints (plutus.json), then to .plutus scripts, using Aiken’s streamlined build tooling for reliable on-chain deployment.
For Cardano integration, I leveraged Mesh.js alongside the Blockfrost API. Mesh.js proved essential for wallet management—especially with the Eternl light wallet, which easily restored testnet accounts from Daedalus/Lace seed phrases—UTxO construction, and datum encoding. Blockfrost was a pivotal partner: its webhook feature let the relayer and frontend detect new swaps or secret revelations on script addresses in near real-time, all without running a full Cardano node, drastically cutting infrastructure overhead.
On the Ethereum side, I adapted 1inch’s Fusion+ cross-chain resolver code and deployed their trusted Limit Order Protocol contracts to sepolia testnet. The Node.js relayer service tied everything together: it watched Cardano HTLC UTxOs for lock or claim events (via Blockfrost), mirrored those by calling the Ethereum HTLCs, and vice versa. Extraction of secrets from transaction logs and automating counterpart redemptions on the other chain enabled atomic cross-chain coordination.
A particularly hacky yet impactful trick: to emulate EVM’s factory pattern (where contracts spawn instances), I used dual-UTxOs per Cardano script—each swap gets a fresh, isolated pair—eliminating global state, and keeping swaps independent and recoverable. Instead of full nodes, I relied on instant webhooks to maintain responsiveness—turning what could’ve been heavy infrastructure into a lightweight, developer-friendly build and demo environment.
In sum, cardano-warmhole brings together Aiken-based Plutus scripting, Mesh.js, Blockfrost, Ethereum smart contracts, and clever relayer choreography, producing a seamless, secure atomic swap workflow that leverages each ecosystem’s unique strengths.

