Replace-by-fee (RBF), explained

What is a Replacement of Fees (RBF) Policy?

The Bitcoin network’s fee replacement (RBF) policy enables users to replace pending (unconfirmed) transactions with new ones with higher transaction costs.

The RBF policy was proposed in BIP 125 and introduced as a feature in the Bitcoin protocol with the release of Bitcoin Core 0.12.0 in February 2016. This feature provides flexibility for users who wish to expedite transactions or modifications. Fees are targeted against network restrictions.

On November 23, 2023, a Bitcoin user conducted a transaction at 9:59 AM UTC, paying extremely high transaction fees of $3.1 million and transferring 139.42 Bitcoins (BTC). The hefty fee is the eighth-highest in Bitcoin history.From the perspective of users overpaid 119,980 times the typical transaction fee. There are several factors at play here:

High transaction fee options

The sender may have intentionally chosen a higher transaction fee to try to get faster confirmations, or because they misjudged the fee.

RBF policy

Under the fee substitution policy, users can replace unconfirmed transactions with higher fee transactions. This means that in order to ensure faster confirmations, the sender may choose to replace the costly initial transaction with a new transaction with a higher fee.

The sender is unaware

The sender may not be paying close attention to the Internet or may not be fully aware of the consequences of his actions. They may not have anticipated the significant increase in transaction fees caused by RBF.

Which blockchain networks support RBF?

The RBF feature comes in handy when Bitcoin users want to speed up transaction confirmations or modify costs based on changing network conditions.

Replace-by-fee is a trading strategy embedded in the Bitcoin network protocol and supported by Bitcoin Core, the protocol’s reference implementation. As mentioned earlier, due to the RBF policy, users can exchange unconfirmed Bitcoin transactions for new transactions with higher transaction fees.

It is important to remember that different wallets and services in the Bitcoin ecosystem may accept RBF in different ways. For example, while Bitcoin Core supports RBF, not all wallets can adopt or provide this feature. To ensure that their wallet or service is compatible with the fee replacement policy, users should confirm the platform’s specific features and guidelines.

Other RBF rules include that the new transaction must maintain the same outputs as the previous transaction and have each input have a higher sequence number to use RBF. Additionally, RBF only applies to transactions that have not yet been confirmed; once a transaction is approved, it cannot be reversed. However, since not all nodes and miners support or recognize RBF transactions, their effectiveness depends on network conditions and miners’ willingness to prioritize transactions with higher fees.

Additionally, specific wallets, such as Trezor, allow Users are charged “additional fees” for pending, unconfirmed transactions. In addition, Crypto.com users can send Ethereum (ETH) or other ERC-20 tokens using advanced transaction settings, allowing customizable nonces, gas prices, or gas limits. This feature is available in-app version 1.8.2 and above, allowing advanced users to customize trading parameters.

The send confirmation screen allows users to navigate to advanced settings, adjust values, view estimated network charges and proceed with the transaction. The process includes confirming custom settings and authorizing the transaction using a password and 2FA code (if enabled).

Customize gas prices for ERC-20 transactions on crypto.com

How does a fee-in-lieu policy work?

Bitcoin users can speed up transaction confirmation by creating a new transaction with a higher fee, represented by a unique “sequence number” that may be prioritized by miners when broadcast, replacing the original transaction.

Network status, miner rules, and the level of support from participating nodes and wallets will all affect the effectiveness of the RBF policy. The following explains the operation principle of RBF in detail:

Initial transaction confirmation

Bitcoin transactions are initiated by users and shared with the network. The transaction sits in the mempool and is waiting for miners to include it in a block.

Transaction fee adjustment

If a user wants to speed up the confirmation process or finds the fee is too low, they can initiate a new transaction with a higher fee.

fee alternative flag

The new transaction contains a unique “sequence number” in the transaction input, indicating that it is intended to replace the previous transaction. This sequence number is higher than the sequence number of the original transaction.

In the context of Bitcoin, the nSequence field was originally designed for “sequence-based replacement” or “time locking” and has two main purposes. First, for a transaction to qualify for fee substitution, it must indicate its fungibility when first sent. This is accomplished by setting the nSequence field (an element in each transaction) to a value lower than 0xffffffe.

In hexadecimal notation, 0xffffffe represents a 32-bit unsigned integer with all bits set to 1 except the least significant bit. In decimal form, this value is equivalent to 4294967294. Second, the nSequence field enables relative locking of transaction inputs, allowing transactions to be updated after broadcast, providing adjustment flexibility and facilitating RBF.

Broadcast replacement transactions for consideration by miners

The user broadcasts the replacement transaction to the Bitcoin network. Miners who select a transaction for block inclusion may see alternative transactions with higher fees. They may decide to include replacement transactions in a block because they are incentivized to include higher-fee transactions.

Transaction confirmation

If a replacement transaction is included in the block, the original transaction will be replaced. Replacement transactions will not be verified and are essentially “popped” from the memory pool.

How to enable and disable RBF?

To enable RBF in a Bitcoin wallet, users should verify support, access settings, enable RBF options and adjust fees, while deactivating RBF involves access settings, disabling RBF options and ensuring it is not activated by default.

Enable radial basis functions

Before turning on this feature, users must ensure that the wallet they choose supports RBF. Wallet settings can usually be accessed in the Advanced or Trading Preferences section.

The user should search for the setting for the RBF option (usually “Replace-by-Fee” or similar terminology) and enable this option. If there is a problem with a confirmed transaction, users can broadcast the transaction to the network and change the transaction fee.

Trezor Suite version 21.2.2 provides device-side support for Trezor Model T (firmware 2.3.5 and above) and Trezor Model One (firmware 1.9.4 and above). Users can use RBF to complete transactions or increase fees.

RBF is enabled by default in Trezor Suite

Output reduced RBF in Trezor

RBF uses output reduction to deduct the additional fee from the transfer amount rather than from the account balance when transferring the maximum amount of Bitcoin from a single account.

RBF using Trezor device in Electrum

Users can use RBF with Trezor devices in Electrum to replace the original transaction. However, this substitution is only possible if the initial transaction is feasible. executed Using Electrum with the Replace by Cost option enabled, it can be accessed via Tools > Preferences > Replace by Cost.

Disable RBF

On the other hand, users need to access wallet settings to disable RBF. It should be possible to disable RBF via advanced options or trading preferences. The title of this option might be “Replace-by-Fee” or something similar.

To ensure that any new transactions in the wallet do not have this feature enabled by default, users must deselect the enabled option. You should refer to the documentation or support resources of the wallet you are considering for the most up-to-date and accurate information on enabling or disabling RBF.

Disadvantages of cost-in-lieu policies

Bitcoin’s RBF policy allows fees to be adjusted after a transaction, but has raised concerns about double-spending, user confusion, and network congestion.

RBF raises concerns about possible double spending, as users can replace unconfirmed transactions with new ones with higher fees. This risk makes it difficult for merchants or transaction recipients to determine which transactions are legitimate, which can lead to fraud and misunderstandings.

RBF can complicate the user experience because someone unaware of its operation may inadvertently substitute transactions or experience delays. Additionally, this feature reduces transaction reliability and predictability, making it more difficult for businesses to accurately predict confirmation time frames.

The efficiency of the overall network may also be affected by users frequently replacing transactions with large fees, which may also lead to congestion. Additionally, RBF is susceptible to abuse, which would allow bad actors to exploit the system for financial gain, underscoring the need for careful use and user education.

Svlook

Leave a Reply

Your email address will not be published. Required fields are marked *