<oembed><type>rich</type><version>1.0</version><author_name>npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd</author_name><author_url>https://nostr.ae/npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2022-10-20&#xA;📝 Original message:&gt; There is a long list of countermeasures that can be built to reduce these&#xA;&gt; attacks, but to be frank we&#39;ve only implemented a small subset of these&#xA;and&#xA;&gt; not had any issues, so even a lower level of security is more than fine&#xA;&gt; today to have basically zero abuse. If issues arise we could implement&#xA;more&#xA;&gt; of the countermeasures as appropriate to the abuse that has happened in&#xA;the&#xA;&gt; wild.&#xA;&#xA;&gt;From reading one of your other mail, apparently 60% of Bitrefill payments&#xA;are non-rbfable on-chain transactions and as such fine for zeroconf. What&#xA;I&#39;m wondering is, in case of a wide majority of the full-nodes supporting&#xA;full-rbf, if any incoming transaction traffic could be risk-managed&#xA;well-enough thanks to some additional countermeasures to be&#xA;zeroconf-acceptable ?&#xA;&#xA;We can be technically creative here. One could think of some overlay&#xA;monitoring between zeroconf merchants, where mempooldiffs are exchanged to&#xA;observe if any acceptance candidate is double-spent inside some other&#xA;participant&#39;s mempool. Of course, the reconciliation rate would need to be&#xA;pretty high to still ensure an &#34;instant payment&#34; UX, though the bandwidth&#xA;overhead should be okay as we assume full-node enterprise hosts. I don&#39;t&#xA;think such functionality would be used by any full-node, it might leverage&#xA;p2p extensions but it would be some differentiated services on top of the&#xA;usual messages. This is just an idea, and the concrete 0conf acceptance&#xA;flow problem needs to be better specified.&#xA;&#xA;&gt; Fundamentally, my view is that all the UX problems related to RBF alone&#xA;are&#xA;&gt; sufficient of an issue to hold off on rolling out these upgrades for the&#xA;&gt; foreseeable future and think of other ways of solving the pinning issue&#xA;and&#xA;&gt; other issues w the current policy. Might be that it&#39;s just a fundamental&#xA;&gt; goal conflict that different people want different behavior but I remain&#xA;&gt; optimistic for creative solutions from both sides. UX issues are soft as&#xA;&gt; opposed to theoretical attack vectors which are hard and binary, we need&#xA;&gt; find a way to weigh &#34;even though it doesn&#39;t happen it can theoretically be&#xA;&gt; hacked&#34; against &#34;many users find it confusing and stressful&#34; which is not&#xA;a&#xA;&gt; trivial assessment to do.&#xA;&#xA;Seriously, solving the pinning issues for contracting protocols already&#xA;busy few of the most brilliant bitcoin developers almost full-time. If we&#xA;had straightforward and backward compatible with all classes of current&#xA;Bitcoin applications, we would go for it. Of course, it doesn&#39;t mean we&#xA;should close the problem of space exploration, and if someone can come up&#xA;with solutions offering equivalent trade-offs, I&#39;m all to listen. This is&#xA;still an open question if we would have to allow a subset of transactions&#xA;to be full-rbf, to fully achieve the semantics of v3 transactions, or at&#xA;least if we would like to protect currently open Lightning channels. Hard&#xA;problems here.&#xA;&#xA;While I&#39;m hearing the uncertainty of an easy assessment weighting between&#xA;favoring UX issues or solving hard theoretical attacks, those latter&#xA;concerns I&#39;ve been serious enough among the Lightning development community&#xA;to take it as one of the top engineering issues among all those last years.&#xA;&gt;From my experience, pentesting in a &#34;black-box&#34; fashion of some subset of&#xA;LN vulnerabilities, they turn out as really practical after a few days of&#xA;hacking if you know where to hit. Moreover, it should be underscored that&#xA;the attacker incentive model between targeting a 0conf merchant like&#xA;Bitrefill and a sizable Lightning infrastructure is a bit different. On one&#xA;side, you will pocket free gift cards that are likely traceable to&#xA;real-world identities, or cancellable by calling out the issuers. On the&#xA;other side, you get a stack of free satoshis, easily fungible among all&#xA;other coins. As such, we might foresee far more exploitations against LN,&#xA;once the network has caught up in terms of volume and stakes to compare&#xA;with the most advanced Defi smart contract platforms in the wider&#xA;cryptocurrencies ecosystem, attracting today sophisticated attackers. Or at&#xA;least, I&#39;m worried by such an outcome playing out for LN if we&#39;re too slow&#xA;on rolling out mitigations...&#xA;&#xA;All that said, from my perspective upgrading mempool policy doesn&#39;t seem&#xA;incompatible with a parallel effort to improve the UX problems of RBF, by&#xA;automatic fee-bumping logic in a transparent way for the end-users. Like&#xA;you said, we should be all optimistic on creative solutions, and&#xA;communicate better between merchants and devs on the problem space.&#xA;&#xA;Looking forward to having more interactions on these topics in the future!&#xA;&#xA;Best,&#xA;Antoine&#xA;&#xA;Le jeu. 20 oct. 2022 à 10:12, Sergej Kotliar &lt;sergej at bitrefill.com&gt; a&#xA;écrit :&#xA;&#xA;&gt;&#xA;&gt;&#xA;&gt; On Thu, 20 Oct 2022 at 03:37, Antoine Riard &lt;antoine.riard at gmail.com&gt;&#xA;&gt; wrote:&#xA;&gt;&#xA;&gt;&gt; Hi Sergej,&#xA;&gt;&gt;&#xA;&gt;&gt; Thanks for the insightful posting, especially highlighting the FX risk&#xA;&gt;&gt; which was far from being evident on my side!&#xA;&gt;&gt;&#xA;&gt;&gt; I don&#39;t know in details the security architecture of Bitrefill zeroconf&#xA;&gt;&gt; acceptance system, though from what I suppose there is at least a set of&#xA;&gt;&gt; full-nodes well-connected across the p2p network, on top of which some&#xA;&gt;&gt; mempools reconciliation is exercised&#xA;&gt;&gt; and zeroconf candidate sanitize against. While I believe this is a&#xA;&gt;&gt; far-more robust deployment against double-spend attempts, there is still&#xA;&gt;&gt; the ability for a sophisticated attacker to &#34;taint&#34; miner mempools, and&#xA;&gt;&gt; from then partition judiciously the transaction-relay network to game such&#xA;&gt;&gt; distributed mempool monitoring system. There is also the possibility of an&#xA;&gt;&gt; attacker using some &#34;divide-and-conquer&#34; transaction broadcast algorithm to&#xA;&gt;&gt; map Bitrefill monitoring point, though as far as I&#39;m aware such algorithm&#xA;&gt;&gt; has not been discussed. I agree with all of that, easier said than done.&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt; There is a long list of countermeasures that can be built to reduce these&#xA;&gt; attacks, but to be frank we&#39;ve only implemented a small subset of these and&#xA;&gt; not had any issues, so even a lower level of security is more than fine&#xA;&gt; today to have basically zero abuse. If issues arise we could implement more&#xA;&gt; of the countermeasures as appropriate to the abuse that has happened in the&#xA;&gt; wild.&#xA;&gt;&#xA;&gt;&#xA;&gt;&gt; On the efficacy of RBF, I understand the current approach of assuming&#xA;&gt;&gt; &#34;manual&#34; RBFing by power users ill UX thinking. I hope in the future to&#xA;&gt;&gt; have automatic fee-bumping implemented by user wallets, where a fee-bumping&#xA;&gt;&gt; budget and a confirmation preference are pre-defined for all payments, and&#xA;&gt;&gt; the fee-bumping logic &#34;simply&#34; enforcing the user policy, ideally based on&#xA;&gt;&gt; historical mempool data. True fact: we don&#39;t have such logic in consumer&#xA;&gt;&gt; wallets today.&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt; In deed. And the vast majority of bitcoin users don&#39;t even have access to&#xA;&gt; any RBF functionality today, so we&#39;re not even seeing gradual development&#xA;&gt; of these things yet. I think this fact needs to be taken into account when&#xA;&gt; designing breaking changes to bitcoin policy. Had these things been in&#xA;&gt; place and widely used the conversation would have been much easier.&#xA;&gt;&#xA;&gt; Fundamentally, my view is that all the UX problems related to RBF alone&#xA;&gt; are sufficient of an issue to hold off on rolling out these upgrades for&#xA;&gt; the foreseeable future and think of other ways of solving the pinning issue&#xA;&gt; and other issues w the current policy. Might be that it&#39;s just a&#xA;&gt; fundamental goal conflict that different people want different behavior but&#xA;&gt; I remain optimistic for creative solutions from both sides. UX issues are&#xA;&gt; soft as opposed to theoretical attack vectors which are hard and binary, we&#xA;&gt; need find a way to weigh &#34;even though it doesn&#39;t happen it can&#xA;&gt; theoretically be hacked&#34; against &#34;many users find it confusing and&#xA;&gt; stressful&#34; which is not a trivial assessment to do.&#xA;&gt;&#xA;&gt; All that said, I learn to converge that as a community we would be better&#xA;&gt;&gt; off to weigh deeper the risks/costs between 0confs applications and&#xA;&gt;&gt; contracting protocols in light of full-rbf.&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt; In deed. And as you wrote in a different message, I agree that it&#39;s&#xA;&gt; unfortunate that there isn&#39;t more interaction between the mailing list and&#xA;&gt; services and companies using this stuff day-to-day. Not that it&#39;s anyone&#39;s&#xA;&gt; fault in particular, let&#39;s try from all sides to find more ways to create&#xA;&gt; more interaction on these topics. I&#39;ve pinged a few colleagues that work on&#xA;&gt; payments in the space and hope they will chime in more in this forum!&#xA;&gt;&#xA;&gt; All the best,&#xA;&gt; Sergej&#xA;&gt;&#xA;&gt;&#xA;&gt;&gt; Le mer. 19 oct. 2022 à 10:33, Sergej Kotliar via bitcoin-dev &lt;&#xA;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&gt; a écrit :&#xA;&gt;&gt;&#xA;&gt;&gt;&gt; Hi all,&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Chiming in on this thread as I feel like the real dangers of RBF as&#xA;&gt;&gt;&gt; default policy aren&#39;t sufficiently elaborated here. It&#39;s not only about the&#xA;&gt;&gt;&gt; zero-conf (I&#39;ll get to that) but there is an even bigger danger called the&#xA;&gt;&gt;&gt; american call option, which risks endangering the entirety of BIP21 &#34;Scan&#xA;&gt;&gt;&gt; this QR code with your wallet to buy this product&#34; model that I believe&#xA;&gt;&gt;&gt; we&#39;ve all come to appreciate. Specifically, in a scenario with high&#xA;&gt;&gt;&gt; volatility and many transactions in the mempools (which is where RBF would&#xA;&gt;&gt;&gt; come in handy), a user can make a low-fee transaction and then wait for&#xA;&gt;&gt;&gt; hours, days or even longer, and see whether BTCUSD moves. If BTCUSD moves&#xA;&gt;&gt;&gt; up, user can cancel his transaction and make a new - cheaper one. The&#xA;&gt;&gt;&gt; biggest risk in accepting bitcoin payments is in fact not zeroconf risk&#xA;&gt;&gt;&gt; (it&#39;s actually quite easily managed), it&#39;s FX risk as the merchant must&#xA;&gt;&gt;&gt; commit to a certain BTCUSD rate ahead of time for a purchase. Over time&#xA;&gt;&gt;&gt; some transactions lose money to FX and others earn money - that evens out&#xA;&gt;&gt;&gt; in the end. But if there is an _easily accessible in the wallet_ feature to&#xA;&gt;&gt;&gt; &#34;cancel transaction&#34; that means it will eventually get systematically&#xA;&gt;&gt;&gt; abused. A risk of X% loss on many payments that&#39;s easy to systematically&#xA;&gt;&gt;&gt; abuse is more scary than a rare risk of losing 100% of one occasional&#xA;&gt;&gt;&gt; payment. It&#39;s already possible to execute this form of abuse with opt-in&#xA;&gt;&gt;&gt; RBF, which may lead to us at some point refusing those payments (even with&#xA;&gt;&gt;&gt; confirmation) or cumbersome UX to work around it, such as crediting the&#xA;&gt;&gt;&gt; bitcoin to a custodial account.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; To compare zeroconf risk with FX risk: I think we&#39;ve had one incident in&#xA;&gt;&gt;&gt; 8 years of operation where a user successfully fooled our server to accept&#xA;&gt;&gt;&gt; a payment that in the end didn&#39;t confirm. To successfully fool (non-RBF)&#xA;&gt;&gt;&gt; zeroconf one needs to have access to mining infrastructure and probability&#xA;&gt;&gt;&gt; of success is the % of hash rate controlled. This is simply due to the fact&#xA;&gt;&gt;&gt; that the network currently won&#39;t propagage the replacement transaction to&#xA;&gt;&gt;&gt; the miner, which is what&#39;s being discussed here. American call option risk&#xA;&gt;&gt;&gt; would however be available to 100% of all users, needs nothing beyond the&#xA;&gt;&gt;&gt; wallet app, and has no cost to the user - only upside.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Bitrefill currently processes 1500-2000 onchain payments every day. For&#xA;&gt;&gt;&gt; us, a world where bitcoin becomes de facto RBF by default, means that we&#xA;&gt;&gt;&gt; would likely turn off the BIP21 model for onchain payments, instruct&#xA;&gt;&gt;&gt; Bitcoin users to use Lightning or deposit onchain BTC to a custodial&#xA;&gt;&gt;&gt; account that we have.&#xA;&gt;&gt;&gt; This option is however not available for your typical&#xA;&gt;&gt;&gt; BTCPayServer/CoinGate/Bitpay/IBEX/OpenNode et al. Would be great to hear&#xA;&gt;&gt;&gt; from other merchants or payment providers how they see this new behavior&#xA;&gt;&gt;&gt; and how they would counteract it.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Currently Lightning is somewhere around 15% of our total bitcoin&#xA;&gt;&gt;&gt; payments. This is very much not nothing, and all of us here want Lightning&#xA;&gt;&gt;&gt; to grow, but I think it warrants a serious discussion on whether we want&#xA;&gt;&gt;&gt; Lightning adoption to go to 100% by means of disabling on-chain commerce.&#xA;&gt;&gt;&gt; For me personally it would be an easier discussion to have when Lightning&#xA;&gt;&gt;&gt; is at 80%+ of all bitcoin transactions. Currently far too many bitcoin&#xA;&gt;&gt;&gt; users simply don&#39;t have access to Lightning, and of those that do and hold&#xA;&gt;&gt;&gt; their own keys Muun is the biggest wallet per our data, not least due to&#xA;&gt;&gt;&gt; their ease-of-use which is under threat per the OP. It&#39;s hard to assess how&#xA;&gt;&gt;&gt; many users would switch to Lightning in such a scenario, the communication&#xA;&gt;&gt;&gt; around it would be hard. My intuition says that the majority of the current&#xA;&gt;&gt;&gt; 85% of bitcoin users that pay onchain would just not use bitcoin anymore,&#xA;&gt;&gt;&gt; probably shift to an alt. The benefits of Lightning are many and obvious,&#xA;&gt;&gt;&gt; we don&#39;t need to limit onchain to make Lightning more appealing. As an&#xA;&gt;&gt;&gt; anecdote, we did experiment with defaulting to bech32 addresses some years&#xA;&gt;&gt;&gt; back. The result was that simply users of the wallets that weren&#39;t able to&#xA;&gt;&gt;&gt; pay to bech32 didn&#39;t complete the purchase, no support ticket or anything,&#xA;&gt;&gt;&gt; just &#34;it didn&#39;t work 🤷‍♂️&#34; and user moved on. We rolled it back, and later&#xA;&gt;&gt;&gt; implemented a wallet selector to allow modern wallets to pay to bech32&#xA;&gt;&gt;&gt; while other wallets can pay to P2SH. This type of thing  is clunky, and&#xA;&gt;&gt;&gt; requires a certain level of scale to be able to do, we certainly wouldn&#39;t&#xA;&gt;&gt;&gt; have had the manpower for that when we were starting out. This why I&#39;m&#xA;&gt;&gt;&gt; cautious about introducing more such clunkiness vectors as they are&#xA;&gt;&gt;&gt; centralizing factors.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; I&#39;m well aware of the reason for this policy being suggested and the&#xA;&gt;&gt;&gt; potential pinning attack vector for LN and other smart contracts, but I&#xA;&gt;&gt;&gt; think these two risks/costs need to be weighed against eachother first and&#xA;&gt;&gt;&gt; thoroughly discussed because the costs are non-trivial on both sides.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Sidenote: On the efficacy of RBF to &#34;unstuck&#34; stuck transactions&#xA;&gt;&gt;&gt; After interacting with users during high-fee periods I&#39;ve come to not&#xA;&gt;&gt;&gt; appreciate RBF as a solution to that issue. Most users (80% or so) simply&#xA;&gt;&gt;&gt; don&#39;t have access to that functionality, because their wallet doesn&#39;t&#xA;&gt;&gt;&gt; support it, or they use a custodial (exchange) wallet etc. Of those that&#xA;&gt;&gt;&gt; have the feature - only the power users understand how RBF works, and&#xA;&gt;&gt;&gt; explaining how to do RBF to a non-power-user is just too complex, for the&#xA;&gt;&gt;&gt; same reason why it&#39;s complex for wallets to make sensible non-power-user UI&#xA;&gt;&gt;&gt; around it. Current equilibrium is that mostly only power users have access&#xA;&gt;&gt;&gt; to RBF and they know how to handle it, so things are somewhat working. But&#xA;&gt;&gt;&gt; rolling this out to the broad market is something else and would likely&#xA;&gt;&gt;&gt; cause more confusion.&#xA;&gt;&gt;&gt; CPFP is somewhat more viable but also not perfect as it would require&#xA;&gt;&gt;&gt; lots of edge case code to handle abuse vectors: What if users abuse a&#xA;&gt;&gt;&gt; generous CPFP policy to unstuck past transactions or consolidate large&#xA;&gt;&gt;&gt; wallets. Best is for CPFP to be done on the wallet side, not the merchant&#xA;&gt;&gt;&gt; side, but there too are the same UX issues as with RBF.&#xA;&gt;&gt;&gt; In the end a risk-based approach to decide on which payments are&#xA;&gt;&gt;&gt; non-trivial to reverse is the easiest, taking account user experience and&#xA;&gt;&gt;&gt; such. Remember that in the fiat world card payments have up to 5%&#xA;&gt;&gt;&gt; chargebacks, whereas we in zero-conf bitcoin land we deal with &#34;fewer than&#xA;&gt;&gt;&gt; 1 in a million&#34; accepted transactions successfully reversed. These days we&#xA;&gt;&gt;&gt; have very few support issues related to bitcoin payments. The few that do&#xA;&gt;&gt;&gt; come in are due to accidental RBF users venting frustration about waiting&#xA;&gt;&gt;&gt; for their tx to confirm.&#xA;&gt;&gt;&gt; &#34;In theory, theory and practice are the same. In practice, they are not&#34;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; All the best,&#xA;&gt;&gt;&gt; Sergej Kotliar&#xA;&gt;&gt;&gt; CEO Bitrefill.com&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; --&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Sergej Kotliar&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; CEO&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Twitter: @ziggamon &lt;https://twitter.com/ziggamon&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; www.bitrefill.com&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Twitter &lt;https://www.twitter.com/bitrefill&gt; | Blog&#xA;&gt;&gt;&gt; &lt;https://www.bitrefill.com/blog/&gt; | Angellist&#xA;&gt;&gt;&gt; &lt;https://angel.co/bitrefill&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; --&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Sergej Kotliar&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; CEO&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Twitter: @ziggamon &lt;https://twitter.com/ziggamon&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; www.bitrefill.com&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Twitter &lt;https://www.twitter.com/bitrefill&gt; | Blog&#xA;&gt;&gt;&gt; &lt;https://www.bitrefill.com/blog/&gt; | Angellist&#xA;&gt;&gt;&gt; &lt;https://angel.co/bitrefill&gt;&#xA;&gt;&gt;&gt; _______________________________________________&#xA;&gt;&gt;&gt; bitcoin-dev mailing list&#xA;&gt;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt; --&#xA;&gt;&#xA;&gt; Sergej Kotliar&#xA;&gt;&#xA;&gt; CEO&#xA;&gt;&#xA;&gt;&#xA;&gt; Twitter: @ziggamon &lt;https://twitter.com/ziggamon&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt; www.bitrefill.com&#xA;&gt;&#xA;&gt; Twitter &lt;https://www.twitter.com/bitrefill&gt; | Blog&#xA;&gt; &lt;https://www.bitrefill.com/blog/&gt; | Angellist &lt;https://angel.co/bitrefill&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20221020/70f554fa/attachment-0001.html&gt;</html></oembed>