Trustless Monero-Starknet Atomic Swaps Using DLEQ Proofs

We’ve built a prototype atomic swap bridge that enables trustless XMR ↔ STRK/ETH exchanges on Starknet L2. This brings privacy-preserving currency to Starknet’s DeFi ecosystem without custodians, bridges, or KYC.

What This Enables for Starknet

  • Trustless swaps between XMR and Starknet assets using cryptographic binding via DLEQ proofs
  • Ultra-low gas costs: ~$0.01-0.05 per swap verification (~270k-440k gas)
  • Privacy-respecting gateway to DeFi for Monero users
  • No bridges or custodians - pure cryptographic security

Cairo Implementation Highlights

The implementation leverages Starknet’s Cairo VM capabilities:

  1. DLEQ Proof Verification: On-chain verification using Garaga v1.0.1 MSM library for elliptic curve operations
  2. BLAKE2s Challenge Computation: Gas-optimized at ~500k gas for full verification
  3. Production-Grade Libraries: OpenZeppelin Cairo Contracts v2.0.0 for security primitives
  4. Ed25519 Point Operations: Efficient scalar multiplication and point compression/decompression

Protocol Flow

  1. Alice generates secret scalar t and creates adaptor signature
  2. Alice deploys AtomicLock contract on Starknet with:
    • Hashlock H = SHA-256(t)
    • Adaptor point T = tĀ·G (Ed25519)
    • DLEQ proof proving ∃t: SHA-256(t) = H ∧ tĀ·G = T
  3. Bob verifies DLEQ proof on-chain, unlocks contract by revealing t
  4. Alice detects secret reveal via Unlocked event, completes Monero transaction

Current Development Status

Completed:

  • BLAKE2s challenge compatibility between Rust and Cairo
  • DLEQ proof generation (Rust) and verification (Cairo)
  • Test suite with 139 production-grade test vectors
  • CI/CD workflow with automated testing
  • Informal security audit of critical paths

in Progress:

  • Web interface for testnet experimentation
  • Sepolia testnet deployment
  • Race condition mitigations (two-phase unlock, watchtower service)

Technical Resources

GitHub: GitHub - omarespejel/monero-starknet-atomic-swap: Cross-chain atomic swap: Monero adaptor signatures + Starknet Cairo contracts with ED25519 MSM verification and DLEQ proofs

Known Limitations

This is alpha software under active development:

  • Protocol-level race condition exists
  • Monero integration uses simplified adaptor signatures, not full CLSAG
  • External security audit pending
  • Recommended for small amounts only (under $100 equivalent) until v0.8.0 mitigations

I’m available to discuss Cairo implementation details, Starknet/Cairo technical specifics, and collaboration opportunities

Updates will be posted here as development progresses. Community feedback is essential for building robust infrastructure


Disclaimer: This is experimental software under active development. Do not use with real funds without security audit

Hey,

idk if normal but the repo isn’t public (or wrong link).
Would like to have a look :slight_smile:

G

Hey @gaetbout! The repo is open now, just had some visibility issues initially. You can check it out here: GitHub - omarespejel/monero-starknet-atomic-swap: Cross-chain atomic swap: Monero adaptor signatures + Starknet Cairo contracts with ED25519 MSM verification and DLEQ proofs

Feel free to take a look and let me know if you have any questions or feedback!

Looks great. I think XMR to STRK could bring some great privacy options to Starknet. Currently obtaining and selling XMR can be troublesome, especially with a lot of CEX’s no longer trading it.

Is there a road map to when this could possibly be a reality?