Ready to settle? See the onchain settlement workflow in Server & API.
Batch Swaps
Batch swaps are the mechanism that transitions VTXOs from preconfirmed state to Bitcoin finality. Three reasons to settle:- Trust surface. Preconfirmed VTXOs rely on operator integrity. Settlement removes that dependency.
- Exit cost management. Deeply chained VTXOs accumulate higher unilateral exit costs. Settlement resets the chain depth.
- VTXO renewal. VTXOs must be renewed before batch expiry. Settlement refreshes the expiry timer.
How It Works
Signal participation
Users submit an intent to the operator containing the VTXOs they want to swap, the desired parameters for their new VTXOs (scripts, amounts), and cosigner keys for the new batch’s transaction tree.
Build the commitment transaction
The operator constructs a new commitment transaction with two outputs: a batch output (encapsulating all participants’ new VTXOs) and a connector output (enabling atomic coordination).
Construct the virtual transaction tree
The operator builds the presigned transaction tree for the batch output, defining unilateral exit paths, collaborative spending conditions, timelocks, and anchor outputs for each participant.
Create forfeit transactions
Each user’s old VTXO is linked to the new batch through a forfeit transaction. This transaction spends the old VTXO and consumes a connector output, ensuring the operator can only claim old VTXOs if the new commitment transaction confirms onchain.
Sign
Users sign their forfeit transactions after verifying the virtual tree. The Arkade Signer signs the commitment transaction and new virtual paths. Neither party can finalize without the other’s cooperation.
Batch Anatomy
Each batch swap produces a single onchain commitment transaction with two outputs:- Batch output. Encapsulates all participants’ new VTXOs in a virtual transaction tree, compressing thousands of ownership claims into a single onchain output.
- Connector output. A dust-amount output owned by the operator, structured as a tree that maps one leaf to each VTXO requiring forfeit protection.
Connector outputs are also used when users exit Arkade, enabling VTXOs to be swapped for an onchain UTXO.
Atomicity comes from forfeit transactions. Each user signs a forfeit transaction that relinquishes their old VTXO to the operator, but only if the new commitment transaction confirms onchain. The forfeit requires both the old VTXO and a connector output as inputs, so the operator cannot claim forfeited funds without the new batch existing on Bitcoin.
| Component | Role |
|---|---|
| Input: VTXO | The position being swapped |
| Input: Connector output | Links to the new commitment transaction |
| Output: Forfeit output | Transfers value to operator for liquidity rotation |
| Output: Anchor output | Zero-value output for fee management via CPFP |
Intents
Users participate in batch swaps by submitting an intent to the operator. An intent is a signed declaration containing the VTXOs to be swapped and the exact outputs the user expects to receive. Intents provide cryptographic ownership proof via BIP322 for any inputs a user wishes to redeem, whether offchain VTXOs, onchain UTXOs, or expired coins. This design separates control from coordination: users maintain complete control of their keys while the operator handles batch logistics and the Arkade Signer provides necessary cosignatures.Find the detailed intent system description and onchain settlement mechanics in the Server & API section.
Previous: Transactions & Execution
Transaction structure, chaining, and the Virtual Mempool.
Next: VTXO Lifecycle & Liveness
Expiration, renewal, and delegation.