# Bitcoin Wiki Authors - Replace by Fee (Highlights) ![rw-book-cover|256](https://readwise-assets.s3.amazonaws.com/static/images/article3.5c705a01b476.png) ## Highlights - transaction replacement eliminates the cost to all previous transactions being replaced, it created a DoS risk: attackers could produce as many transactions as they wanted, while only paying the fee for the one variant that was eventually mined. - To solve this problem, the concept of replace-by-fee was developed: by requiring replacements to pay for not only its own cost, but also the fee of the transactions being replaced - The "opt-in" variant only allows the replacement when the transactions being replaced have explicitly signalled they allow replacement. This signalling is done via the "sequence" field, and defined by [BIP 125](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki). - Delayed RBF is a variant which allows transactions to be replaced unconditionally, but only after a given number of blocks have been mined since the replaced transactions were first seen by the node. - the replacement transaction must pay all the same outputs as the transactions being replaced.