What Chainalysis Sees: Bitcoin Privacy Leaks and Defenses
This article was translated from Japanese with AI. Read the original (日本語) · Report a translation issue
Bitcoin's on-chain transfers are sometimes described as having no anonymity. Yet on Bitcoin, nobody verifies their identity or sends funds under their real name either. Because the system works through Bitcoin addresses, which are "pseudo-identities that are, in principle, single-use," it is said to offer pseudonymity rather than anonymity.
In practice, though, even if you use Bitcoin ideally and never reuse addresses, privacy can still leak through the characteristics of your transactions, the way those transactions are broadcast, or the behavior of your wallet, allowing others to infer links between the multiple addresses in your wallet. As a result, someone might estimate the total amount of bitcoin you hold, or a false link might cause your funds to be wrongly flagged as criminal proceeds. In the latter case, you could even end up having your funds frozen at an exchange.
In this article, I'll explain the various linking techniques used by those trying to strip away Bitcoin users' privacy, such as chain analysis firms like Chainalysis, and list the steps you can take as a Bitcoin user to protect your privacy.
• "Heuristics": inferences drawn from transaction characteristics
• "Sybil attacks": locating where transactions originate on the network through sheer numbers
• "Public Electrum servers": targeting less privacy-conscious users
• What we can do (summary)
"Heuristics": inferences drawn from transaction characteristics
Bitcoin is held in units called UTXOs. If the goal of chain analysis is to "link UTXOs that appear to belong to the same wallet," then the thing to analyze is transactions, the mechanism by which UTXOs are spent and created.
Mikura's article covers UTXOs comprehensively, so if you're already confused at this point, please read that first.
Transactions have characteristics, such as the number, amounts, script types, and origins of the UTXOs being spent, and the number, amounts, and types of the UTXOs being created. Heuristics are rules of thumb used to look at a transaction's contents and infer that "probabilistically, this UTXO and that UTXO are likely controlled by the same entity."
There are a great many of them, but here are three examples.
Common Input Ownership Heuristic
For example, the heuristic known as the "Common Input Ownership Heuristic" or "Co-spend Heuristic" holds that in a typical transaction, "all the UTXOs on the input side are owned by the same entity." When you make a fairly large payment from a wallet holding many UTXOs, for instance, you may use multiple UTXOs as inputs. These may have been received on separate occasions and been completely unrelated, but in this transaction they all sit on the input side.
Now think about it: using Bitcoin in a way where multiple users take turns adding inputs while building a transaction is not common. So it's almost certainly safe to assume that all the input UTXOs in the same transaction belong to the same wallet (probably true in over 98% of cases). That is the Common Input Ownership Heuristic.
Payjoin and CoinJoin are examples of protocols where this heuristic doesn't apply. See my earlier articles.
Round Amount Heuristic
Say a payment creates two UTXOs (the payment amount and the change). If the amounts were random, you couldn't tell which was the payment and which was the change. Through various kinds of analysis, however, it's possible to make an educated guess.
One of these is the Round Amount Heuristic. If, for example, exactly 1 million sats is sent and the change is 177,563 sats or the like, the round number, which a human may have deliberately chosen, is likely the payment amount. If you know the BTC/USD rate at that moment, you can also include "numbers that are round in dollar terms" in the analysis. UTXOracle, which can estimate the current Bitcoin price from blockchain data alone, is an application of this idea.
Beyond the Round Amount Heuristic, more evidence can also accumulate later, from transaction patterns and the like, for determining whether a given output was change or a payment. One of the difficulties of on-chain privacy is that it can degrade later as new information emerges, and that it can degrade because of other people's actions.
Lightning Channel Force Closure
As long as Lightning channels are opened and closed cooperatively, they can't be identified as such on the blockchain, especially if you use Taproot Channels. In a force close, however, distinctive transactions and scripts such as commitment transactions and HTLCs are made public, so it becomes obvious to anyone that it was the force close of a Lightning channel.
That said, as I'll explain later, the Lightning protocol requires that when you open a public channel capable of routing payments, you announce the on-chain UTXO corresponding to that channel to the Lightning Network. So all public channels can be identified simply by monitoring the Lightning Network. That's why sites like Mempool.space display node names for Lightning channel opens and closes.

