Skip to main content

Sweep Transaction | Bitcoin Glossary | Mapping Bitcoin

Sweep Transaction

Protocolo

Also known as: sweep, consolidation transaction

A transaction that consolidates all UTXOs from one wallet or address into a single output in a new wallet or address. Sweeping is commonly used when migrating to a new wallet, importing a paper wallet, or consolidating dust UTXOs.

Overview

A sweep transaction collects all UTXOs associated with a wallet or specific address and sends them to a single new output. This "sweeps" the entire balance in one transaction, leaving no funds behind in the source wallet. Sweeping is distinct from simply sending a specific amount, because it explicitly aims to empty the source completely.

Common Use Cases

  • Paper wallet import: When redeeming a paper wallet, the entire balance should be swept to a new wallet. Sending only a partial amount from a paper wallet can result in change being sent to an address the user does not control.
  • Wallet migration: Moving from one wallet application to another by sweeping all funds.
  • UTXO consolidation: Combining many small UTXOs (including dust) into a single larger UTXO to reduce future transaction fees.
  • Key compromise response: Quickly moving all funds to a new address if a private key may have been exposed.

Transaction Structure

Sweep Transaction:

Inputs (multiple UTXOs):          Output (single):
┌──────────────────┐
│ UTXO 1: 0.005 BTC│──┐
├──────────────────┤   │     ┌───────────────────────┐
│ UTXO 2: 0.012 BTC│──┼────>│ New address: 0.0265 BTC│
├──────────────────┤   │     │ (total minus fee)      │
│ UTXO 3: 0.010 BTC│──┘     └───────────────────────┘
└──────────────────┘
Total in: 0.027 BTC
Fee:      0.0005 BTC
Total out: 0.0265 BTC

Fee Considerations

Because sweep transactions may include many inputs, they can be large in size and therefore expensive in terms of transaction fees. It is often advisable to perform consolidation sweeps during periods of low fee rates to minimize cost.

Privacy Implications

Sweep transactions reveal that all inputs belong to the same owner (common-input-ownership heuristic). This is an important consideration for users who prioritize privacy, as it creates a clear link between all swept addresses.