<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-19&#xA;📝 Original message:Hi Sergej,&#xA;&#xA;Thanks for the insightful posting, especially highlighting the FX risk&#xA;which was far from being evident on my side!&#xA;&#xA;I don&#39;t know in details the security architecture of Bitrefill zeroconf&#xA;acceptance system, though from what I suppose there is at least a set of&#xA;full-nodes well-connected across the p2p network, on top of which some&#xA;mempools reconciliation is exercised&#xA;and zeroconf candidate sanitize against. While I believe this is a far-more&#xA;robust deployment against double-spend attempts, there is still the ability&#xA;for a sophisticated attacker to &#34;taint&#34; miner mempools, and from then&#xA;partition judiciously the transaction-relay network to game such&#xA;distributed mempool monitoring system. There is also the possibility of an&#xA;attacker using some &#34;divide-and-conquer&#34; transaction broadcast algorithm to&#xA;map Bitrefill monitoring point, though as far as I&#39;m aware such algorithm&#xA;has not been discussed. I agree with all of that, easier said than done.&#xA;&#xA;(Which let me think that such distributed mempool monitoring system should&#xA;be provide some enhanced security even in a full-rbf world, that they would&#xA;require far more resources than the average node from the p2p network as a&#xA;whole might be a counter-argument for their social acceptance, however I&#39;m&#xA;also thinking that a robust Lightning infrastructure of the future might&#xA;require multiple mempool/transaction-relay endpoints, at least to reduce&#xA;cross-layer mapping links, though conversation for another day...).&#xA;&#xA;About the FX risk itself, this is far from being isolated from 0conf, as&#xA;Lightning payments themselves might still have a time lapse between the&#xA;issuance of invoices and the settlement of the HTLC at the payee endpoint.&#xA;In fact this volatility concern is endured by anyone using Bitcoin&#xA;regularly in interface with the fiats worlds, i.e everyone excepted the&#xA;long-term store of wealth crowd. From a merchant perspective, effectively,&#xA;the options to cover themselves against this risk are simple. One could&#xA;take positions directly in traditional financial derivatives, like doing&#xA;participants in international trades, though it would require an educated&#xA;manpower on the merchant side. Or leveraging some stablecoins derivatives&#xA;system, coming with its own technical complexity and social trust hazards.&#xA;Another direction would be to clearly define the responsibility between&#xA;merchants or users, on whom is the FX risk. If it&#39;s on users, they should&#xA;be the one RBFing/CPFPing to increase the merchant address output, beyond&#xA;the fact &#34;dynamic pricing&#34; would be a weird UX, it would require liveliness&#xA;from the wallets until block confirmation (introducing here many&#xA;requirements of a LN wallet). If it&#39;s on the merchants, they could be the&#xA;ones CPFPing thanks to package relay, though it would come again with some&#xA;engineering complexity and overhead blockspace cost (and the first version&#xA;of package relay likely won&#39;t enable CPFP batching for concerns of&#xA;potential bandwidth/CPU DoS).&#xA;&#xA;On the efficacy of RBF, I understand the current approach of assuming&#xA;&#34;manual&#34; RBFing by power users ill UX thinking. I hope in the future to&#xA;have automatic fee-bumping implemented by user wallets, where a fee-bumping&#xA;budget and a confirmation preference are pre-defined for all payments, and&#xA;the fee-bumping logic &#34;simply&#34; enforcing the user policy, ideally based on&#xA;historical mempool data. True fact: we don&#39;t have such logic in consumer&#xA;wallets today. Or at least only rudimentary in the backend of LN&#xA;implementations, and only for time-sensitive on-chain claims for now (or at&#xA;least speaking for LDK). If we take the history of browsers as a&#xA;comparison, while we might be out of the Lynx-style phase of wallets, we&#xA;might still be more in the late Netscape kind of thing than something like&#xA;Chrome today. In other words, there are many directions for improvements&#xA;for users&#39; wallets.&#xA;&#xA;All that said, I learn to converge that as a community we would be better&#xA;off to weigh deeper the risks/costs between 0confs applications and&#xA;contracting protocols in light of full-rbf.&#xA;&#xA;Best,&#xA;Antoine&#xA;&#xA;Le mer. 19 oct. 2022 à 10:33, Sergej Kotliar via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; a écrit :&#xA;&#xA;&gt; Hi all,&#xA;&gt;&#xA;&gt; Chiming in on this thread as I feel like the real dangers of RBF as&#xA;&gt; default policy aren&#39;t sufficiently elaborated here. It&#39;s not only about the&#xA;&gt; zero-conf (I&#39;ll get to that) but there is an even bigger danger called the&#xA;&gt; american call option, which risks endangering the entirety of BIP21 &#34;Scan&#xA;&gt; this QR code with your wallet to buy this product&#34; model that I believe&#xA;&gt; we&#39;ve all come to appreciate. Specifically, in a scenario with high&#xA;&gt; volatility and many transactions in the mempools (which is where RBF would&#xA;&gt; come in handy), a user can make a low-fee transaction and then wait for&#xA;&gt; hours, days or even longer, and see whether BTCUSD moves. If BTCUSD moves&#xA;&gt; up, user can cancel his transaction and make a new - cheaper one. The&#xA;&gt; biggest risk in accepting bitcoin payments is in fact not zeroconf risk&#xA;&gt; (it&#39;s actually quite easily managed), it&#39;s FX risk as the merchant must&#xA;&gt; commit to a certain BTCUSD rate ahead of time for a purchase. Over time&#xA;&gt; some transactions lose money to FX and others earn money - that evens out&#xA;&gt; in the end. But if there is an _easily accessible in the wallet_ feature to&#xA;&gt; &#34;cancel transaction&#34; that means it will eventually get systematically&#xA;&gt; abused. A risk of X% loss on many payments that&#39;s easy to systematically&#xA;&gt; abuse is more scary than a rare risk of losing 100% of one occasional&#xA;&gt; payment. It&#39;s already possible to execute this form of abuse with opt-in&#xA;&gt; RBF, which may lead to us at some point refusing those payments (even with&#xA;&gt; confirmation) or cumbersome UX to work around it, such as crediting the&#xA;&gt; bitcoin to a custodial account.&#xA;&gt;&#xA;&gt; To compare zeroconf risk with FX risk: I think we&#39;ve had one incident in 8&#xA;&gt; years of operation where a user successfully fooled our server to accept a&#xA;&gt; payment that in the end didn&#39;t confirm. To successfully fool (non-RBF)&#xA;&gt; zeroconf one needs to have access to mining infrastructure and probability&#xA;&gt; of success is the % of hash rate controlled. This is simply due to the fact&#xA;&gt; that the network currently won&#39;t propagage the replacement transaction to&#xA;&gt; the miner, which is what&#39;s being discussed here. American call option risk&#xA;&gt; would however be available to 100% of all users, needs nothing beyond the&#xA;&gt; wallet app, and has no cost to the user - only upside.&#xA;&gt;&#xA;&gt; Bitrefill currently processes 1500-2000 onchain payments every day. For&#xA;&gt; us, a world where bitcoin becomes de facto RBF by default, means that we&#xA;&gt; would likely turn off the BIP21 model for onchain payments, instruct&#xA;&gt; Bitcoin users to use Lightning or deposit onchain BTC to a custodial&#xA;&gt; account that we have.&#xA;&gt; This option is however not available for your typical&#xA;&gt; BTCPayServer/CoinGate/Bitpay/IBEX/OpenNode et al. Would be great to hear&#xA;&gt; from other merchants or payment providers how they see this new behavior&#xA;&gt; and how they would counteract it.&#xA;&gt;&#xA;&gt; Currently Lightning is somewhere around 15% of our total bitcoin payments.&#xA;&gt; This is very much not nothing, and all of us here want Lightning to grow,&#xA;&gt; but I think it warrants a serious discussion on whether we want Lightning&#xA;&gt; adoption to go to 100% by means of disabling on-chain commerce. For me&#xA;&gt; personally it would be an easier discussion to have when Lightning is at&#xA;&gt; 80%+ of all bitcoin transactions. Currently far too many bitcoin users&#xA;&gt; simply don&#39;t have access to Lightning, and of those that do and hold their&#xA;&gt; own keys Muun is the biggest wallet per our data, not least due to their&#xA;&gt; ease-of-use which is under threat per the OP. It&#39;s hard to assess how many&#xA;&gt; users would switch to Lightning in such a scenario, the communication&#xA;&gt; around it would be hard. My intuition says that the majority of the current&#xA;&gt; 85% of bitcoin users that pay onchain would just not use bitcoin anymore,&#xA;&gt; probably shift to an alt. The benefits of Lightning are many and obvious,&#xA;&gt; we don&#39;t need to limit onchain to make Lightning more appealing. As an&#xA;&gt; anecdote, we did experiment with defaulting to bech32 addresses some years&#xA;&gt; back. The result was that simply users of the wallets that weren&#39;t able to&#xA;&gt; pay to bech32 didn&#39;t complete the purchase, no support ticket or anything,&#xA;&gt; just &#34;it didn&#39;t work 🤷‍♂️&#34; and user moved on. We rolled it back, and later&#xA;&gt; implemented a wallet selector to allow modern wallets to pay to bech32&#xA;&gt; while other wallets can pay to P2SH. This type of thing  is clunky, and&#xA;&gt; requires a certain level of scale to be able to do, we certainly wouldn&#39;t&#xA;&gt; have had the manpower for that when we were starting out. This why I&#39;m&#xA;&gt; cautious about introducing more such clunkiness vectors as they are&#xA;&gt; centralizing factors.&#xA;&gt;&#xA;&gt; I&#39;m well aware of the reason for this policy being suggested and the&#xA;&gt; potential pinning attack vector for LN and other smart contracts, but I&#xA;&gt; think these two risks/costs need to be weighed against eachother first and&#xA;&gt; thoroughly discussed because the costs are non-trivial on both sides.&#xA;&gt;&#xA;&gt; Sidenote: On the efficacy of RBF to &#34;unstuck&#34; stuck transactions&#xA;&gt; After interacting with users during high-fee periods I&#39;ve come to not&#xA;&gt; appreciate RBF as a solution to that issue. Most users (80% or so) simply&#xA;&gt; don&#39;t have access to that functionality, because their wallet doesn&#39;t&#xA;&gt; support it, or they use a custodial (exchange) wallet etc. Of those that&#xA;&gt; have the feature - only the power users understand how RBF works, and&#xA;&gt; explaining how to do RBF to a non-power-user is just too complex, for the&#xA;&gt; same reason why it&#39;s complex for wallets to make sensible non-power-user UI&#xA;&gt; around it. Current equilibrium is that mostly only power users have access&#xA;&gt; to RBF and they know how to handle it, so things are somewhat working. But&#xA;&gt; rolling this out to the broad market is something else and would likely&#xA;&gt; cause more confusion.&#xA;&gt; CPFP is somewhat more viable but also not perfect as it would require lots&#xA;&gt; of edge case code to handle abuse vectors: What if users abuse a generous&#xA;&gt; CPFP policy to unstuck past transactions or consolidate large wallets. Best&#xA;&gt; is for CPFP to be done on the wallet side, not the merchant side, but there&#xA;&gt; too are the same UX issues as with RBF.&#xA;&gt; In the end a risk-based approach to decide on which payments are&#xA;&gt; non-trivial to reverse is the easiest, taking account user experience and&#xA;&gt; such. Remember that in the fiat world card payments have up to 5%&#xA;&gt; chargebacks, whereas we in zero-conf bitcoin land we deal with &#34;fewer than&#xA;&gt; 1 in a million&#34; accepted transactions successfully reversed. These days we&#xA;&gt; have very few support issues related to bitcoin payments. The few that do&#xA;&gt; come in are due to accidental RBF users venting frustration about waiting&#xA;&gt; for their tx to confirm.&#xA;&gt; &#34;In theory, theory and practice are the same. In practice, they are not&#34;&#xA;&gt;&#xA;&gt; All the best,&#xA;&gt; Sergej Kotliar&#xA;&gt; CEO Bitrefill.com&#xA;&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;&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;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20221019/5d40738b/attachment-0001.html&gt;</html></oembed>