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.

UTXOとは?ビットコイントランザクションにおける仕組みを解説
ビットコイン特有の概念UTXOを、初心者にも理解できるよう解説。ウォレット残高との関係、インプット/アウトプット、口座残高方式を採用しない理由、手数料やコインベーストランザクション、ジェネシスブロックまで丁寧に説明し、中央管理者なしで二重支払いを防ぐビットコインの核心設計を学べます。

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.

CoinJoinの進化版としてのPayJoin
先日、コロナウイルスの影響もあってかVRが流行しているビットコイナーたち数十名が、Altspace VRというアプリを使って学会発表のようなものを行っていました。そこでのプレゼンテーションはPayJoinというCoinJoinの新形態についてでしたが、興味深い内容でしたので共有させていただきます。ちなみに、このようなイベントの企画が行われているBitcoin VR Degeneratesというテレグラムグループがあるので、参加したい方はどうぞ。 COINJOIN ご存知の方も多いかもしれませんが、CoinJoinとは複数の主体が1つのトランザクションに参加して、outputが誰のコインかわからなくする(混ぜる)ということが目的で行われます。プライバシーを向上することが目的の場合、inputとoutputの金額を比較されても完全には解析されないように、すべての参加者が一定の金額で行うことが多いです(0.1BTC単位のinputを任意の数追加して、出力として同じ数だけ受け取るなど)。そうすると、等しい金額のinputとoutputの対応は確率的にしか判断できません。この過程で問題視され

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.

取引所などに頼らず自分のノードだけでビットコイン価格を推定できる方法が発明:UTXOracle
みなさんはビットコイン価格を知りたいとき、どのように調べていますか? 一般的な調べ方として以下のような方法が考えられると思います: ・取引所のウェブサイトやアプリ、APIから確認する ・TradingViewのようなトレードツールから確認する ・Googleなどで検索する これらはどれも何らかの主体にデータ提供を依存しています。よくこの主体のことを「オラクル」と呼び、オラクルなしでは市場価格がわからない問題、ひいてはオラクルが嘘をつくことで市場を操作できる可能性を指して「オラクル問題」と呼んだりします。 イーサリアム上のDefiで数年前に普及し始めたAMMという取引所のようなスマートコントラクトでは預けられた資産の割合によって価格が決定するという斬新なアプローチを取っています。仮に「BTC・USDTペア」に1 BTCと1万USDTが預けられていれば現在のBTC価格は10,000 / 1 = 10,000 USDT、というふうに、そのスマートコントラクトに預けられている資産だけで価格が計算できます。つまりオラクルを使用しません。 それでも実際には安全性の面でオラクルを利用し

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.

A Mempool.space screen explicitly showing that each output is a channel open by the LNBiG [Hub-3] node

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.

BitcoinノードのP2P通信から見える、スパイノードの存在
皆さんはビットコインのプライバシーについて、ブロックチェーンに刻まれるトランザクション以外の部分についてどれくらい考えているでしょうか。 ランサムウェア、身代金の支払いやDMMビットコインのような流出事件など、犯罪者にもビットコインが利用されている関係で、捜査当局にツールを提供するChainalysis社のような企業は様々な手段でビットコイントランザクションの出どころを突き止めようとアンテナを張っています。 今日はあるビットコインユーザーが公開した「ビットコインノードのP2Pトラフィックデータ分析」から、いわゆる「スパイノード」の存在に触れ、トランザクションの出どころを解析する他のいくつかの手法(とプライバシーを守るために私達が取れる対策)を解説します。 引用元の記事はこちらです: Bitcoin node P2P traffic analysisI’d like to share some of my recent node traffic analyses in case someone else might find the method for making estim

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:

プライバシー重視の一味違うブロックエクスプローラー:Spiral
読者のみなさんはビットコインのトランザクションが着金するのを確認したり、ブロックサイズを確認する際にはどうしていますか? もちろん本稿のコアな読者の中には「自分のノードで確認するわ!」というユーザーもある程度いらっしゃると思いますが、世の中の大多数のユーザーはウェブで利用できるいずれかのブロックチェーンエクスプローラーを利用しているのではないかと思います。実際、取引所の入出金で送られてくるメールなんかにも、その取引所が選んだエクスプローラーのリンクが貼ってありますよね。 代表的なサービスとしてBlockstream.infoやBlockchain.comなどをよく見かけますが、他にもBlockchairや国産のChainflyerなど多数のエクスプローラーが存在します。これらは差別化ポイントとして、例えばSegwitの利用でどれくらい手数料を節約できたかを表示したり、「ユーザデータを保持しない」というトラストフルな約束をしたり、充実した検索機能などを提供していますが、保証できる形でユーザーのプライバシーを守るものはこれまでありませんでした。 今日はユーザーのプライバシーに重きを置

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:

ライトニングユーザーがプライバシーを最重視するならどう使う?
ライトニングネットワークはオンチェーンの送金と比較してプライバシーの高い側面と低い側面があります。今日紹介するMutiny Walletはライトニングをプライバシーを最重視して使うユーザーを想定して開発されている奇特なウォレットです。 ちなみにSpiral (Square Crypto)が開発するLDKを使ったSenseiというライトニングノードをバックエンドに採用しています。 ※まだ実際に利用できるクオリティではありません。 LNのプライバシー ライトニングネットワークでの送金はオフチェーンで行われるため不特定多数の目にさらされることはなく、これがオンチェーンの送金と比較してプライバシーが高いと言われる主要因です。ところが、送金に関する情報が他者にリークしてしまうLN特有の問題がいくつかあります。以下に大きなものを2つ挙げます。

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?