#monerofalls13%ondelistings

A decentralized Bitcoin (BTC) to Monero (XMR) atomic swap allows two parties to exchange BTC for XMR trustlessly, without using a central exchange, an escrow agent, or revealing private identities.

The core challenge in swapping BTC for XMR is asymmetric smart-contract support: Bitcoin supports Hash Time-Locked Contracts (HTLCs), whereas Monero does not have a scripting language to support standard smart contracts.

To bypass this, modern protocols (like the Farcaster/COMIT specification and BasicSwap DEX) use Adaptor Signatures (One-Time Verifiable Encrypted Signatures) paired with a 2-of-2 multisig address on Monero.

Step-by-Step Execution Flow

Assume Bob has BTC and wants XMR, while Alice has XMR and wants BTC.

Step 1: Off-Chain Parameter & Key Exchange

  • Bob and Alice connect via a peer-to-peer network or atomic swap client (such as Haveno, BasicSwap, or UnstoppableSwap).

  • They exchange public keys and create joint control parameters for both blockchains.

  • Alice split-generates a joint 2-of-2 Monero lock address with Bob.

  • Bob constructs a 2-of-2 Bitcoin multisig address requiring signatures from both Alice and Bob.

Step 2: Alice Locks the Monero (XMR)

  • Alice deposits her XMR into the joint 2-of-2 Monero address on-chain.

  • Because Monero lacks time-locked smart contracts, Alice must lock her funds first. She retains protection because the XMR cannot be spent by Bob without her cryptographic signature half.

Step 3: Bob Locks the Bitcoin (BTC)

  • Once Bob sees Alice’s XMR lock transaction confirmed on the Monero blockchain, Bob locks his BTC into the 2-of-2 Bitcoin multisig address.

  • The Bitcoin output is spending-encumbered by two paths:

    1. Claim Path (Alice): Locked until Alice reveals an adaptor signature.

    2. Refund Path (Bob): A time-lock ($T_1$) parameter. If Alice abandons the trade, Bob can reclaim his BTC after $T_1$ expires.

Step 4: Alice Claims the Bitcoin

  • To claim the BTC from Bob’s script address, Alice must publish her spending signature to the Bitcoin network.

  • This signature is cryptographically bound (via Adaptor Signatures) to her private key component for the Monero 2-of-2 address.

  • By broadcasting her transaction to sweep the BTC to her wallet, Alice's signature is made public on the Bitcoin blockchain.

Step 5: Bob Extrapolates Key & Claims Monero

  • Bob observes Alice’s sweep transaction on the public Bitcoin blockchain.

  • Bob extracts the secret key component revealed inside Alice's Bitcoin signature.

  • Bob combines that revealed secret with his own key half to complete the full private spend key for the 2-of-2 Monero address.

  • Bob sweeps the XMR directly into his personal Monero wallet.

Fallbacks & Security Features

  • No Counterparty Risk: Neither user ever hands control of their funds to the other or to a third party. The crypto-math guarantees that either both trades settle or both sides receive their initial funds back.

  • Timelocks & Cancel Safety: If Alice locks her XMR and Bob fails to lock his BTC, Alice can recover her funds after a specified safety duration ($T_2$) using a penalty/cancel signature protocol. If Bob locks BTC and Alice stops responding, Bob sweeps his BTC back via timelock $T_1$.

  • Unlinkable Transactions: On the Monero side, standard ring signatures and stealth addresses shield the swap outputs. The adaptor signature mechanism ensures that no on-chain data links the Bitcoin transaction directly to the Monero lock transaction.

#USDT #ETH #XMR