<h3>Background</h3>
<p>When a Bisq trade offer is created, the maker's Bisq node broadcasts a P2P message to the network to announce his offer.</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/232186/72218793-579aba00-3582-11ea-877c-69ddbfba6bdc.png"><img width="740" alt="Screen Shot 2020-01-12 at 21 27 07" src="https://user-images.githubusercontent.com/232186/72218793-579aba00-3582-11ea-877c-69ddbfba6bdc.png" style="max-width:100%;"></a></p>
<h3>Issue</h3>
<p>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.</p>
<p>Example data object:</p>
<pre><code>  {
    "currency": "JPY", 
    "direction": "SELL",
    "tradePrice": 8791986900,
    "tradeAmount": 10000, 
    "tradeDate": 1578784489149,
    "paymentMethod": "F2F", 
    "offerDate": 1578784398352,
    "useMarketBasedPrice": true,
    "marketPriceMargin": 0.0,
    "offerAmount": 10000, 
    "offerMinAmount": 10000, 
    "offerId": "12635-224f7143-3366-46e7-9e14-7fa6f39fcb2b-125",
    "depositTxId": "9c67453e57cfc80e2c121caf54f8f739cef6c5d7e9afdceec7843436a920f9d8",
    "currencyPair": "BTC/JPY",
    "primaryMarketDirection": "SELL",
    "primaryMarketTradePrice": 87919869000000,
    "primaryMarketTradeAmount": 10000, 
    "primaryMarketTradeVolume": 8791980000
  },
</code></pre>
<p>Example blockchain analysis of this trade:<br>
<a href="https://blockstream.info/tx/9c67453e57cfc80e2c121caf54f8f739cef6c5d7e9afdceec7843436a920f9d8?expand" rel="nofollow">https://blockstream.info/tx/9c67453e57cfc80e2c121caf54f8f739cef6c5d7e9afdceec7843436a920f9d8?expand</a></p>
<h3>How to Reproduce</h3>
<ol>
<li>Start Bisq with <code>--dumpStatistics=true</code> option enabled</li>
<li>After a few minutes, a <code>offers_statistics.db</code> file will be generated in your <code>$HOME/.bisq/btc_mainnet/db/</code> datadir.</li>
<li>Extract the mapping of offer ID and deposit TXID by <code>grep -i id offers_statistics.json</code></li>
<li>Paste any Bitcoin TXID into any Bitcoin Block Explorer</li>
</ol>
<h3>Expected Result</h3>
<p>Bisq should not reveal the on-chain Bitcoin TXID for each offer.</p>
<h3>Actual Result</h3>
<p>A full mapping of offer IDs to Bitcoin TXIDs for the current offers on Bisq is generated. Snippet:</p>
<pre><code>    "id": "PVQSMV-90593c20-9984-440f-8f83-dc98c9decdfd-124",
    "offerFeeTxID": "875b94ce60bc4540cbf8a2c238d08eff54d1ee96b216fa2b3369ad4dd8665013",
    "id": "aAPLmh98-2d03accc-ba6b-4efa-ba6d-c53ed02a2173-111",
    "offerFeeTxID": "44b00de808d0145f9a948fe1b020c5d4173402ba0b5a5ba69124c67e371bca18",
    "id": "CX9zlV6g-a4231013-692a-4c58-a4df-e352aeaa5a52-124",
    "offerFeeTxID": "779fca348fcb28de906ad75a4c0f752b52abba9a9274935a2c14b3ec375658fa",
    "id": "qoodj-9026c051-c175-4c09-8eae-d5b7ebae13d1-125",
    "offerFeeTxID": "c068b933c7d3192e3799e77c0c0ec6abee28497a80dcef0b30caafbaa63b9e0f",
    "id": "7266425-98a588a2-bcdd-4437-acf2-2fb444f6a617-124",
    "offerFeeTxID": "9e4c35cc558e84151f151877aff07f509c847833a9665d2d58bd0a1ae3d2b3f8",
    "id": "5630195-4d8caa6e-2376-4db2-9c7a-bb30a36c0dde-124",
    "offerFeeTxID": "78ac815121acc90107317621928308e54d39d806c46557603a3d36cf68ce3544",
    "id": "tubtgpda-143cc765-ef4b-4e0e-99bd-a3d409a14e51-116",
    "offerFeeTxID": "cee365b8d9b09a69f55c5b59e96494742e0ee8815a57c8b34958d842a4145f56",
</code></pre>
<h3>Severity</h3>
<p><g-emoji class="g-emoji" alias="rotating_light" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f6a8.png">🚨</g-emoji><g-emoji class="g-emoji" alias="rotating_light" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f6a8.png">🚨</g-emoji><g-emoji class="g-emoji" alias="rotating_light" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f6a8.png">🚨</g-emoji></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/issues/3894?email_source=notifications&email_token=AJFFTNXLJ7ADACZKK4XHCZDQ5METLA5CNFSM4KFXNPH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IFSNRSA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNWQHFYNJBBWO7YUXODQ5METLANCNFSM4KFXNPHQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNVOKGWLTSNZOKCHROLQ5METLA5CNFSM4KFXNPH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IFSNRSA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/issues/3894?email_source=notifications\u0026email_token=AJFFTNXLJ7ADACZKK4XHCZDQ5METLA5CNFSM4KFXNPH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IFSNRSA",
"url": "https://github.com/bisq-network/bisq/issues/3894?email_source=notifications\u0026email_token=AJFFTNXLJ7ADACZKK4XHCZDQ5METLA5CNFSM4KFXNPH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IFSNRSA",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>