MoleSwap

P2P base cross chain swap protocol using secret keys swap and key management by Oasis Sapphire, all without relying on central servers such as relayers.

  • 0 Raised
  • 76 Views
  • 0 Judges

Categories

  • ETHDam - Security Track
  • Oasis - Build natively on Sapphire

Gallery

Description

MoleSwap: A Novel Cross-Chain Swap Protocol Inspired by Intent Architecture

MoleSwap is a cross-chain swap protocol inspired by the Intent architecture that enables peer-to-peer asset swaps without relying on off-chain servers like relayers.  MoleSwap's innovative approach addresses the limitations of existing cross-chain swap solutions and paves the way for a more secure, decentralized, and versatile cross-chain asset exchange ecosystem.

Slide: https://docs.google.com/presentation/d/1fw9OqQkL4qSi_tdxZrQ6iVeRF5npGhMJi8LnM7AclVM/edit?usp=sharing

GitHub Repository: https://github.com/Kourin1996/ethdam-2024

LiveDemo: https://ethdam-2024-ashen.vercel.app/


Key Highlights:

  • Peer-to-peer swaps: Eliminates reliance on off-chain servers and relayers.
  • Flexible asset swaps: Supports a wide range of tokens without liquidity provider limitations.
  • Cross Chain NFT purchases: Enables NFT purchases using tokens from other chains.
  • Decentralized architecture: Leverages Oasis Sapphire for secure key management and eliminates reliance on centralized messaging protocols.

Problems:

While existing cross-chain swaps like Stargate and Hop Protocol have reached practical use, they still face challenges such as long swap completion times and limited support for chains and tokens. Additionally, swap solutions based on the lock-mint model carry the risk of asset loss due to smart contract bugs.

Ideas:

MoleSwap introduces a novel swap protocol utilizing the simple concept of account exchange. Leveraging Oasis Sapphire's confidential storage, it generates and manages secret keys, revealing them only upon mutual agreement between parties. Secret keys are shared exclusively with the intended recipient.

How it works:

Before initiating a swap, keys are generated within Oasis Sapphire, and only their addresses are revealed. Parties deposit the required tokens on their respective chains into the corresponding accounts. They then verify and agree upon each other's account balances. Once mutual agreement is confirmed within the smart contract, each party reveals the key to the other's account, containing assets different from what they originally sent.

Advantages:

At its core, MoleSwap is a key exchange protocol, eliminating the constraints on swappable chains and tokens as it operates without liquidity providers. It also enables purchasing NFTs using tokens from other chains.

Moreover, MoleSwap eliminates the need for cross-chain messaging protocols like relayers, offering the advantage of not relying on centralized off-chain servers.

What I've done:

I successfully implemented a smart contract for key management on Oasis Sapphire and a WebUI using Next.js, demonstrating the feasibility of cross-chain swaps. 

Future plans:

Future plans include implementing features such as automatic token deposit notification to Oasis Sapphire via Oasis Privacy Layer and Cellar Inter-chain Messaging to enhance user experience. Additionally, the team aims to explore privacy-enhancing features that prevent the disclosure of swappable tokens and addresses to the public.

Attachments