PSBT
An atomic swap guarantees that either both parties’ assets exchange hands or nothing happens. DotSwap achieves this on Bitcoin Layer 1 by orchestrating a single, jointly‑signed Partially Signed Bitcoin Transaction (PSBT).
1. Draft
Nexus Engine inserts Maker inputs, Taker inputs, fee output, and slippage‑guard outputs into a PSBT template.
Transparent, unsigned PSBT shared with signers.
2. Maker Sign
Each Nexus Node signs its own inputs only, confirming price & size match posted curve.
PSBT now bears Maker partial signatures.
3. Taker Review
Taker wallet verifies outputs (receive amount, change, fees).
User sees exact cost before committing.
4. Final Sign
Taker adds final signature, completing all required sig‑pairs (e.g., 1‑of‑1 or 2‑of‑2).
PSBT is now a valid Bitcoin transaction.
5. Broadcast
Nexus Engine (or Taker wallet) relays tx to mempool; network consensus enforces execution.
Either both assets move or swap is void if not mined.
Built‑In Safeguards
Slippage Guard Output Fulfils if final rate ≤ tolerance; else txn invalidates.
Time‑Lock (nLockTime) Cancels if not mined within a preset block height, preventing stuck funds.
Fee Bump Compatibility Replace By Fee ready; Engine can raise fee to ensure confirmation.
Advantages vs Escrow Models
No intermediary custody or bridge risk.
Single on‑chain tx = minimal attack surface.
Works in any PSBT‑capable Bitcoin wallet; no protocol fork required.
Key Point: Atomic PSBT execution is the cornerstone of DotSwap’s trust‑minimised design, letting users swap Bitcoin‑native assets while retaining full key ownership at every step.
Last updated