LeakCheck
Catch privacy leaks before you broadcast.
Created on 27th September 2026
•
LeakCheck
Catch privacy leaks before you broadcast.
The problem LeakCheck solves
Bitcoin's ledger is public forever. Chain-analysis firms use well-known heuristics to link your coins and identify your change — but wallets rarely tell you what a transaction will reveal until it's already on-chain, when nothing can be undone.
LeakCheck is a local, pre-broadcast privacy check. You export your unsigned PSBT from your wallet, and LeakCheck:
- Plays the observer It runs the standard heuristics blind: common-input ownership, round-amount change detection, script-type matching, optimal change, address reuse, consolidation.
- Checks the observer against the truth Your PSBT contains wallet metadata (BIP32 derivation paths) that no observer sees. So instead of saying "your change is probably output 1", LeakCheck can say "an observer's guess would be correct" — or "an observer would be misled".
- Tells you what you can still fix. Coin control, a fresh change address, leaving a small coin out — and says plainly when something can't be fixed (e.g. the recipient sets the amount).
What it never does:
- No network requests (enforced by tests), no keys, no accounts, no custody. It can't move funds.
- Never calls a transaction "clean", "safe" or "private". A report with no warnings says exactly how many checks applied, and lists what was not checked — starting with address reuse across your wallet history, which a PSBT can't reveal.
Missing metadata is never treated as evidence, and conflicting heuristics lower confidence, never severity: it assumes the best-equipped observer.
Challenges I ran into
-
Getting the heuristics' direction right. The round-amount heuristic treats the round output as the payment, so a round payment reveals your change, while a round change output misleads the observer. It's easy to invert, and an inverted privacy tool gives advice that makes things worse. Fix: every direction is locked in by tests, and I mutation-tested them — flipping any rule makes the suite fail.
-
Missing data is not evidence. An early design treated inputs without wallet metadata as "belongs to another party" (PayJoin), which would have told users a real leak was harmless. Now unverifiable conditions never lower severity; only inputs carrying another wallet's fingerprint count as foreign — and even then, links among your own coins are still reported.
-
Finalized PSBTs strip the metadata. Finalizing a PSBT removes derivation paths (per BIP174), so the truth comparison becomes impossible. LeakCheck detects this and asks for the PSBT before finalizing.
-
A changeless payment looks identical to missing metadata. When no output belongs to your wallet, LeakCheck can't tell "no change" from "wallet omitted output data" — so it says exactly that and reports observer guesses as unverified instead of pretending.
-
Honest counting. "No warnings" is meaningless if most checks didn't apply, so every check emits exactly one result and the report says how many actually ran.
Tracks Applied (1)
Cypherpunk
Bitshala