Search projects, hackathons, sponsors and tech

    ← All projects

    PalletHtlc

    Substrate-based pallet to enable atomic swaps between EVM-based chains and Polkadot

    Demo

    About

    The current project implement a Substrate FRAME pallet that implements hashed timelock contracts (HTLCs) that can be used to facilitate cross chain swaps. The Substrate pallet, follows the logic of the cross-chain-swap: https://github.com/1inch/cross-chain-swap smart contracts by 1inch. The core logic of the pallet handles both EscrowSrc and EscrowDst contracts as well as ways to withdraw assets from them and cancel them. 1inch Fusion+ cross chain swaps utilize both the cross-chain-swap smart contracts and the limit-order-protocol smart contracts: https://github.com/1inch/limit-order-protocol/tree/master/contracts For the purposes of this proof-of-concept there are many simplifications that need to be explored further. Currently, makers (actors) who want to swap across chains, need to create a SwapIntent and there is no Dutch auction implemented to run as the one implemented in the limit-order-protocol smart contracts.

    How it's made

    This project is a Substrate-based FRAME pallet https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html The pallet is implemented in Rust and can be used by any Substrate-based blockchain or parachain and the intended target is to be used by Polkadot or Polkadot's AssetHub to facilitate cross-chain swaps.