Lately, I've been super interested in BIPs after I posted a question about what percentage is good enough for proposals to improve Bitcoin. I found a bunch of BIPs on GitHub, and one of them that stood out to me is called "Opt-in Full Replace-by-Fee Signaling." So, I had to dig a bit deeper into it.
Replace By Fee, or just RBF, is a way for users to swap out their unconfirmed transactions for new ones, but only if the new ones have a higher fee. At first, I wasn't sure if this was even a thing. I mean, I know transactions can get stuck when the mempool is crowded, leading to delays. I also get that miners usually prefer transactions with higher fees, but I never thought about the whole replacement aspect until now.
I wanted to understand how this actually works, and it turns out there are two types: Opt-in RBF and Full RBF. With Opt-in, you have to flag your transaction before it goes through, but Full RBF doesn’t need that. I also stumbled upon CPFP (Child Pays for Parent), which lets a receiver bump up the fee for an unconfirmed transaction they’re waiting on, but that’s a different topic.
My curiosity got me thinking about how RBF could actually help users doing transactions and miners validating them. Turns out, it has some interesting benefits.
What will miners focus on more LN or RBF?
6 replies 143 views
SwiftMatr1xFull Member
Posts: 59 · Reputation: 474
#2Jun 15, 2020, 08:06 PM
1a. RBF does not benefit miners more. When someone replaces a transaction that is commonly because the feerate at the time is higher than what they paid for the initial transaction and theirs will not be given priority. This means there are other transactions paying higher fee that would have gotten that priority. To miners it does not matter if you use RBF or a proper tx fee when making the initial transaction.
1b. LN is an off chain protocol, so miners cannot respond to it, unless when a channel is opened and closed. I expect they will treat it as every other transaction.
2. Low transaction fees is very relative. Miners do not ignore tx due to low fees, they take the highest ones. Priority fees now is 8 sat/vbyte which is low compared to what we have been experiencing, but it would be prioritized by miners. If that drops to 2 sats/vbyte it will still get priority over those that pay less.
3. Yes.
- Jay -
1. There's no such thing as "benefit more in the future". And LN is off-chain. The only thing on-chain is the creation/closure of the channels.
2. It simply depends on how many tx with higher fees are available to get mined.
3. I expect not. I expect in the future there won't be wild fluctuations in how congested the mempool is and the fee will be - in most of the cases - better estimated from start.
I don't want to be harsh, but this post is driven by confusions, so I'll narrow down some things:
Afaik the miners don't care what is the purpose of a tx (normal transfer, or a consolidation, or a mass payment, or LN channel related, or a RBF, or even those ordinals). All those simply spend some inputs and pay a fee.
All the miners care about is the fee/vBytes of the transaction. The ones with the higher fee will be included in the mined block.
Note: there are some few exceptions, just in case you wonder:
* since not everybody have the same mempool, late transactions may be missed by miners
* in case of a CPFP the overall fee (per vB) for both transactions matters
* a miner/pool can decide to include transactions they want even if they're not the most expensive; they'll lose money with the (unless somebody has paid off-chain for the acceleration, but beware, most tx acceleration services only re-broadcast, which is not tx acceleration)
Bitcoin miners get their income from block subsidy as block reward and transaction fees.
Transaction fees paid to miners for their works to confirm on chain transactions. RBF, CPFP are on chain transactions but Lightning Network transactions are not on chain, they are off chain. Miners don't get bitcoin from off chain transactions through Lightning Network.
They only get fee by on chain transactions to open Lightning Network channels, after that no more fee from off chain LN transactions.
Opening and closing of LN channels require on-chain transactions and thus transaction fees for those has to be paid under normal circumstances. To my knowledge atomic swap-ins and swap-outs to change balance of existing LN channels would be another case that requires on-chain transactions with transaction fees.
What I don't understand is why OP brings up LN in the context of the main topic of opt-in RBF and Full RBF.
Miners don't need to care about RBF, except for Full RBF as long as it has to be enabled. Full RBF is essentially a permitted double spending under certain conditions, only that the older unconfirmed and replaced transactions that pay a lower fee become replaced by the newest transaction paying higher fees.
Question 2 is sort of under the wrong assumption that miners ignore low fee transactions or would ignore them at a higher rate in the future. No, they don't do this and won't in the future. They just prioritize transactions from higher to lower fees as this maximizes their profit per block now and in the future.
Regarding 3, I expect that Full RBF becomes a default and no option anymore. I'm not particularly happy with this as for me opt-in RBF is sufficient. For miners Full RBF is simply a convenient option to allow any transaction to be replaced with one that pays higher fees. Higher fees are potentially in miner's interest.
RBF and particularly Full RBF is more of a problem for those accepting transactions as you have to wait for such transactions to be safely confirmed before sending goods or whatnot a transaction pays for.
paul.stakeHero Member
Posts: 651 · Reputation: 3798
#6Jun 16, 2020, 11:15 AM
There has been a lot of discussion in this topic, regarding Full RBF, if you're interested: https://bitcointalk.org/index.php?topic=5403730.0.
A common misconception is that Full RBF enables all unconfirmed transactions to be double-spent. In reality, all unconfirmed transactions can be double-spent, regardless of Full RBF, RBF or no-RBF. If it was possible to ensure the security of 0-conf against double-spending, there would be no need for a blockchain, and all transactions wouldn't have confirmations. Full RBF simply formalizes what is already evident.
I might have flaws in my understanding of how Bitcoin works, any corrections are welcome! This is how I understand it. (I will have a look at the thread you pointed to...)
Let's ignore RBF at first completely.
If we have an unconfirmed transaction spending UTXO1, then a newer transaction spending this UTXO1 has to be considered invalid by nodes and dropped immediately and not propagated further. Therefore you couldn't update or change your initial transaction for whatever reason once it was broadcasted and in other node's mempool (your transaction might be dropped after an individual expiry period from other mempools, standard is 14d unless the transaction is rebroadcasted by someone).
Opt-in RBF flagged in a transaction:
the transaction has RBF enabled, thus signaling other nodes that have this transaction already in their mempool that an appropriate double spending replacement transaction is permitted and should be accepted if it meets RBF requirements like paying a higher fee than the to be replaced transaction and opt-in flag for permitted RBF.
If the originial transaction didn't have RBF enabled (assuming no Full RBF active) then any replacement transaction should've been dropped as invalid.
Full RBF active/enabled:
no need for RBF flag in the transaction; any new transaction can spend the initial UTXO(s) with a newer transaction paying higher transaction fee, replacing older unconfirmed transactions.
Related topics
- Advice Needed for Networking a Small Farm with 50 S19 Miners 10
- Advice for Setting Up Inherited Miners 6
- Tax scenario for US miners under the new IRS ruling 2
- Quit trading, focus on mining and stacking! 19
- BEWARE ComputeNorth MIGHT STEAL YOUR MINERS ! 1
- Old miners should give nicehash a shot, easy 2000 sats min withdrawal 14