← Back to home

Hashlocked

Trustless EVM ↔ Bitcoin atomic swaps using 1inch battle-tested contracts

Problem Statement

HashLocked is a trustless cross-chain atomic swap protocol that lets you trade between Ethereum-based tokens and Bitcoin without needing to trust any third party, exchange, or intermediary. Think of it like this: You want to trade your ETH for Bitcoin, but you don't want to use a centralized exchange where you have to deposit your funds and trust them. With HashLocked, you can make this trade directly with another person using smart contracts and Bitcoin's native scripting capabilities to guarantee that either both sides of the trade happen, or neither does. Here's how it works in simple terms: You create an order saying "I want to trade X ETH for Y Bitcoin" The protocol locks your ETH in a smart contract with a cryptographic "secret" The other person locks their Bitcoin in a special Bitcoin address using the same secret To claim the Bitcoin, you have to reveal the secret, which automatically lets them claim your ETH If something goes wrong, both parties can get their money back after a timeout The magic is that this all happens without anyone being able to cheat - it's guaranteed by mathematics and blockchain technology. What makes this special: Completely trustless - No company, exchange, or third party can steal your funds Ultra-cheap - Costs about $0.30 in gas fees instead of $300+ on other solutions Real Bitcoin - Uses actual Bitcoin, not wrapped tokens Battle-tested - Built on 1inch's proven smart contract technology used by millions Bidirectional - Works both ways (ETH→Bitcoin and Bitcoin→ETH) This opens up possibilities for decentralized trading between the two biggest cryptocurrencies without the risks of centralized exchanges or the limitations of wrapped tokens. Technical implementation details, deployment guides, and smart contract specifications are available in the README

Solution

Core Architecture HashLocked combines two different blockchain technologies in a novel way:EVM Side (Ethereum/Sepolia):Built on 1inch Limit Order Protocol - We adapted their battle-tested escrow contracts that have secured billions in tradesSmart contracts written in Solidity using Hardhat development frameworkTypeScript for all scripting and automationCustom factory pattern for deploying escrow contracts per trade Bitcoin Side:Native Bitcoin Script Hash Time Locked Contracts (HTLCs) - no third-party protocolsP2SH (Pay-to-Script-Hash) and P2WSH (Pay-to-Witness-Script-Hash) for SegWit compatibilityDirect integration with Bitcoin Core and Mempool.space APICustom transaction builder for funding, claiming, and refunding operations

Hackathon

ETHGlobal Cannes

2025

Prizes

  • 🏆

    Non - EVM Extensions for 1inch Cross - chain Swap (Fusion+)1st place

    1inch

  • 🏆

    🏆 ETHGlobal Cannes 2025 Finalist

    ETHGlobal

Contributors