Aegis.X
Aegis  /  Docs  /  Consolidation

Your balance is not a number. It is a pile of coins.

Bitcoin Cash does not keep an account balance for you. It keeps every payment you have ever received as a separate coin, and spending is a matter of picking some of them up. Consolidation trades a lot of small coins for a few large ones — and it is not always worth doing. This page shows the arithmetic, so you can tell which case you are in.

01 — The model

Why the balance arrives in pieces

Every payment into your wallet creates an unspent transaction output — a UTXO, or in plain terms, a coin. A coin has one value and it cannot be split in place. To pay someone 0.1 BCH you do not subtract 0.1 from a balance; you hand over whole coins worth at least that much, and the difference comes back to you as a new coin called change.

The figure Aegis shows on the balance line is simply the sum of your coins. Two wallets showing the same number can be in completely different shape: one holding a single coin of 2 BCH, the other holding forty thousand coins of 5,000 sat each. The first can be spent in a transaction of 226 bytes. The second cannot be spent in one transaction at all.

Wallets end up fragmented for ordinary reasons: a faucet that pays out in tiny amounts, an airdrop, a mining or staking payout, a long run of small receipts — or deliberate dust, sent to your address by someone hoping to identify you when you eventually spend it.

02 — The shape

What one transaction can do

A transaction has two sides, and both of them take as many entries as you like. On the way in it spends coins, and those coins may sit on any number of addresses — nothing requires a transaction to draw from only one. On the way out it pays any number of recipient addresses.

The other choice is how much of what it picked up actually leaves. Spend all of it and nothing comes back. Spend part of it and the remainder returns to the sender as change: a new coin, at an address the sending wallet chooses. Change is not a refund — it is simply the part of the coins that was not paid out, and it is how a transaction can spend a whole 1 BCH coin in order to send 0.01.

Those two choices are independent, which gives four shapes:

SpendsPaysWhat that isChange
All it picks upOne addressA sweep — many addresses converging on one coinnone
Part of itOne addressAn ordinary paymentreturned
All it picks upSeveral addressesA sweep, split between several payeesnone
Part of itSeveral addressesA batched payment — several payees at oncereturned

Consolidation is the first row, and in a weaker sense the third: coins spent from many addresses, landing as one output or a few. There is no flag on the transaction that says so and no special kind of transaction involved — it is the ordinary shape, with many addresses on the way in and few on the way out. Everything below is about when that is worth doing.

03 — The economics

What it costs to pick a coin up

A fee is priced by size in bytes, not by the amount being moved. Sending 100 BCH and sending 100 sat cost the same, if the two transactions are the same shape. What changes the shape is how many coins you have to pick up.

// A standard P2PKH transaction, in bytes
overhead ....................... 10 version 4 + counts 2 + locktime 4
each input (a coin spent) .... 149 outpoint 36 + length 1 + signature 74 + pubkey 34 + sequence 4
each output (a coin made) .... 34 value 8 + script 26

// At the 1 sat/byte minimum relay fee, one coin costs
1 input × 149 bytes × 1 sat/byte = 149 sat to spend

That 149 sat is the number everything else follows from. It is charged per coin, regardless of what the coin is worth. A coin of 10,000 sat pays 1.5% of itself to move. A coin of 300 sat pays half of itself. A coin of 149 sat or less is economically unspendable: moving it costs at least what it contains, and no amount of consolidating changes that — you would be paying a fee to destroy value.

Consolidation does not make coins cheaper to spend. It pays that cost once, now, so later payments spend one or two coins instead of hundreds. Whether that is a good trade depends entirely on what the coins are worth.

04 — The hard limit

The 600-coin ceiling

Bitcoin Cash nodes will not relay a transaction larger than 100,000 bytes. At 149 bytes per input that puts the hard ceiling near 675 coins in a single transaction. Aegis stops at 600, which keeps a transaction around 89 KB with room for its outputs, and keeps the signing pause — one signature per input, on the same thread that draws the browser — under a second.

So a wallet holding more than 600 coins cannot be emptied in one go. That is a property of the chain and of the wallet's obligation to produce something relayable, not a setting you can raise. When you ask for more than fits, Aegis says so plainly rather than reporting a shortage of money:

this wallet's balance is split across 28,289 coins, and one
transaction can only spend 600 of them. The most you can send
in one go is about 806,572 sat. Use Consolidate to combine
them first, or send a smaller amount.

A send-max takes the largest 600 coins, so each pass moves as much as it can, and the panel tells you what stayed behind. Emptying a badly fragmented wallet is therefore a repeated operation rather than a single action.

05 — The decision

Is it worth consolidating?

Compare a typical coin against the 149 sat it costs to spend one. The share you lose to fees is roughly 149 ÷ coin value at the minimum fee rate.

Typical coinFee to spend itShare lostVerdict
1,000,000 sat149 sat0.015%Nothing to fix.
100,000 sat149 sat0.15%Consolidate freely.
10,000 sat149 sat1.5%Worth doing on a busy wallet.
1,500 sat149 sat10%Only if you must spend it as one amount.
600 sat149 sat25%Rarely worth it.
149 sat or less149 sat100%Leave it. It cannot be moved at a profit.

A real example

