Introduction

Unstoppable Swaps is an open-source implementation of the COMIT XMR⭢BTC atomic-swap protocol. Two peers exchange coins trustlessly: Monero via time-locked one-sided refund, Bitcoin via HTLC. Liquidity is P2P, private, off-exchange.

Getting Started

1. Basic Fundamentals

Aspect Details
Core binaries swapd (daemon) and swap-cli (offer manager)
Contracts Bitcoin HTLC + adaptor signature; Monero timelock refund
Transport Tor v3 by default, optional clearnet TCP 18031
Dependencies Locally running Bitcoin and Monero full nodes (or RPC endpoints)
Fee model Makers set a spread (default 0.25 %) collected in BTC

2. Why Run Your Own Nodo?

  • Keep BTC–XMR liquidity outside centralised exchanges
  • Earn maker fees on posted offers
  • Preserve privacy: Tor transport, no KYC, no counter-party data leaks
  • Strengthen network resilience; more daemons → faster price discovery

3. Minimum Hardware & Network

Resource Requirement
Disk 500 MB for swap DB; plus Bitcoin (≈450 GB) and Monero (≈130 GB) if local
RAM 1 GB free
CPU Dual-core 64-bit (AVX2 speeds adaptor-sig verify)
Bandwidth ≈3 GB per month for an active maker
Ports 18031 (swap P2P), 9050 (Tor SOCKS)

4. Installation Paths

4.1 Native (Linux / macOS / Windows)

curl -LO https://github.com/unstoppableswap/unstoppable_swap/releases/download/v0.5.2/swapd-x86_64-linux.tar.gz
tar -xzf swapd-x86_64-linux.tar.gz
sudo mv swapd swap-cli /usr/local/bin
swapd --data-dir ~/.swapd --monero-daemon-uri 127.0.0.1:18081 --bitcoin-rpc-uri 127.0.0.1:8332 --tor

4.2 Docker (fastest cross-platform)

docker run -d --name swapd \
  -v $HOME/swap-data:/data \
  -p 18031:18031 \
  unstoppableswap/swapd:latest \
  --data-dir=/data --tor \
  --monero-daemon-uri host.docker.internal:18081 \
  --bitcoin-rpc-uri host.docker.internal:8332

4.3 Systemd Service (auto-restart)

[Unit]
Description=Unstoppable Swap Daemon
After=network.target

[Service]
ExecStart=/usr/local/bin/swapd --data-dir=/var/lib/swapd --tor \
  --monero-daemon-uri 127.0.0.1:18081 --bitcoin-rpc-uri 127.0.0.1:8332
User=swap
Restart=on-failure

[Install]
WantedBy=multi-user.target

5. Key Command-Line Flags

Flag Purpose
--monero-daemon-uri RPC endpoint for monerod
--bitcoin-rpc-uri RPC endpoint for bitcoind
--tor / --no-tor Enable or disable Tor transport
--maker-fee-rate Set maker fee (e.g. 0.0025 = 0.25 %)
--max-concurrent-swaps Limit live contracts to avoid over-allocation
--log-level debug Verbose logging for troubleshooting

6. Securing the Nodo

  1. Run under a non-root user.
  2. Keep RPC creds for Bitcoin/Monero on localhost only.
  3. Use Tor; clearnet reveals IP and weakens plausible deniability.
  4. Back up the swap data directory (stores refund keys) off-site.
  5. Monitor for new releases; protocol patches can be critical.

7. Performance & Maintenance

Task Frequency
Check swap queue (swap-cli status) Daily
Verify Bitcoin and Monero daemon heights Daily
Rotate Tor onion keys Monthly
Update swapd to latest tag On every release

8. Advanced Integrations

Scenario Steps
Headless market-maker bot Use swap-cli offers.json plus cron to keep spreads updated
Multi-wallet treasury Point to external hardware signer via Bitcoin RPC signrawtransactionwithwallet
Front-end dashboard Query REST API /v1/swaps and visualise in Grafana

9. Troubleshooting Quick Chart

Symptom Likely Cause Fix
No XMR funding tx seen Monero node out of sync resync monerod or point to remote
BTC HTLC refund tx invalid Wrong nLockTime upgrade swapd (protocol change)
Tor circuit errors Tor service down systemctl restart tor

11. Bottom Line

Running an Unstoppable Swap nodo costs little more than the Bitcoin + Monero nodes you probably already maintain, yet unlocks non-custodial XMR–BTC liquidity and maker-fee revenue. A weekend’s setup earns you censorship-resistant exchange rails forever.

Community & Resources