RequantTESTNET
Requant documentation

Buy RQT with swaps

An atomic swap buys RQT for bitcoin or USDT from a market maker without an exchange and without trusting the maker. Either both payments happen or neither does, and whoever stops halfway can only lose time, not coins. Every Requant wallet can do it: the Web Wallet, the desktop and Android apps, the browser extension's full wallet, the Telegram Mini App, requant-wallet and the MagnetGate apps.

Swaps run on the test networks only: test RQT for Bitcoin signet coins, Lightning on signet and test USDT on TRON Nile. None of these have value, and real bitcoin or USDT cannot be used.

How a swap works

  1. Your wallet makes a random 32-byte secret and gives the maker only its SHA-256 hash.
  2. You lock your bitcoin or USDT under that hash: in a Bitcoin HTLC, in a Lightning hold invoice or in the open RequantHtlc contract on TRON. The maker can take it only with the secret. If the maker never does, it comes back to you after a time lock.
  3. Once your payment is final, the maker locks the RQT on the Requant chain under the same hash, payable to your address, with a shorter time lock.
  4. Your wallet checks that lock (the hash, your address, the amount, the time left) and claims the RQT. The claim reveals the secret on the Requant chain.
  5. The maker reads the secret there and takes your bitcoin or USDT.

The maker locks RQT only while at least twice its own time lock is left on your side, so a claim made at the last moment still leaves the maker time to take its payment, and you can always refund before the maker could take anything.

What you need

  • A Requant wallet with an address, any of those above (wallets). The RQT arrive at one of its addresses. Claiming costs a small Requant fee; a new wallet with no coins can still claim, because the fee is paid out of the swapped RQT.
  • Something to pay with, one of:
    • signet bitcoin in any Bitcoin wallet that supports signet (Bitcoin Core with -signet, Sparrow, Electrum in signet mode). Public signet faucets give small amounts;
    • a Lightning wallet or node on Bitcoin signet with a channel that can pay, such as LND or Core Lightning started on signet. Mutinynet and other custom signets are different networks and do not work;
    • test USDT (TRC-20) on the TRON Nile testnet in any TRON wallet, for example from the Nile faucet. No TRX is needed: the maker pays the TRON fees.

The test-network maker

The maker on the test networks is requant-maker at pool.requant.network:19390. The wallet apps and MagnetGate connect to it for you; the command-line wallet takes its address. Its terms:

Pay withPricePay withinThe maker locks RQTYour refund if the maker never locks
Bitcoin signet, on chain1000 satoshis per RQT12 Bitcoin blocks (about two hours)after 1 confirmation up to 0.01 BTC, 3 up to 0.1 BTC, 6 above; for 360 Requant blocks (about six hours)after 144 Bitcoin blocks (about a day), with a signed refund transaction
Lightning on signet1000 satoshis per RQTthe invoice expires after 10 minutesat once; for 60 Requant blocks (about an hour)none needed: an unsettled hold invoice cancels and the payment returns to your Lightning wallet
USDT on TRON Nile0.1 USDT per RQTlock the USDT within 2 hoursonce the lock is irreversible (about a minute); for 120 Requant blocks (about two hours)after 12 hours, to the swap's TRON address, then withdraw anywhere

Amounts: from 0.1 to 100 RQT per swap, while the maker has the RQT. The wallet shows the maker's current price and limits before you pay and refuses an offer that differs from them. Prices on the test networks are test-service terms, not a market valuation.

In the wallet apps

Requant Wallet 0.5.0 on the web, Windows, macOS, Linux, Android, in the extension's full wallet and in Telegram has the same swap workspace. Open Swaps: in the desktop sidebar, or under Tools on a phone and in Telegram.

  1. New swap. Choose Pay with: Bitcoin · Signet, Lightning · testnet or USDT · TRON Nile. Enter how many RQT to receive and choose the receiving address. The workspace shows the maker's price, the swap range and, for USDT, whether TRON fees are Sponsored by maker.
  2. Set a swap backup password (12 characters or more). The wallet verifies the maker's offer: the hash is your own, the address or invoice matches it, the amount matches the price.
  3. Save the backup before paying. Each swap has its own secret. The recovery phrase does not restore it, so the encrypted swap backup is the only way to finish or refund the swap on another device. The swap list marks it Backup saved.
  4. Pay. The workspace shows the complete payment details, the payment deadline and the refund time:
    • Bitcoin: send exactly the amount shown to the Deposit address from your signet wallet;
    • Lightning: pay the verified hold invoice from your signet Lightning wallet;
    • USDT: send the USDT shown to the swap's own TRON address. When it has arrived, review and sign the USDT approval, then the USDT lock. Request the maker's fee support first if the address holds no TRX; the wallet signs both TRON transactions itself and waits until each is irreversible.
  5. Claim the RQT. When the state shows the maker's lock, the wallet checks it and the transaction that funds it. Enter the wallet signing password and confirm the claim. Claiming reveals your secret; that is what lets the maker take the other side.

