DEV Community

Jerome Barton
Jerome Barton

Posted on

How do Bitcoin dust limits affect wallet swaps?

Before sending BTC from your own wallet into a cross-chain swap, check that the amount you plan to send clears the receiving output’s dust threshold and any separate swap minimum. This matters because your wallet selects existing Bitcoin outputs to fund the transaction, while the swap creates a new output at its deposit address.

On Chainflip, for example, a Bitcoin Deposit Channel gives a swap a dedicated deposit address, and the Bitcoin Vault uses Taproot addresses for deposits. That lets the protocol receive native BTC, but Bitcoin’s rules still govern whether your wallet’s transaction can be relayed. The dust threshold is a network-policy rule about an output’s value, not a general minimum balance for swapping.

Dust depends on the receiving output type

A Bitcoin output is commonly called dust when its value is too small to justify the estimated fee to spend it later. Under Bitcoin Core’s default dust relay fee of 3 sat/vB, the threshold depends on the output script, which the address format indicates. The commonly quoted 546 sat threshold applies to legacy P2PKH outputs, not every Bitcoin address.

  • Legacy P2PKH: 546 sat.
  • Native SegWit P2WPKH: 294 sat.
  • Taproot P2TR: about 330 sat under the default policy.

These are policy values, not consensus rules: a miner could include an output that node relay policy treats as dust, but an ordinary wallet broadcast may be rejected by nodes. Relay settings can also vary, so treat these figures as a useful baseline rather than a guarantee. Chainflip’s Taproot deposit addresses make the Taproot figure the relevant comparison for its Bitcoin ingress.

A dust-sized UTXO is different from a dust-sized deposit

A UTXO is an unspent transaction output: one discrete piece of BTC your wallet can select as an input. The dust threshold usually describes the new output your transaction creates. A small existing UTXO may still be spendable, but if its value is close to or below the fee needed to include it, your wallet may leave it out because using it would add little or no value.

For example, suppose your wallet has one 0.01 BTC UTXO and several tiny leftovers from old transactions. If the swap deposit is 0.009 BTC, the wallet can use the larger UTXO and return change, less the network fee. If you instead try to send only a few hundred satoshis, the receiving output may fall below its dust limit; and even if it clears that limit, your wallet’s transaction fee or the swap’s own minimum may make the transfer impractical.

That distinction explains a common surprise for people moving from a centralized exchange. An exchange account shows one balance, but a self-custody Bitcoin wallet may hold many separate UTXOs. The total balance can look large enough while the particular coins available to fund the transaction are fragmented or expensive to spend.

The wallet’s inputs affect the fee too

When you send BTC to a swap deposit address, your wallet selects one or more UTXOs, pays miners to include the transaction, and creates the deposit output plus any change output. More inputs generally make a transaction larger, so spending ten small UTXOs can cost more than spending one larger UTXO at the same fee rate. Change can also become uneconomical if it is so small that a later spend would cost more than it is worth.

This is the trade-off: consolidating small UTXOs into fewer, larger ones can make a later swap cheaper to fund, but consolidation itself costs an on-chain fee and links those inputs together on the public ledger. A quieter fee period can make consolidation less costly, though it does not change the dust rule itself.

Check the whole path before sending

Before starting, estimate the Bitcoin network fee for the inputs your wallet will use, check that the intended deposit is above both the applicable dust threshold and the swap’s stated minimum, and leave enough BTC for the fee. A deposit address is specific to the swap details; confirm the amount and destination carefully before broadcast, since an unsuitable or misdirected deposit may not complete as intended.

After broadcast, Bitcoin must confirm the deposit before the cross-chain protocol can process it and send the other asset to your destination address. Chainflip’s deposit is therefore one transaction in a longer path: wallet inputs are spent on Bitcoin, the deposit is witnessed, and the protocol executes the swap before sending the destination asset. The question to ask yourself is: after fees, will this exact set of UTXOs fund a deposit that is large enough to be accepted and still worth swapping?

Top comments (0)