Incidentally, in a cooperative close, the channel balance is paid out to each node's wallet, but if those funds are later used for something like opening another channel, it tends to become clear which output belonged to whom, as shown here.
"Sybil attacks": locating where transactions originate on the network through sheer numbers
Chain analysis firms don't just look at the blockchain. They also listen in on the P2P network through which transactions flow before being included in a block, as well as on networks like Lightning that provide supplementary information about UTXOs and transactions.
For example, the Bitcoin network has tens of thousands of nodes, but if you want to identify which node first broadcast a particular transaction, you can narrow it down by deploying a large number of nodes across the network and checking when each of them received each transaction. Identifying the source of a broadcast could make it possible to infer a rough geographic location or the wallet being used, or perhaps allow authorities to demand logs from the operator of that node.
I wrote about this attack in 2025, describing it as "spy nodes." If you're interested, please give it a read.
It's a given that they gather information on Lightning, and they may also be monitoring metaprotocols such as Ordinal Inscriptions. The compliance tool budgets that exchanges and others are forced to bear are being spent on attacks like these against Bitcoin users' privacy.
"Public Electrum servers": targeting less privacy-conscious users
Finally, there's a data collection technique that is also almost certainly in use: "running public Electrum servers."
An Electrum server is software that enhances a Bitcoin node's balance lookup capabilities. Most Bitcoin wallets don't connect directly to a Bitcoin node; instead, they query an Electrum server for the balance of each address. Because a wallet queries the balances of a large number of its addresses, including unused ones, this is a frightening privacy hole that lets the server record "links between addresses" with very high accuracy.
Which Electrum server does the wallet you use every day query? Some public Electrum servers promise in their terms that they won't collect data and will protect your privacy, but there is no way to verify for certain that they actually operate that way.
Three years ago, a block explorer called "Spiral" briefly appeared, built on the idea of protecting user privacy technically, but it soon disappeared. I covered it in this article:
Many wallets let users configure this, so if you've set up something like Umbrel, I strongly recommend installing an Electrum server and a VPN in addition to your Bitcoin node and pointing your wallet at your own server.
What we can do
Some readers may think: chain analysis firms are, in most cases, just tools for things like preventing criminal use, and they pose no threat to users who aren't doing anything wrong. So why bother taking countermeasures?
But there are plenty of reasons to protect your privacy. For example, if data collected this way were linked to personal information and leaked, it would be like having a bounty on your head. In countries where the government is evil, you also need to consider the risk of that data ending up with the government.
Bitcoin is technically an easy asset to protect, and Japan is safe today, but if you want it to stay easy to protect physically as well, the more privacy you have, the better. With that, let's look at the countermeasures.
List of countermeasures (summary)
• Avoid creating sloppy transactions as much as possible
It requires a wallet that supports coin control (a feature for manually choosing which UTXOs to spend), records of your past transactions, and practice, but one countermeasure is to avoid creating sloppy transactions that leak more privacy than necessary.
For example, by managing UTXOs received on separate occasions so that they're linked as little as possible (as if they were in separate wallets), you make the full picture hard to grasp. You could also simply split them into separate wallets in the first place. (Be careful not to make mistakes!)
Probably the most common sloppy transaction is "consolidating UTXOs into a single output when they had little linkage to each other." That said, it's a tough call, since consolidation also affects usability when fees spike.
• Use your own node and your own Electrum server
This one is self-explanatory. Stop asking other people about your own wallet.
• Occasionally "broadcast from a different node"
Honestly, countermeasures against spy nodes on the P2P network are hard for individuals to take. And since this method on its own is unlikely to provide conclusive evidence linking assets, I don't think you necessarily need to counter it, but if you really want to, it's a good idea to broadcast transactions from a different node. For example, some mining pools and block explorers have transaction broadcast forms.
If you connect via Tor, you can also hide where you're connecting from from the block explorer itself.
• Make use of Lightning
Lightning came up in a somewhat negative context in this article, but with "unannounced channels" (so-called private channels), neither the channel itself nor its corresponding UTXO is published to the network. Lightning itself offers senders quite strong privacy, so if you use it from a Lightning node that has only private channels, you can avoid chain analysis altogether. Spinning up a new node for each channel is another good option. There used to be a wallet that did exactly that:
After a channel closes, the behavior of the peer node might reveal that it was a Lightning channel, but very little information can be gained.
Using Bitcoin while protecting your privacy is hard even for seasoned experts. In that respect, isn't the fact that Lightning gives you a certain degree of privacy a major draw?
