<p></p>
<blockquote>
<p><em>This is a Bisq Network project. Please familiarize yourself with the <a href="https://bisq.wiki/Project_management" rel="nofollow">project management process</a>.</em></p>
</blockquote>
<h2>Description</h2>
<p>This is a project proposal to migrate Bisq pricenodes away from using the earn.com fee estimation API in favor of an open-source self-hosted mempool fee estimation API backend, that we can decentralize further by having all Bisq btcnode operators run.</p>
<h2>Rationale</h2>
<p>Whenever the Bitcoin market sees major price action, trading volume suddenly spikes, which results in a huge rush of new transactions into the Bitcoin mempool, and "next block" fees rise very quickly:</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/232186/76489251-239d2180-646b-11ea-8a0c-4c5292085cce.png"><img width="1233" alt="Screen Shot 2020-03-12 at 14 09 39" src="https://user-images.githubusercontent.com/232186/76489251-239d2180-646b-11ea-8a0c-4c5292085cce.png" style="max-width:100%;"></a></p>
<p>This sudden rise in mempool fees causes a major issue in Bisq whereby any trades taken during the time when the mempool fees start to rise use far too low of a fee, and they do not get confirmed for several hours or even days later, until the mempool clears out. The cause of this issue is that Bisq currently uses Earn.com fee estimation API which is slow and not well maintained. The <a href="https://mempool.space" rel="nofollow">https://mempool.space</a> backend uses realtime data from Bitcoin nodes, so it is extremely fast to return realtime fee estimates, compared to the Earn.com API which is always lagging behind:</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/232186/76489806-cc984c00-646c-11ea-98d2-293f2e4db010.png"><img width="468" alt="Screen Shot 2020-01-22 at 1 47 36" src="https://user-images.githubusercontent.com/232186/76489806-cc984c00-646c-11ea-98d2-293f2e4db010.png" style="max-width:100%;"></a></p>
<p>This issue was first reported by <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/ManfredKarrer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ManfredKarrer">@ManfredKarrer</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="280762188" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/1077" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/1077/hovercard" href="https://github.com/bisq-network/bisq/issues/1077">bisq-network/bisq#1077</a> but at the time, a better mempool fee estimation API service did not exist. But now we have a great open-source and self-hosted solution, the <a href="https://github.com/mempool/mempool">mempool project</a>. Of course I am bias, since I am a maintainer/contributor to this project, but IMO it really is the best mempool project for Bitcoin and we have worked very hard making it so.</p>
<p>Recently during the past few days we have seen this issue reproduce again, and now users are complaining in support that their deposit TX have still not confirmed even after waiting for 12 hours. So therefore I propose that we pull the trigger on ditching Earn.com API once and for all.</p>
<h2>Criteria for delivery</h2>
<p>After all Bisq pricenodes upgrade to the new code that will query our federated btcnode mempool fee estimation backend service, we can consider it delivered.</p>
<h2>Measures of success</h2>
<p>After all Bisq nodes start receiving the self-hosted mempool fee data, and users no longer experience this issue due to sudden fee spikes, we can consider it a success.</p>
<h2>Risks</h2>
<p>I've been running the mempool backend and hosting <a href="https://mempool.space" rel="nofollow">https://mempool.space</a> for over 6 months, and it has never crashed, so I feel it is quite stable to run in production. However, we could keep Earn.com API as a backup data source to mitigate the risk of any issues with our own self-hosted API service.</p>
<h2>Tasks</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Modify the Bisq pricenode code to use the mempool fee estimation backend</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Have all Bisq btcnode operators are running the mempool fee estimation backend</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Have all Bisq pricenodes upgrade to the new code that will query our federated btcnode mempool fee estimation backend service</li>
</ul>
<h2>Estimates</h2>
<p>Dev: $2000 USD<br>
Ops: $1000 USD</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/projects/issues/27">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNQBDMPFMWUXGSRWC2TRHBYMNANCNFSM4LGEVL3Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNVLBX6QXRCMLC4EIHLRHBYMNA5CNFSM4LGEVL32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IUNTHDA.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/projects/issues/27",
"url": "https://github.com/bisq-network/projects/issues/27",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>