{"id":12328,"date":"2020-12-07T15:25:50","date_gmt":"2020-12-07T09:55:50","guid":{"rendered":"https:\/\/bitcoinik.com\/?st-import=15ce7819be773a32d810e7ac7394bacb"},"modified":"2020-12-07T15:25:50","modified_gmt":"2020-12-07T09:55:50","slug":"what-is-replace-by-fee-rbf","status":"publish","type":"post","link":"https:\/\/bitcoinik.com\/?p=12328","title":{"rendered":"What is Replace by Fee (RBF)?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Replace by Fee (RBF)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose you have sent 12 Bitcoins to your friend in another country with a transaction fee of 0.00001 BTC. But, hours and days passed but your friend didn\u2019t receive BTC.&nbsp;<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_91 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/bitcoinik.com\/?p=12328\/#Quite_a_scary_thing_right\" >Quite a scary thing right?&nbsp;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/bitcoinik.com\/?p=12328\/#What_will_you_do_in_such_cases\" >What will you do in such cases?&nbsp;<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/bitcoinik.com\/?p=12328\/#What_is_Replace_By_Fee_RBF\" >What is Replace By Fee (RBF)?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/bitcoinik.com\/?p=12328\/#How_long_can_the_transaction_remain_unconfirmed\" >How long can the transaction remain unconfirmed?&nbsp;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/bitcoinik.com\/?p=12328\/#Types_of_RBF\" >Types of RBF<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/bitcoinik.com\/?p=12328\/#How_does_it_work\" >How does it work?&nbsp;<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/bitcoinik.com\/?p=12328\/#Double_Spending\" >Double Spending<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/bitcoinik.com\/?p=12328\/#Risks_involved_in_Replace_by_Fee\" >Risks involved in Replace by Fee<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Quite_a_scary_thing_right\"><\/span>Quite a scary thing right?&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you start researching about what happened, why the transaction didn\u2019t take place, etc etc. In such a case, there are two possibilities.&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Low Transaction Fee<\/strong><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Bitcoin network has a few limitations, the block size should not exceed 2 MB. Each miner earns 6.25 BTC and the transaction fees associated with it for <a href=\"http:\/\/bitcoinik.com\/what-is-cryptocurrency-mining\/\" class=\"rank-math-link\">mining <\/a>a block. In such cases, miners will choose those transactions that have high mining fees. Hence, if the transaction does not have enough mining fees, it is rejected by the miners.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li><strong>Mempool is loaded with transactions<\/strong><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">When a lot of people are willing to buy\/sell or transfer Bitcoin (due to panic or high discount), the mempool is loaded with huge transaction data. A mempool is the node\u2019s holding area of all the unconfirmed transactions. When you first initiate a transaction, it resides in the mempool until a miner chooses it for mining.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the mempool is loaded with transactions, many of them will start betting on high transaction fees. Ultimately, miners will then choose those transactions with higher transaction fees.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_will_you_do_in_such_cases\"><\/span>What will you do in such cases?&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Obviously, you have to increase your transaction fees. This process is called Replace by Fee.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s understand more about what is replace by fee.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_Replace_By_Fee_RBF\"><\/span><strong>What is Replace By Fee (RBF)?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Replace-by-fee is a technique that allows replacing one version of an unconfirmed transaction with another version of a transaction that pays higher transaction fees. RBF was first introduced in BIP125 and its implementation was released in Bitcoin Core 0.12.0.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Various node software uses different RBF rules causing several variations. BIP125 opt-in RBF as implemented in Bitcoin Core 0.12.0 is the most commonly used RBF today. This version of RBF allows the transaction creator to indicate that they\u2019re willing to allow their transaction to be replaced with a higher-paying version.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_long_can_the_transaction_remain_unconfirmed\"><\/span><strong>How long can the transaction remain unconfirmed?&nbsp;<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An unconfirmed transaction can stay as it is forever. It means as long as there are people who are paying higher transaction fees, your unconfirmed transaction can stay as it is and will never be included in a block.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the waiting time exceeds a very long time, the transaction will end up in a block. In such a case, the block space on the main Bitcoin blockchain becomes scarce. Hence, it becomes impossible to include a transaction with a fee of 1 satoshi\/byte. It is possible only when the block subsidy runs out.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Types_of_RBF\"><\/span><strong>Types of RBF<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While you have a brief idea about what is replace-by-fee, it\u2019s time to understand the types of RBF.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Full RBF: <\/strong>Full RBF allows you to replace a transaction only if the mining fee associated with it is sufficient.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Opt-in RBF: <\/strong>Opt-in RBF allows you to flag the transactions as replaceable until they are confirmed in a block. But, there is a problem with this RBF, that is the sender should know well in advance that they may wish to replace the transaction before they broadcast it. Many wallets have chosen Opt-in RBF as their default RBF.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>First-seen safe RBF: <\/strong>In first-seen safe RBF, you can replace a transaction with another having higher fees only if the transaction data in the new one is similar to the older one.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Delayed RBF: <\/strong>The delayed RBF allows you to replace the original transaction after it has not been included in a block for a certain number of blocks. This RBF allows you to give some time to the miners to include their transaction in a block at a lower fee. Hence, it potentially saves your money.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_does_it_work\"><\/span><strong>How does it work?&nbsp;<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A simple concept behind the working of RBF is that you have to pay a small fee to change the fee for the unconfirmed transaction. Suppose you pay 1 satoshi\/byte as your fee, which is the lowest fee for a transaction.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/freedomnode.com\/content\/images\/old\/9e05ea96a62fb825fdb43570eb8c460f9c81f58aea65cc7ee5ace28581a1e055.jpg\" alt=\"Turn on Replace by Fee\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you pass on your transaction to the Bitcoin blockchain and wait for it to be successful. But even after hours and days, the transaction doesn\u2019t be successful and you do not have a single confirmation of the transaction.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/freedomnode.com\/content\/images\/old\/84e67e4357cec09a401c58c63ddd85c7d0ff63df72eabab8fa014f9632b7434e.jpg\" alt=\"Make the transaction replaceable\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u00a0\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You are running short of time, so you broadcast another transaction. This new transaction is similar to the previous one, but it includes higher fees. When miners select this transaction, they will receive higher fees. Now, your transaction is more competitive in the market for block space. Wallets like Electrum and Blockstream Green allows an easy way to use RBF.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Double_Spending\"><\/span><strong>Double Spending<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Double spending is a risk when you spend the same Bitcoin twice. It occurs when you send Bitcoins to many people using the same unspent transaction outputs. When you can replace a transaction, then you can change the recipient too. Double spending is quite difficult with replace-by-fee. It is because of the following reasons:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The whole concept of RBF is to include a transaction in a block and confirm it. If the recipient is changed, then the original receiver will know about the alteration. After confirming the transaction, they can see that they are no longer the recipient of that transaction.&nbsp;<\/li><li>There are a few arguments that double-spending is possible with RBF. It is because there is an assumption that the recipients will send you the products without any confirmation. If the assumption was true, you need not replace by fee at the initial stage itself.&nbsp;<\/li><li>Most of the versions of RBF require that the transaction should pay the same outputs as the original transaction.&nbsp;<\/li><li>Hence, you don\u2019t need RBF to double spend. You can simply create multiple transactions using the same inputs. Then you can assign the transaction that sends the bitcoins to yourself with the highest fee.&nbsp;<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Risks_involved_in_Replace_by_Fee\"><\/span><strong>Risks involved in Replace by F<\/strong>ee<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While RBF has its own specialties, it is also associated with some risk. Suppose you want to purchase some goods from your friend, so you send 1 BTC with 0.0001 BTC as transaction fees.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After some time you change your mind and you want your money back. As the transaction is still unconfirmed, you decide to replace the original transaction with a new transaction having higher fees and that returns your funds back to your wallet.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Meanwhile, your friend has already shipped the items to your address. In this case, you will get your items but your fried will not receive funds to complete the transaction.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hence, if you have any transaction which is stuck, you can make it process faster by replacing it with a transaction that has a higher fee.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Replace by Fee (RBF) Suppose you have sent 12 Bitcoins to your friend in another country with a transaction fee of 0.00001 BTC. But, hours and days passed but your friend didn\u2019t receive BTC.&nbsp; Quite a scary thing right?&nbsp; Now, you start researching about what happened, why the transaction didn\u2019t take place, etc etc. In [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":12337,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17,19],"tags":[],"class_list":["post-12328","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain","category-crypto-education"],"acf":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/bitcoinik.com\/index.php?rest_route=\/wp\/v2\/posts\/12328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitcoinik.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitcoinik.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitcoinik.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bitcoinik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12328"}],"version-history":[{"count":0,"href":"https:\/\/bitcoinik.com\/index.php?rest_route=\/wp\/v2\/posts\/12328\/revisions"}],"wp:attachment":[{"href":"https:\/\/bitcoinik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitcoinik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitcoinik.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}