Skip to main content
Techtoshi u/Techtoshi avatar

Tech1k

u/Techtoshi

Feed options
Hot
New
Top
View
Card
Compact



Non-custodial Litecoin <-> Bitcoin atomic swaps in the browser, on testnet (plus Monero into either), with a hub to learn the testnets
Image
r/litecoin
Non-custodial Litecoin <-> Bitcoin atomic swaps in the browser, on testnet (plus Monero into either), with a hub to learn the testnets

Litecoin has some atomic-swap history: the first on-chain LTC<->BTC atomic swap happened back in 2017. I wanted that as something you can just do from a browser tab any time, on testnet, so I built TestnetSwap: non-custodial cross-chain atomic swaps that run entirely client-side.

The Litecoin/Bitcoin side (tLTC <-> tBTC) is a straight HTLC swap: a hashlock plus timelocks, both chains secp256k1 P2WSH. You sign both legs yourself, so nobody ever takes custody, and if the other side stalls or vanishes, you reclaim what you locked once the timelock passes. It also swaps Monero (tXMR/sXMR) into tLTC or tBTC with a cross-curve adaptor-signature construction, but the LTC/BTC HTLC path is the one that's proven end to end on-chain; the Monero side is more experimental and its upstream crypto isn't formally audited.

It's a multi-maker network: anyone can run a maker, and which one fills your swap never affects your safety. Max amounts are kept small since the liquidity is self-funded from my testnet pool and faucet.

Alongside the swap I launched TestnetHub, a place to actually learn the Bitcoin, Litecoin, and Monero testnets: step-by-step guides (transactions, confirmations, fees, UTXOs, keys and seeds, running a node, swaps), per-chain pages, a glossary, a live status page, and a companion repo of short, runnable Python and JavaScript examples. The swap also runs inside TestnetWallet now, if you'd rather do it from a wallet.

Testnet only, so the coins are worthless by design, and it's all open source (AGPL). Grab test coins from the faucet; no token, no signup.

Swap: https://testnetswap.com

Learn the testnets: https://testnethub.com

Code examples: https://github.com/Tech1k/testnet-examples

Writeup: https://testnetswap.com/whitepaper

Wallet: https://testnetwallet.net

Source: https://github.com/Tech1k/testnetswap

Still in active development. Feedback and bug reports welcome.


TestnetSwap - non-custodial cross-chain atomic swaps in the browser (Monero cross-curve, testnet/stagenet), plus TestnetHub to learn the testnets
Image
r/Monero
TestnetSwap - non-custodial cross-chain atomic swaps in the browser (Monero cross-curve, testnet/stagenet), plus TestnetHub to learn the testnets

I've been building a suite of testnet tools for a while (a faucet, a wallet, an explorer). Two new pieces just went live and they go together: TestnetSwap, non-custodial cross-chain atomic swaps that run entirely in the browser, and TestnetHub, a place to actually learn how the testnets work.

TestnetSwap 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 ever holds your keys.

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: it's testnet only, so the coins have no real value by design. The Monero path is experimental and the upstream cryptography is not formally audited, so treat it as a place to learn and exercise the construction, not something to point at real funds. The HTLC swaps are proven end to end on-chain, and a browser XMR->tLTC adaptor swap has completed live in pre-launch testing. It's a multi-maker network: anyone can run a maker, and your safety never depends on which one fills your swap.

The point of testnet is seeing this actually work instead of reading about it: pick a pair, watch your coins go into a contract, claim the other side, and if the counterparty vanishes you just refund after the timelock, all with nothing at stake. If you want to understand what's actually happening, that's what TestnetHub is for: step-by-step guides (transactions, confirmations, fees, UTXOs, keys and seeds, running a node, swaps), per-chain pages for the Bitcoin, Litecoin, and Monero testnets, a glossary, a live status page, and a companion repo of short, runnable Python and JavaScript code examples for each guide. The swap also runs inside TestnetWallet now, if you'd rather do it there.

Everything is open source (AGPL), testnet only, no token, no signup. Testnet coins are self-funded from my TestnetPool fees and faucet (CypherFaucet).

Swap: https://testnetswap.com

Learn the testnets (TestnetHub): https://testnethub.com

Runnable code examples: https://github.com/Tech1k/testnet-examples

TestnetSwap Writeup: https://testnetswap.com/whitepaper

Wallet: https://testnetwallet.net

Source: https://github.com/Tech1k/testnetswap

Still in active development and highly experimental. Feedback and bug reports welcome, especially on the Monero side.