If the maker lent the swap address energy or sent it TRX, Return unused maker TRX sends back what the fees did not burn.

Refund & withdrawal, if the maker never locks the RQT:

  • Bitcoin: from the refund time, enter a signet refund address. The wallet builds and signs the refund and gives it to you as transaction hex; send it from your own Bitcoin signet node or a signet explorer that accepts raw transactions. The wallet has no Bitcoin relay of its own.
  • USDT: from the refund time, sign the refund (the USDT returns to the swap's TRON address), then the withdrawal to any Nile address you choose.
  • Lightning: nothing to do; your Lightning wallet gets the payment back when the invoice is cancelled.

The TRON transaction history lists every approval, lock, refund and withdrawal with its confirmation state.

In MagnetGate

The MagnetGate apps for Windows (0.3.8 and newer, USDT from 0.3.9) and Android (build 281 and newer, USDT from build 284) buy RQT for their own wallet in one step: Pay as you go → Buy RQT, choose Lightning, Bitcoin or USDT, pay, and the app locks, checks and claims by itself. See pay with RQT.

From the command line

requant-wallet 0.10.0 or newer (wallet releases). The swap file holds the secret and, for USDT, the key of the swap's TRON address: keep it private and keep it until the swap is over.

Bitcoin on chain:

requant-wallet swap buy pool.requant.network:19390 2 my.wallet --out s.json --max-sats 2000
# pay the amount shown to the address shown, from a signet wallet
requant-wallet swap status s.json            # waiting_btc, rqt_locked, done, ...
requant-wallet swap claim s.json my.wallet   # once rqt_locked: takes the RQT, reveals the secret

Lightning:

requant-wallet swap buy-ln pool.requant.network:19390 2 my.wallet --out s.json --max-sats 2000
# pay the invoice shown from a signet Lightning wallet within ten minutes
requant-wallet swap claim s.json my.wallet

USDT on TRON:

requant-wallet swap buy-usdt pool.requant.network:19390 2 my.wallet --out u.json --max-usdt 0.2
# send the USDT shown (TRC-20, Nile) to the swap's TRON address, from any wallet
requant-wallet swap lock u.json              # approve and lock; asks the maker to pay the TRON fees
requant-wallet swap claim u.json my.wallet   # takes the RQT and returns unburned maker TRX

--max-sats and --max-usdt refuse an offer above the price you expect. Before you pay, the wallet checks that the invoice, the Bitcoin address or the TRON terms are locked by its own hash, for its network and amount, and that the refund time is right. Before claiming, it checks the maker's RQT lock and the transaction that funds it. TRON transactions are signed locally; the TRON API (TronGrid, or --tron-api URL) only relays them.

Refunds, if the maker never locks the RQT:

requant-wallet swap refund s.json tb1q...    # Bitcoin: from block 144 after the swap; prints the signed refund in hex
requant-wallet swap refund u.json            # USDT: from 12 hours after the swap, back to the swap's address
requant-wallet swap withdraw u.json T...     # USDT: move it to any TRON address

swap status asks the maker for the swap's state, so it needs the maker to be reachable; refunds do not. More commands are in the wallet CLI guide.

If something goes wrong

SituationWhat happensWhat to do
You never payThe offer expires; nothing is lockedNothing
You paid, the maker does not lock the RQTYour payment stays locked under your hash; the maker cannot take itWait for the refund time and refund (Bitcoin, USDT), or let the invoice cancel (Lightning)
You paid late (after the payment deadline)The maker does not lock RQT for it; the swap shows too lateRefund after the refund time
The maker locked the RQT, you do not claim in timeThe RQT go back to the maker; your payment is still yoursRefund after the refund time
You claimed the RQTThey are yours once the claim confirms; the maker takes your payment with the revealed secretNothing
The app or device is lost mid-swapThe swap's secret is only in the swap backupImport the encrypted swap backup in any wallet app and continue or refund

Safety

  • Back up every swap before paying. The wallet recovery phrase does not contain swap secrets.
  • Pay exactly what the wallet shows, to the address or invoice it shows, before the payment deadline. A Bitcoin underpayment or a late payment is not answered; refund it after the refund time.
  • Claim promptly. The RQT lock is shorter than your side's on purpose.
  • Do not share a swap file or backup before the swap is over. It contains the secret, and for USDT the key of the swap's TRON address.
  • The maker sees your receiving address and your payment; it never sees your wallet keys.

Status

Built and running on the test networks: the swap protocol in requant-wallet 0.9.0 (Bitcoin and Lightning) and 0.10.0 (USDT), Requant Wallet 0.5.0 on every platform, the MagnetGate apps, requant-maker and the RequantHtlc contract on Nile. The protocol and the contract have not been externally reviewed, and confirmation depth on the Requant side is not yet scaled to amount and hashrate. See spending conditions for the consensus templates and SWAPS.md for the design.