Buyer
Acquires native BC2/BCH2 with USDT. Locks USDT on BSC, waits for the seller to lock coins, then claims native using the swap secret (revealing the preimage). Pays BSC gas for lock and may pay protocol fee on paths that touch USDT claim.
Operator guide
How the BC2-USDT and BCH2-USDT order book, BSC USDT escrow, and native HTLC escrows fit together — for traders who already know HTLC atomic swaps and want the XFR-specific playbook.
System
XFR coordinates; contracts and HTLCs custody funds.
An XFR atomic swap is a two-legged HTLC trade: USDT on Binance Smart Chain (BSC) and BC2 or BCH2 in a native coin HTLC. XFR is not a custodian — it runs the order book API, swap status UI, and chain watchers that advance state when locks and claims appear on-chain.
BSC leg: USDT is locked, claimed, or refunded through the on-chain swap contract (buyer locks; seller claims with the preimage revealed by the buyer).
Native leg:the seller sends BC2/BCH2 to an HTLC escrow address derived from the swap parameters. The buyer claims with the swap secret; the claim transaction reveals the preimage on-chain for the seller's USDT claim.
Pairs are BC2↔USDT and BCH2↔USDT. Select the correct chain in the XFR wallet before any native lock, send, or claim — BC2 and BCH2 are separate networks.
Prerequisites
Every action is signed locally; connect both before posting or accepting.
| Wallet | Chain / asset | Used for |
|---|---|---|
| XFR web wallet | BC2 or BCH2 (native) | Unlock seed, switch chain, lock coins in HTLC, claim native, refund native, store swap secret backup. |
| BSC wallet (MetaMask, etc.) | USDT on BSC | Lock USDT when buying, claim USDT when selling, cancel/refund USDT on BSC if the seller never locks. |
| XFR (platform) | — | Order book, swap record, timeline UI, relayer signatures where required — never holds your keys or USDT. |
Roles
Roles are economic, not wallet brands — one person may use both wallet types.
Acquires native BC2/BCH2 with USDT. Locks USDT on BSC, waits for the seller to lock coins, then claims native using the swap secret (revealing the preimage). Pays BSC gas for lock and may pay protocol fee on paths that touch USDT claim.
Disposes of BC2/BCH2 for USDT. Accepts or posts against the order book, locks native coins in the HTLC, then claims USDT on BSC after the buyer claim reveals the secret. Pays native miner fees for the lock transaction.
Order book
Same on-chain settlement; different who posts first and when USDT is escrowed.
| Side | Posted by | USDT timing |
|---|---|---|
| SELL_NATIVE (sell listing) | Seller lists price and size on the book. | USDT locked when a buyer accepts and takes the listing. |
| BUY_NATIVE (buy order) | Buyer posts intent; USDT escrowed up front on BSC. | USDT already in contract before a seller accepts. |
The order book shows buy and sell columns per asset. Accepting a counterparty order creates a swap record and opens the swap status page (/wallet/swap/[orderId]) where each party executes their on-chain steps.
Happy path
Matches the timeline on every swap status page — six logical steps, four on-chain signatures.
Buyer
Lock USDT
Buyer escrowes USDT in the on-chain swap contract on BSC.
Seller
Lock coins
Seller accepts and locks BC2 or BCH2 in an HTLC escrow.
Buyer
Claim coins
Buyer claims native coins and reveals the secret on-chain.
Seller
Claim USDT
Seller uses the revealed secret to claim USDT from BSC.
After match, work proceeds in order: seller locks native → buyer claims native (secret revealed) → seller claims USDT with that preimage → completed. The UI marks each step complete when watchers confirm the corresponding transaction.
Playbook
Seller posts; buyer takes the listing and escrows USDT.
Seller · XFR + BSC
Post sell order
Set asset (BC2/BCH2), amount, and USDT price on the order book. Listing stays open until cancelled or matched.
Seller · wait
Buyer accepts
Buyer locks USDT on BSC. Swap record is created; status moves to seller lock phase.
Seller · XFR
Lock native in HTLC
Send the exact amount to the escrow address shown on the status page. Wait for confirmations — watcher registers the lock.
Seller · wait
Buyer claims native
Buyer spends the HTLC with the swap secret; preimage is visible on-chain.
Seller · BSC
Claim USDT
Submit USDT claim on BSC using the revealed secret. Protocol fee applies on this claim (~0.5%).
Buyer · BSC
Accept listing & lock USDT
Connect BSC wallet, accept the sell order, approve and lock USDT in the swap contract for the trade size.
Buyer · XFR
Save swap secret
Secret is generated in-browser when you initiate the buy. Back it up immediately (local vault + optional JSON export). Required to claim native.
Buyer · wait
Seller locks native
Monitor the status timeline until the HTLC lock is confirmed.
Buyer · XFR
Claim BC2/BCH2
Sign the HTLC claim with your stored secret. This reveals the preimage for the seller’s USDT claim.
Playbook
Buyer escrows USDT first; seller accepts and locks native.
Buyer · BSC + XFR
Create buy order
Post size and price; lock USDT on BSC as part of creation. Swap secret generated and stored locally.
Buyer · wait
Seller accepts
A seller accepts on the book and commits to the trade. Status advances to native lock.
Buyer · wait
Seller locks native
Same HTLC lock step as Flow A.
Buyer · XFR
Claim native
Claim with swap secret; reveal preimage on-chain.
Seller · XFR + BSC
Accept buy order
Review price and size on the book; accept to assign yourself as seller for that escrowed USDT.
Seller · XFR
Lock native in HTLC
Fund the displayed escrow address; wait for confirmation.
Seller · wait
Buyer claims native
Preimage becomes available from the claim transaction.
Seller · BSC
Claim USDT
Complete the trade on BSC with the revealed secret.
Cryptography
Links the native HTLC to the BSC USDT escrow — handle like a private key fragment.
Operations
Single source of truth for whose turn it is.
Every matched order has a dedicated status view at /wallet/swap/[orderId]. The timeline mirrors backend SwapStatus values — e.g. BUYER_USDT_LOCKED, SELLER_NATIVE_LOCKED, BUYER_CLAIMED_NATIVE, SELLER_CLAIMED_USDT, COMPLETED.
Panels on the page are role-gated: you only see actions your wallets can sign (buyer refund USDT, seller lock native, buyer claim, seller claim USDT, refunds). When a transaction is broadcast, the UI shows a confirming state until the native/BSC watcher ingests it.
If you navigate away during a trade, reopen the same URL — secrets and pending tx hints are read from local storage; chain state is reconciled via sync endpoints and watchers.
Risk
HTLC time locks protect both legs if the counterparty stops.
| Leg | Typical window | If counterparty stalls |
|---|---|---|
| USDT (BSC) | ~48 hours | Buyer can refund USDT if seller never locks native. Seller can claim USDT after buyer claim window expires (if coins were locked). |
| Native HTLC | ~24 hours | Seller can refund locked BC2/BCH2 if buyer never claims. Buyer must claim before expiry or lose the window (seller refund path). |
| Terminal states | — | REFUND_AVAILABLE, REFUNDED, EXPIRED, FAILED — timeline turns red; only the applicable refund/claim action remains. |
Always read the headline on the status page (Waiting for seller to lock BC2, Refund available, etc.) before signing. Do not send native coins to a non-escrow address — use only the address and amount from the active swap panel.
Economics
On-chain only — XFR does not take custody spread.
Connect XFR + BSC wallets and post or accept BC2-USDT / BCH2-USDT orders.