Atomic swaps enable trustless exchange of cryptocurrencies between two parties without requiring a trusted third party or custody of participant keys.
Sellers create offers specifying BTC amount and discount/premium. Buyers browse the marketplace for suitable offers.
When a buyer accepts an offer, both parties digitally sign the swap terms, creating a binding agreement.
The seller signs a BTC HTLC lock transaction from their own wallet, committing the BTC to the shared secret hash and refund timelock.
After verifying the BTC lock, the buyer signs the TRON escrow funding transaction from their own wallet using the same secret hash.
The buyer signs the BTC redeem transaction, which claims the locked BTC and reveals the secret on-chain.
Once BTC redeem reveals the secret, the TRON escrow can release funds to the seller and fee recipients. Refund paths remain available if the timelocks expire instead.
The BTC side uses an HTLC script, and the TRON side uses an escrow contract keyed to the same secret hash and refund windows.
The BTC refund window is the short leg and the TRON refund window stays longer, so the secret reveal path completes before any buyer refund can open.
"Atomic" means the swap either completes fully for both parties, or refunds become available according to the on-chain rules. The app coordinates, but does not custody participant spend keys.
If either party fails to complete their part, the timelocks ensure the seller can refund BTC first and the buyer can refund TRON later if settlement never completes.