Bitcoin Forum
August 09, 2026, 10:20:30 AM *
News: COLDCARD users only: critical vulnerability risks funds stored on COLDCARD devices; immediate action required
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: TestnetSwap - non-custodial Bitcoin/Litecoin/Monero atomic swaps in the browser  (Read 26 times)
Tech1k (OP)
Copper Member
Newbie
*
Offline

Activity: 11
Merit: 163


View Profile
August 08, 2026, 07:41:36 AM
Merited by LoyceV (12)
 #1

I've been building a suite of testnet tools for a while (a faucet, a wallet, an explorer). The piece I just launched is the hardest one and the one I'd put off longest: TestnetSwap, non-custodial cross-chain atomic swaps that run entirely in the browser. Open source, testnet only.

It swaps tLTC <-> tBTC and Monero (tXMR/sXMR) into tBTC or tLTC (the "t" prefix is testnet and "s" is stagenet, not a wrapped token). You sign both legs of every swap locally, so no operator (not the maker, not the relay, not the web server) ever holds your keys or coins.

The tLTC <-> tBTC direction is a classic HTLC atomic swap (a hashlock plus timelocks), both sides secp256k1 P2WSH. The Monero direction is the harder part, since XMR has no scripts or timelocks to host an HTLC: it uses the cross-curve adaptor-signature construction from Gugger's 2020 paper (the same lineage as Farcaster and UnstoppableSwap / xmr-btc-swap). A secp256k1<->ed25519 DLEQ plus an ECDSA adaptor signature carry a Monero spend-key share across curves, all the refund/cancel/punish logic lives on the Bitcoin or Litecoin side, and the Monero wallet work runs as WebAssembly in the page.

Honest caveat: testnet only, so the coins have no value by design. The Monero path is experimental and the upstream cryptography is not formally audited, so it's a place to learn and exercise the construction, not something to point at real funds. The HTLC path is proven end to end on-chain, and a browser XMR->tLTC adaptor swap has completed live in pre-launch testing. Max swap amounts are set low: my maker's liquidity is self-funded, so the caps keep it from being drained.

How the non-custodial part works
Each swap's coins only ever sit in an on-chain contract that either completes the swap or refunds you after a timelock. A malicious or vanished counterparty can grief you (stall a swap, make you wait out a timelock) but cannot take your coins. It's a multi-maker network: anyone can run a maker (registration is permissioned by default), and your safety never depends on which one fills your swap. There's a full writeup with the constructions, the timelock-safety parameters, and the threat model.

Alongside the swap
The same taker engine now runs inside TestnetWallet.net (swap from the wallet itself), and I launched TestnetHub, a guide site for the BTC/LTC/XMR testnets.

Roadmap: the reverse direction (BTC or LTC into Monero) and per-transaction fee-bumping on the Monero side are the main open items; both are in the writeup's limitations section.

Swap: https://testnetswap.com
Writeup: https://testnetswap.com/whitepaper
Source (AGPL-3.0): https://github.com/Tech1k/testnetswap

Still in active development. Feedback and bug reports welcome, especially on the Monero-side crypto and the threat model.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!