@@ -66,9 +66,10 @@ honestly mining is `x` percent of the [best feerate set of
6666transactions] [ csb ] in their mempool.
6767
6868Alternatively, a miner could dishonestly attempt to re-mine the
69- immediately previous block plus a wholly new block to extend the
70- chain. That's fee sniping and their chance of succeeding at it if every
71- other miner is honest is ` (x/(1-x))^2 ` . Even though fee sniping has a
69+ previous block plus a wholly new block to extend the
70+ chain. This behavior is referred to as fee sniping, and the dishonest
71+ miner's chance of succeeding at it if every
72+ other miner is honest is ` (x/(1-x))^2 ` . Even though fee sniping has an
7273overall lower probability of success than honest mining, attempting
7374dishonest mining could be the more profitable choice if transactions in
7475the previous block paid significantly higher feerates than the
@@ -77,7 +78,7 @@ can be worth more than a large chance at a small amount.
7778
7879The problem is actually worse than described above because every miner
7980who chooses to mine dishonestly reduces the number of honest
80- miners trying to extended the chain. The smaller the share of hash
81+ miners trying to extend the chain. The smaller the share of hash
8182rate controlled by honest miners, the greater the probability that a
8283dishonest miner will be successful, so a single large miner
8384rationally choosing to mine dishonestly can set off a cascade of
@@ -86,10 +87,10 @@ If that persists for an extended period of time, confirmation scores
8687cease to be a proxy for transaction finality and Bitcoin becomes
8788unusable until the problem is resolved. We expect the most likely
8889resolution would be centralization of mining---a cartel representing
89- a majority of hashrate agreeing to never reorg each others blocks
90+ a majority of hash rate agreeing to never reorg each others' blocks
9091can restore stability to the system, but that comes with the
91- increased risk that they'll later choose to (or be pressured into)
92- censoring certain transactions.
92+ increased risk that they'll later
93+ censor certain transactions.
9394
9495### Mitigations
9596
@@ -99,7 +100,7 @@ censoring certain transactions.
99100 transactions they know about now and try to put them into the oldest block
100101 they're working to re-mine. All other blocks would be empty, with
101102 miners only creating them to bury their re-mined block under as much
102- proof-of- work as possible.
103+ proof of work as possible.
103104
104105 {:.center}
105106 ![ Illustration of fee sniping without block limits] ( /img/posts/2021-06-sniping-size-limit.png )
@@ -109,7 +110,7 @@ censoring certain transactions.
109110
110111 1 . It tends to prevent any new block at the tip of the chain from
111112 containing all pending transactions, leaving some transactions
112- for the next block. If the amount of transaction fee available
113+ for the next block. If the amount of transaction fee expected
113114 from honestly mining the next block is close to the amount of
114115 transaction fee available from dishonestly re-mining the previous
115116 block, all rational miners will behave honestly.
@@ -119,7 +120,7 @@ censoring certain transactions.
119120 near the tip empty---those blocks will need to contain fee-paying
120121 transactions. Other dishonest miners may attempt themselves to
121122 fee snipe those transactions, reducing the revenue of the initial
122- fee sniping miner and possible discouraging them from fee sniping
123+ fee sniping miner and possibly discouraging them from fee sniping
123124 in the first place.
124125
125126- ** Rearrangement protection (anti fee sniping):** even with a block size
@@ -149,20 +150,14 @@ censoring certain transactions.
149150
150151 This rearrangement protection is commonly called ** anti fee
151152 sniping.** Originally [ implemented] [ bitcoin core #2340 ] in Bitcoin
152- Core, anti fee sniping is also used today by Electrum, Blockstream
153- Green, LND, and C-Lightning.
153+ Core, anti fee sniping is now also used by several other wallets.
154154
155155 All wallets that implement anti fee sniping today use nLockTime
156156 height locks to prevent a transaction from being included in the
157157 re-mined version of a previous block. It's also [ possible] [ belcher
158158 post] to implement the same protection using [ BIP68] [ ] nSequence
159- height locks. This wouldn't be any more effective at preventing fee
160- sniping, but it would provide a good reason for regular wallets to
161- set their nSequence values to the same values that are required for
162- transactions in certain [ multisignature] [ topic multisignature ] -based
163- contract protocols, such as ideas for coinswaps and taproot-enabled
164- LN. This helps make regular wallet transactions look like contract
165- protocol transactions and vice versa.
159+ height locks, which could help make regular wallet transactions look
160+ like contract protocol transactions and vice versa.
166161
167162We're unaware of any developers who think the above mechanisms are a
168163complete solution to the fee sniping problem, but every other mitigation
0 commit comments