Sub topic 9
Splitting Funds Between Hot and Cold Storage
This chapter assumes you already know what a hot wallet and a cold wallet are, and that a wallet's security comes down to where its signing keys live. It also assumes you have sent and received crypto before. The question here is how much belongs in each wallet, how funds move between them, and where this design fails.
Why one wallet is the wrong answer
A single hot wallet is convenient, but one malware infection or phishing click can expose everything you own. A single cold wallet is safer, but every small payment requires fetching a device, building a transaction, and signing it. You tend to skip that for small amounts, or you make mistakes while rushing.
A tiered setup splits the funds so each tier is judged against its own threat model:
- The spending tier is a hot wallet. It is exposed, so its loss must be affordable.
- The savings tier is cold storage. It is rarely used, so friction is acceptable.
Bank customers do the same thing. They carry cash in a wallet and keep savings in a safe. The point is not to eliminate risk. The point is to cap the loss from the most likely attack at an amount you can accept.
Sizing the hot wallet
The hot wallet is the tier most likely to be compromised, so size it by the loss you can accept, not by what you might want to spend. Two rules of thumb work well together.
- Affordable-loss rule. The hot balance should be an amount you could lose entirely without changing your life. Many people use a few percent of their holdings or roughly a month of expected spending, whichever is lower.
- Refill-interval rule. The hot balance should cover your normal spending until the next planned refill. If you refill monthly, hold about a month of spending plus a margin.
Take the lower of the two results. If they disagree strongly, the affordable-loss rule wins, because security failures are rarer than spending but far more costly.
Define two numbers:
- The cap is the balance above which you must move funds out.
- The target is the balance you return to after moving funds.
The target must sit below the cap. If the cap and target were equal, one small incoming payment would trigger a transfer every time. This gap is hysteresis: a buffer that stops a rule from switching on and off repeatedly. For example, with a cap of 2,000,000 sats and a target of 500,000 sats, nothing happens until the balance passes 2,000,000. Then the excess above 500,000 moves to cold storage.
A rebalancing rule in code
This function returns how many satoshis (sats, the smallest bitcoin unit) to move from hot to cold.
def plan_rebalance(hot_sats, hot_cap_sats, hot_target_sats):
"""Return how many satoshis to move from the hot wallet to cold storage.
If the hot balance is at or below the cap, nothing moves.
Otherwise, move enough to bring the hot wallet back to its target.
"""
if hot_target_sats > hot_cap_sats:
raise ValueError("target must not exceed cap")
if hot_sats <= hot_cap_sats:
return 0
return hot_sats - hot_target_sats
print(plan_rebalance(hot_sats=5_000_000, hot_cap_sats=2_000_000, hot_target_sats=500_000)) # 4500000
print(plan_rebalance(hot_sats=1_000_000, hot_cap_sats=2_000_000, hot_target_sats=500_000)) # 0The first call moves 4,500,000 sats because the hot wallet is over its cap. The second call moves nothing because the balance is under the cap.
The rule has one gap. A real on-chain transfer costs a network fee. If the fee is large compared with the amount moved, the transfer wastes money. This version skips moves where the fee exceeds 1% of the amount:
def plan_rebalance_with_fee(hot_sats, hot_cap_sats, hot_target_sats, fee_sats):
"""Like plan_rebalance, but skip transfers whose fee is over 1% of the amount."""
if hot_target_sats > hot_cap_sats:
raise ValueError("target must not exceed cap")
if hot_sats <= hot_cap_sats:
return 0
amount = hot_sats - hot_target_sats
if fee_sats * 100 > amount:
return 0
return amount
print(plan_rebalance_with_fee(5_000_000, 2_000_000, 500_000, fee_sats=5_000)) # 4500000
print(plan_rebalance_with_fee(2_100_000, 2_000_000, 500_000, fee_sats=20_000)) # 0In the second call, the amount is 1,600,000 sats and the fee is 20,000, which is 1.25%. The function waits for a cheaper moment or a larger balance.
Note that the fee is paid from the hot wallet in addition to the amount sent, so the hot balance ends slightly below the target. If that matters, subtract the fee from the target when you plan.
How funds flow between tiers
Money moves in a loop. Income and refills enter the hot wallet. Spending leaves it. When the hot balance passes the cap, the excess goes to cold storage. When the hot balance runs low, you build a transaction online and sign it offline to bring in a refill.
The two directions have different costs. Moving funds to cold storage is easy, because you only need a receiving address. The cold wallet's keys are not involved, and a watch-only wallet (a wallet that holds public keys but no private keys) can generate those addresses. Moving funds from cold storage is the expensive step, because it needs signing. The cold wallet's keys must be used, which is the moment of greatest exposure.
That asymmetry shapes the routine. Deposits to cold storage can be frequent and cheap. Withdrawals should be rare and planned, which is another reason to keep a month or more of spending in the hot wallet.
A three-tier variant
Some people use more than two tiers. The extra tier is a middle layer that makes refills less painful.
| Tier | Typical form | Share of holdings | Used for | Signing effort |
|---|---|---|---|---|
| Spending | Phone or desktop hot wallet | Small (a few percent) | Daily payments | Seconds |
| Reserve | Hardware wallet kept at home | Medium | Refilling the spending tier | Minutes |
| Deep savings | Multisignature or air-gapped setup, backups stored apart | Largest | Long-term holding | Hours, planned ahead |
The reserve tier is useful because refills happen often enough that fetching deep savings each time would be a burden. Whether to add a tier depends on your refill frequency. If you refill twice a year, two tiers are enough. If you refill monthly, a reserve tier is worth the complexity.
Edge cases and gotchas
Exchanges and custodial balances are hot storage
Funds left on an exchange belong to the spending tier in risk terms. You do not hold the keys, so the exchange's security, solvency, and account controls all apply. If you count exchange balances in the hot tier, count them against the same affordable-loss limit.
UTXO fragmentation
Bitcoin wallets hold coins as UTXOs (unspent transaction outputs, the individual chunks of coin a wallet can spend). A hot wallet that receives many small payments accumulates many small UTXOs. Later, spending or consolidating them costs more because each input adds to the transaction size and fee. Moving the excess to cold storage in one transaction is a natural consolidation. The cost rises during fee spikes, so consolidate when fees are low.
Privacy leaks from sweeps
Sending all hot funds to one cold address links those UTXOs together on the blockchain. An observer can conclude that they belong to the same owner. If privacy matters to you, review coin selection and avoid reusing addresses.
Never import the cold key into the hot wallet
A common shortcut is to "sweep" a cold paper or seed backup into a phone wallet. Once the seed phrase is typed into a networked device, that wallet is no longer cold. It becomes hot, and the cold tier no longer exists. If you need to spend, sign on the cold device, or move the whole balance to a fresh address you control and treat the old seed as burned.
Test with small amounts first
Send a small test amount to any new cold address, then confirm you can spend it back before moving the full balance. The goal is to check both the address and the signing path. Recovery testing in the later chapters builds on this habit.
Automatic triggers can bypass your safety check
A script can compute the amount to move, but it should not send automatically to an address it holds in a file. Malware that edits that file would redirect your savings. Prefer a flow where you confirm the destination address on the cold device's own screen.
Common errors
- Cap set too high. If the cap is tied to what you hope to spend instead of what you can afford to lose, the hot tier becomes your real vault.
- Target equal to the cap. Every deposit then triggers a transfer, which costs fees and creates noise.
- Rebalancing on a fixed schedule only. A balance can jump over the cap between reviews. Check after large receipts, not just monthly.
- Skipping the fee check. Moving small excesses at high fee rates wastes funds.
- Treating cold as set-and-forget. A cold tier with a lost backup or an untested restore is not safe. It is only unseen.
Putting it together: a worked policy
Suppose you hold 0.2 BTC (20,000,000 sats) and spend about 300,000 sats a month.
- Affordable loss: you decide you can lose 2% of holdings, which is 400,000 sats.
- Refill interval: you refill monthly, so you need about 300,000 sats plus a 100,000 sat margin, which is 400,000.
- Both rules give the same answer, so the target is 400,000 sats.
- Set the cap at 1,000,000 sats. Anything above that moves to cold storage.
- Keep the remaining 19,600,000 sats cold, with the seed backups stored in separate locations.
- Each month, check the balance. If it is under 150,000 sats, plan a refill from cold using an offline signer.
This policy fits in one paragraph of notes. A policy you can state in a few lines is one you will actually follow.
Exercise
Your hot wallet has a cap of 1,000,000 sats and a target of 300,000 sats. After a large payment arrives, it holds 1,800,000 sats, and the network fee for a transfer is 6,000 sats. Using the fee-aware rule from this chapter (skip the move if the fee exceeds 1% of the amount), how much do you move, and does the hot balance end up exactly at the target?
Show answer
The balance is over the cap, so the amount is 1,800,000 - 300,000 = 1,500,000 sats. One percent of that is 15,000 sats, and the fee of 6,000 is below it, so you move 1,500,000 sats. The hot wallet pays the fee on top of the amount, so it ends at 300,000 - 6,000 = 294,000 sats, slightly below the target.
Exercise
A colleague sets the hot wallet's cap and target both to 500,000 sats and reviews the balance only on the first day of each month. Name two problems with this design and fix each one.
Show answer
First, with cap equal to target, any balance above 500,000 triggers a transfer, so small deposits cause frequent, fee-costing moves. Fix it by setting the target well below the cap. Second, a monthly review lets a large receipt sit in the hot wallet for weeks over the intended limit. Fix it by also checking after large receipts, or by alerting when the balance passes the cap.
Exercise
Why is moving funds into cold storage easier than moving them out?
Show answer
Sending to cold storage needs only a receiving address, which a watch-only wallet can generate without private keys. Moving funds out requires a signature from the cold wallet's private keys, so the signing device must be used, which is the point of highest exposure and effort.