A chipnet wallet used while building Aegis held 28,289 coins averaging about 1,353 sat. Sweeping it meant eighteen passes at the 600-coin limit, and even at the 1 sat/byte minimum the fees came to roughly 17% of the balance — because an input costs 149 sat and the median coin was worth around 600.

That is the honest shape of the trade. Consolidation was still the right call there, because the alternative was a wallet that could not make a single payment of its own stated balance. But 17% is a serious price on real money, and it is better known before you press the button than after.

Rule of thumb

Consolidate when the coins are worth comfortably more than the ~149 sat it costs to spend each one, or when fragmentation is actually blocking a payment you need to make. Do not consolidate dust for tidiness — that is paying real money to move money worth less than the moving.

06 — The mechanics

How to do it in Aegis

Two different jobs share the word "consolidation". One of them has a button. The other is a property of every transaction you already make.

Many wallets into one

Select the wallet you want everything to end up in, open Receive and press ⇢ Consolidate. You get a list of your other wallets on the same coin and the same network — nothing ever crosses a network or a coin — each with its balance, the fee its sweep would cost, and what would actually arrive. Tick the ones you want.

  1. Each ticked wallet is emptied by its own send-max transaction, so a failure on one does not affect the others.
  2. You approve the whole batch once, on Theseus's own confirmation surface, which lists every wallet being emptied, the total arriving and the total fees across all the transactions.
  3. Wallets that cannot be swept — empty, or holding only dust — say why in the preview, before you commit to anything.
This cannot be undone

Consolidation is an ordinary on-chain spend. Once broadcast, the coins have moved. The preview is the moment to check the destination: it is the wallet that was selected when you opened the panel, and it is named on the confirmation.

Many coins into fewer

This is the first row of the table in What one transaction can do, and there is no separate button for it because it is not a separate operation. Open Send, enter the recipient address, press Max, and send. Max spends all the transaction picks up, so nothing comes back as change and the whole of it lands at that one address.

You never choose the addresses. A wallet's coins are pooled before selection, so one transaction spends across every address that holds something — here, up to 600 coins on up to 600 different addresses.

If a payment is due, that payment does the consolidating on its way out, for the fee you were going to pay anyway. If none is due, the recipient can be an address in the same wallet.

Either way, if more than 600 coins are held Aegis says so before you sign — how many there are, how many this transaction can take, and how much stays behind. Repeat until nothing is left behind. Each pass takes the largest coins first, so the balance moves quickly at the start and slowly at the end, which is also the point at which it stops being worth continuing.

Why wallets drift back

An ordinary send — one with an amount, rather than Max — takes only as many coins as it needs to cover that amount and its fee, largest first. Aegis returns the difference as a single change coin, or folds it into the fee when it would come to less than the dust limit. So a normal payment spends the big coins, leaves the small ones exactly where they are, and hands back one coin usually smaller than those it consumed. Routine spending therefore makes a wallet more fragmented over time, not less, which is why consolidation is something you come back to rather than do once.

07 — The exception

What consolidation never touches

Outputs carrying CashTokens are excluded from plain BCH coin selection entirely, and consolidation is plain BCH coin selection. This is deliberate and not negotiable: the tokens ride on the output, and spending one without carrying its token data forward destroys the token. There is no undo for a burned category.

Those outputs still hold satoshis, and Aegis counts them separately — on the held in assets line beneath the balance — rather than folding them into a spendable figure you cannot actually spend. If every output in a wallet carries a token, a plain send fails with exactly that explanation instead of claiming you have no money.

The same applies to any output Aegis could not positively classify. An output it is unsure about is withheld from both the spendable balance and the selection, because the cost of being wrong in one direction is a slightly understated balance, and in the other it is a destroyed asset.

08 — The trade-off

The privacy cost

Spending several coins in one transaction tells the whole network that one person controls all of them. This is the common-input-ownership heuristic, and it is the single most reliable tool chain analysts have.

Consolidation is its most concentrated form. Sweeping ten wallets into one publicly links ten identities you may have been keeping apart — permanently, and for everyone, not only for whoever you were transacting with at the time. If those wallets were separate on purpose, consolidating them undoes that in a single transaction.

This is also what dust attacks are for. Someone sends a tiny amount to an address they are watching and waits for you to sweep it in with everything else, at which point your other coins are linked to the address they were tracking. Aegis will not refuse to spend such an output, but it is a good reason not to sweep small unexplained receipts into a wallet you care about.

09 — Reference

The numbers behind all of this

QuantityValueWhere it comes from
P2PKH input149 bytesoutpoint 36 + length 1 + signature 74 + pubkey 34 + sequence 4
P2PKH output34 bytesvalue 8 + script 26
Transaction overhead10 bytesversion 4 + input/output counts 2 + locktime 4
Minimum relay fee1 sat/bytenetwork policy; Aegis accepts 1–10
Cost of spending one coin149 satat the 1 sat/byte minimum
Largest standard transaction100,000 bytesnetwork policy — larger is not relayed
Inputs per transaction600Aegis's limit: ~89 KB, under a second of signing
Dust limit546 satan output below this is not relayable

A sweep whose net result would land under the dust limit is refused rather than built. There is nothing to be gained by broadcasting a transaction the network will drop.