Open wiz opened 4 years ago
This one is actually high risk area, as it is used within our code not only for validation purpose on the maker side, but also during the trade process on the taker side as well. Also in disputes, which can be opened from both sides and the taker would lack this information when the dispute is opened from their side. So to handle this properly there will be lots of critical code changes involved and I'm not sure if we want to do this atm, besides the fact that I'm touching this part of the codebase for the first time. What I can do as a first small step is to remove this information from the offer stats dump.
Background
When a Bisq trade offer is created, the maker's Bisq node broadcasts a P2P message to the network to announce his offer.
Issue
The offer data object contains excessive metadata about the trade, specifically the on-chain TXID of the maker's deposit TX. Unfortunately, because the offerId of every Bisq trade is mapped to the on-chain Bitcoin depositTxID, this allows malicious blockchain analysis of all Bisq trades.
Example data object:
Example blockchain analysis of this trade: https://blockstream.info/tx/9c67453e57cfc80e2c121caf54f8f739cef6c5d7e9afdceec7843436a920f9d8?expand
How to Reproduce
--dumpStatistics=true
option enabledoffers_statistics.db
file will be generated in your$HOME/.bisq/btc_mainnet/db/
datadir.grep -i id offers_statistics.json
Expected Result
Bisq should not reveal the on-chain Bitcoin TXID for each offer.
Actual Result
A full mapping of offer IDs to Bitcoin TXIDs for the current offers on Bisq is generated. Snippet: