<p>Yes it is, that's why &quot;economical pinning&quot; is also an issue. Requiring a high enough fee increase is comparable to preventing you from replacing altogether. And if you actually replace it, this <strong>didn't cost them anything to perform this attack</strong> in the first place.</p>
<p>To give you an example, let's take a <code>200</code>vb transaction with a <code>2_000</code>sats fee (<code>10</code>sats/vb). If an attacker can replace it by a <code>100_000</code>vb version of this transaction that pays a <code>1_000_000</code>sats fee, the cheapest way by the <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-replacements.md#current-replace-by-fee-policy" rel="nofollow noreferrer">current replacement rules</a> to bump the feerate of this transaction is to pay <code>1_000_200</code>sats for the original <code>200</code>vb transaction.<br />
This is a <code>5001</code> factor increase in feerate, and a <code>500.1</code> factor increase in absolute fees to be able to replace the transaction.</p>

CC BY-SA 4.0
2023-04-27T09:09:52.997Z
Doesn't that imply that the attacker also has to spend 500x the original fee?
blues
CC BY-SA 4.0
2023-04-28T10:10:46.457Z
Not if you end up replacing it :) And usually it would be used in order to achieve a larger gain anyways (like stealing an HTLC for instance).
Antoine Poinsot
CC BY-SA 4.0
2023-03-30T09:54:06.807Z
2023-03-30T09:54:06.807Z
Antoine Poinsot
<p>The example given in <a href="https://github.com/glozow/bitcoin/blob/c27864fbca2421eeb64f13a803f7b4393999e1cf/doc/policy/version3_transactions.md?plain=1#L20" rel="nofollow noreferrer">version3_transactions.md</a> shows how to get a fee rate increase of 100x, but if you assume transaction B is 200vB, instead of 1000vB, you can also demonstrate a 500x increase with that example (copied below).</p>
<blockquote>
<h3>&quot;Rule 3&quot; Pinning</h3>
<p>RBF rules require the replacement transaction pay a higher absolute fee than the aggregate fees paid by all original transactions. This means Mallory may increase the fees required to replace B by:</p>
<ol>
<li>Adding transaction(s) that descend from B and pay a feerate too low to fee-bump B through CPFP.</li>
</ol>
<p>For example, assuming the default descendant size limit is 101KvB and B is 1000vB paying a feerate of 2sat/vB, adding a 100KvB, 2sat/vB child increases the cost to replace B by 200Ksat.</p>
<ol start="2">
<li>Adding a high-fee descendant of B that also spends from a large, low-feerate mempool transaction, C. The child may pay a very large fee but not actually be fee-bumping B if its overall ancestor feerate is still lower than B's individual feerate.</li>
</ol>
<p>For example, assuming the default ancestor size limit is 101KvB, B is 1000vB paying 2sat/vB, and C is 99KvB paying 1sat/vB, adding a 1000vB child of B and C increases the cost to replace B by 101Ksat.</p>
</blockquote>

CC BY-SA 4.0
2023-04-07T14:08:24.367Z
2023-04-07T14:08:24.367Z
Richard Myers
<p>In the ephemeral anchors <a href="https://github.com/instagibbs/bips/blob/ephemeral_anchor/bip-ephemeralanchors.mediawiki#motivation" rel="noreferrer">draft BIP</a> (also discussed <a href="https://bitcoin.stackexchange.com/questions/117335/what-is-an-ephemeral-anchor-and-what-problems-do-they-address">here</a>) it states that without V3 transactions an adversary can increase the required fees to replace a transaction as much as 500 times. That sounds <strong>a lot</strong>. What is the exact scenario where there would be a 500 times increase?</p>

<p2p><replace-by-fee><eltoo><package-relay><pinning-attack>
How would an adversary increase the required fee to replace a transaction by up to 500 times?
Michael Folkson
# How would an adversary increase the required fee to replace a transaction by up to 500 times?

(Asked by: username_0 on 2023-03-29)

In the ephemeral anchors [draft BIP](https://github.com/instagibbs/bips/blob/ephemeral_anchor/bip-ephemeralanchors.mediawiki#motivation) (also discussed [here](https://bitcoin.stackexchange.com/questions/117335/what-is-an-ephemeral-anchor-and-what-problems-do-they-address)) it states that without V3 transactions an adversary can increase the required fees to replace a transaction as much as 500 times. That sounds **a lot**. What is the exact scenario where there would be a 500 times increase?

**Tags:** p2p, replace-by-fee, eltoo, package-relay, pinning-attack


---

## 2 answers

### Answer by username_1 on 2023-03-30. Score: 3 | Accepted answer

Yes it is, that's why "economical pinning" is also an issue. Requiring a high enough fee increase is comparable to preventing you from replacing altogether. And if you actually replace it, this **didn't cost them anything to perform this attack** in the first place.

To give you an example, let's take a `200`vb transaction with a `2_000`sats fee (`10`sats/vb). If an attacker can replace it by a `100_000`vb version of this transaction that pays a `1_000_000`sats fee, the cheapest way by the [current replacement rules](https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-replacements.md#current-replace-by-fee-policy) to bump the feerate of this transaction is to pay `1_000_200`sats for the original `200`vb transaction.  
This is a `5001` factor increase in feerate, and a `500.1` factor increase in absolute fees to be able to replace the transaction.

> **Comments:**
> **username_2**: Doesn't that imply that the attacker also has to spend 500x the original fee?  
> **username_1**: Not if you end up replacing it :) And usually it would be used in order to achieve a larger gain anyways (like stealing an HTLC for instance).  

---

### Answer by username_3 on 2023-04-07. Score: 1

The example given in [version3\_transactions.md](https://github.com/glozow/bitcoin/blob/c27864fbca2421eeb64f13a803f7b4393999e1cf/doc/policy/version3_transactions.md?plain=1#L20) shows how to get a fee rate increase of 100x, but if you assume transaction B is 200vB, instead of 1000vB, you can also demonstrate a 500x increase with that example (copied below).

> ### "Rule 3" Pinning
>
> RBF rules require the replacement transaction pay a higher absolute fee than the aggregate fees paid by all original transactions. This means Mallory may increase the fees required to replace B by:
>
> 1. Adding transaction(s) that descend from B and pay a feerate too low to fee-bump B through CPFP.
>
> For example, assuming the default descendant size limit is 101KvB and B is 1000vB paying a feerate of 2sat/vB, adding a 100KvB, 2sat/vB child increases the cost to replace B by 200Ksat.
>
> 2. Adding a high-fee descendant of B that also spends from a large, low-feerate mempool transaction, C. The child may pay a very large fee but not actually be fee-bumping B if its overall ancestor feerate is still lower than B's individual feerate.
>
> For example, assuming the default ancestor size limit is 101KvB, B is 1000vB paying 2sat/vB, and C is 99KvB paying 1sat/vB, adding a 1000vB child of B and C increases the cost to replace B by 101Ksat.


---

