summaryrefslogtreecommitdiff
path: root/ef/fba318d11c1482f4e46c8ac268efd93d01a4b2
blob: a4e80a54fa6fb41403c5e51012a6e446eb543998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
Return-Path: <nathan@z.cash>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 90953AB8
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 29 Sep 2017 02:09:17 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com
	[209.85.218.51])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C8B3BD3
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 29 Sep 2017 02:09:14 +0000 (UTC)
Received: by mail-oi0-f51.google.com with SMTP id i128so5342095oih.6
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Thu, 28 Sep 2017 19:09:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=z.cash; s=google;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to; 
	bh=R4dd59OAohBHcJnQuUBCZnbljMuLv3MWclKV0VE8grQ=;
	b=SfDdntYOUnWSoLfrI25WW8F6rvYek2SUGDN7t/7Iwwnzb+3QU3rb+1HQ4TJYNLGfP4
	rlBMH7Kpi04QaNma2vPDnahqS7I1RwRd69St31HsWk1hl2wGcZkBaGlVhobPTTHjOIH7
	aOX15fB69JJQG5TGrZmJ/x7LH+VDK5OivmQd8Ry7KEa64UHdZ0ZiL2i5LehebW6tZO5L
	RZx3B0ZNywFW6gAN9TwNxiTLABXJDeiLyMA//tqaTSqyqBinTobPd9p95z+GlUM7TBbV
	ryJhQrGkSZAzR9XzHXxDbzdJOxzO6tuDH+/S+pjIkIOMDvYy2TpgRSbo9DeEQckSo8al
	ENzQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to;
	bh=R4dd59OAohBHcJnQuUBCZnbljMuLv3MWclKV0VE8grQ=;
	b=dBZzCNiqvVfo3hlg6stSOq6To01gZ6+g1Vgn9CsXtuuOr8e7k1wOde7mqWGBZGvNXN
	8owogFhkCdr4oDuS6wV4yTzxf0+ZgmUNeDsdGeVTijnCwXihPvanTp/h9QUIbfUvM+Wa
	6Ak9aGdLfLdiRsUjuiiq49msczBJvvLjzNwL8bPgvhQStSMBrcXKIGM9EF2kXWE0iiDj
	9Q+4OVJY1HPFT3HWEdmGzaBnSgQBUKqrID/DUAIyEQ/oiKhf00S3A/xlHy/cXboYROXw
	/xKgs9Reb2JprxVkoLNzdTK55l4bIBKA7pmGpTU7LMIP2hup4QOkPCUkttvlbSPAU37p
	yIwA==
X-Gm-Message-State: AHPjjUi4lcChMgnyzTOzwLc+0ebhzyuB0qQSLo0p/qyZ45is1Hfy73rO
	RmWpSjZ4JsHi0EC/lUKRdsJ+YYJ4SjJNbXJn81beMYMh
X-Google-Smtp-Source: AOwi7QBec3a2fAYhiJfHWIBVTMd2R0dVPz5A6Y2YAOzvOFO6tfOtZQxF+K517qi9V6qUltKD7uvYAyxDCwWhmL4WvsE=
X-Received: by 10.157.16.74 with SMTP id o10mr1871597oto.144.1506650954003;
	Thu, 28 Sep 2017 19:09:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.48.133 with HTTP; Thu, 28 Sep 2017 19:09:13 -0700 (PDT)
In-Reply-To: <DC1B3730-756E-4A9B-BE6E-481B78E4104D@mattcorallo.com>
References: <359FFE85-86AF-4FBD-9491-3528382E5002@friedenbach.org>
	<DC1B3730-756E-4A9B-BE6E-481B78E4104D@mattcorallo.com>
From: Nathan Wilcox <nathan@z.cash>
Date: Fri, 29 Sep 2017 11:09:13 +0900
Message-ID: <CAK8perD6VNqbwcgw9bQA=+VdEnS8fWg0nE16PQbvPAvRCn81Bg@mail.gmail.com>
To: Matt Corallo <lf-lists@mattcorallo.com>, 
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="001a1141be9eea0b81055a4a825e"
X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
	DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM
	autolearn=disabled version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Mailman-Approved-At: Fri, 29 Sep 2017 03:03:47 +0000
Subject: Re: [bitcoin-dev] Rebatable fees & incentive-safe fee markets
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Sep 2017 02:09:17 -0000

--001a1141be9eea0b81055a4a825e
Content-Type: text/plain; charset="UTF-8"

Happy to see Mark Friedenbach's strawman implementation. Two clarifying
verifications:

This implementation would allow old-style implicit fees which would have
the same behavior (Pay-Your-Bid). Correct?

In terms of space costs, rebateable fee txns (or CPFP chains, I'm less
clear on that complication) add one UTXO 'internally' and new consensus
rules require one UTXO in the coinbase for the rebate, correct?


As for the paper itself: it doesn't account for high-latency/low-fee usage,
correct? What if I want a transaction to complete anytime in the next N
days for as cheap as given some probability of success?

This has two parts: a. Is there a clear/clean game-theoretic-compatible UX
for users? b. would the implementation be simple enough? If either a is
'no' or b is 'complicated', then the trade-off might not be much better
than the status quo.

Maybe for a high enough latency, the answer to a is 'yes' and b. is
'simple' by this strawman: try a tiny fee, if that doesn't work, try a new
higher fee and repeat. Is that good enough?

regards.
Nathan


On Fri, Sep 29, 2017 at 10:53 AM, Matt Corallo via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> I'm somewhat curious what the authors envisioned the real-world
> implications of this model to be. While blindly asking users to enter what
> they're willing to pay always works in theory, I'd imagine in such a world
> the fee selection UX would be similar to what it is today - users are
> provided a list of options with feerates and expected confirmation times
> from which to select. Indeed, in a world where users pay a lower fee if
> they paid more than necessary fee estimation could be more willing to
> overshoot and the UX around RBF and CPFP could be simplified greatly, but
> I'm not actually convinced that it would result in higher overall mining
> revenue.
>
> The UX issues with RBF and CPFP, not to mention the UX issues involved in
> optimizing for quick confirmation are, indeed, quite significant, but I
> believe them to be solveable with rather striaght-forward changes. Making
> the market more useable (for higher or lower overall miner revenue) may be
> a sufficient goal, however, to want to consider something like this.
>
>
> On September 28, 2017 9:06:29 PM EDT, Mark Friedenbach via bitcoin-dev <
> bitcoin-dev@lists.linuxfoundation.org> wrote:
>>
>> This article by Ron Lavi, Or Sattath, and Aviv Zohar was forwarded to
>> me and is of interest to this group:
>>
>>     "Redesigning Bitcoin's fee market"
>>     https://arxiv.org/abs/1709.08881
>>
>> I'll briefly summarize before providing some commentary of my own,
>> including transformation of the proposed mechanism into a relatively
>> simple soft-fork.  The article points out that bitcoin's auction
>> model for transaction fees / inclusion in a block is broken in the
>> sense that it does not achieve maximum clearing price* and to prevent
>> strategic bidding behavior.
>>
>> (* Maximum clearing price meaning highest fee the user is willing to
>>    pay for the amount of time they had to wait.  In other words, miner
>>    income.  While this is a common requirement of academic work on
>>    auction protocols, it's not obvious that it provides intrinsic
>>    benefit to bitcoin for miners to extract from users the maximum
>>    amount of fee the market is willing to support.  However strategic
>>    bidding behavior (e.g. RBF and CPFP) does have real network and
>>    usability costs, which a more "correct" auction model would reduce
>>    in some use cases.)
>>
>> Bitcoin is a "pay your bid" auction, where the user makes strategic
>> calculations to determine what bid (=fee) is likely to get accepted
>> within the window of time in which they want confirmation.  This bid
>> can then be adjusted through some combination of RBF or CPFP.
>>
>> The authors suggest moving to a "pay lowest winning bid" model where
>> all transactions pay only the smallest fee rate paid by any
>> transaction in the block, for which the winning strategy is to bid the
>> maximum amount you are willing to pay to get the transaction
>> confirmed:
>>
>>  Users can then simply set their bids truthfully to exactly the
>>>  amount they are willing to pay to transact, and do not need to
>>>  utilize fee estimate mechanisms, do not resort to bid shading and do
>>>  not need to adjust transaction fees (via replace-by-fee mechanisms)
>>>  if the mempool grows.
>>>
>>
>>
>> Unlike other proposed fixes to the fee model, this is not trivially
>> broken by paying the miner out of band.  If you pay out of band fee
>> instead of regular fee, then your transaction cannot be included with
>> other regular fee paying transactions without the miner giving up all
>> regular fee income.  Any transaction paying less fee in-band than the
>> otherwise minimum fee rate needs to also provide ~1Mvbyte * fee rate
>> difference fee to make up for that lost income.  So out of band fee is
>> only realistically considered when it pays on top of a regular feerate
>> paying transaction that would have been included in the block anyway.
>> And what would be the point of that?
>>
>>
>> As an original contribution, I would like to note that something
>> strongly resembling this proposal could be soft-forked in very easily.
>> The shortest explanation is:
>>
>>     For scriptPubKey outputs of the form "<max-42-byte-push>", where
>>     the pushed data evaluates as true, a consensus rule is added that
>>     the coinbase must pay any fee in excess of the minimum fee rate
>>     for the block to the push value, which is a scriptPubKey.
>>
>> Beyond fixing the perceived problems of bitcoin's fee auction model
>> leading to costly strategic behavior (whether that is a problem is a
>> topic open to debate!), this would have the additional benefits of:
>>
>>     1. Allowing pre-signed transactions, of payment channel close-out
>>        for example, to provide sufficient fee for confirmation without
>>        knowledge of future rates or overpaying or trusting a wallet to
>>        be online to provide CPFP fee updates.
>>
>>     2. Allowing explicit fees in multi-party transaction creation
>>        protocols where final transaction sizes are not known prior to
>>        signing by one or more of the parties, while again not
>>        overpaying or trusting on CPFP, etc.
>>
>>     3. Allowing applications with expensive network access to pay
>>        reasonable fees for quick confirmation, without overpaying or
>>        querying a trusted fee estimator.  Blockstream Satellite helps
>>        here, but rebateable fees provides an alternative option when
>>        full block feeds are not available for whatever reason.
>>
>> Using a fee rebate would carry a marginal cost of 70-100 vbytes per
>> instance.  This makes it a rather expensive feature, and therefore in
>> my own estimation not something that is likely to be used by most
>> transactions today.  However the cost is less than CPFP, and so I
>> expect that it would be a heavily used feature in things like payment
>> channel refund and uncooperative close-out transactions.
>>
>>
>> Here is a more worked out proposal, suitable for critiquing:
>>
>> 1. A transaction is allowed to specify an _Implicit Fee_, as usual, as
>>    well as one or more explicit _Rebateable Fees_.  A rebateable fee
>>    is an ouput with a scriptPubKey that consists of a single, minimal,
>>    nonzero push of up to 42 bytes.  Note that this is an always-true
>>    script that requires no signature to spend.
>>
>> 2. The _Fee Rate_ of a transaction is a fractional number equal to the
>>    combined implicit and rebateable fee divided by the size/weight of
>>    the transaction.
>>
>>    (A nontrivial complication of this, which I will punt on for the
>>     moment, is how to group transactions for fee rate calculation such
>>     that CPFP doesn't bring down the minimum fee rate of the block,
>>     but to do so with rules that are both simple, because this is
>>     consensus code; and fair, so as to prevent unintended use of a
>>     rebate fee by children or siblings.)
>>
>> 3. The smallest fee rate of any non-coinbase transaction (or
>>    transaction group) is the _Marginal Fee Rate_ for the block and is
>>    included in the witness for the block.
>>
>> 4. The verifier checks that each transaction or transaction grouping
>>    provides a fee greater than or equal to the threshold fee rate, and
>>    at least one is exactly equal to the marginal rate (which proves
>>    the marginal rate is the minimum for the block).
>>
>> This establishes the marginal fee rate, which alternatively expressed
>> is epsilon less than the fee rate that would have been required to get
>> into the block, assuming there was sufficient space.
>>
>> 5. A per-block _Dust Threshold_ is calculated using the marginal fee
>>    rate and reasonable assumptions about transaction size.
>>
>> 6. For each transaction (or transaction group), the _Required Fee_ is
>>    calculated to be the marginal fee rate times the size/weight of the
>>    transaction.  Implicit fee is applied towards this required fee and
>>    added to the _Miner's Fee Tally_.  Any excess implicit fee
>>    remaining is added to the _Implicit Fee Tally_.
>>
>> 7. For each transaction (group), the rebateable fees contribute
>>    proportionally towards towards meeting the remaining marginal fee
>>    requirement, if the implicit fee failed to do so.  Of what's left,
>>    one of two things can happen based on how much is remaining:
>>
>>      A. If greater than or equal to the dust threshold is remaining in
>>         a specific rebateable fee, a requirement is added that an
>>         output be provided in the coinbase paying the remaining fee to
>>         a scriptPubKey equal to the push value (see #1 above).
>>
>>         (With due consideration for what happens if a script is reused
>>          in multiple explicit fees, of course.)
>>
>>      B. Otherwise, add remaining dust to the implicit fee tally.
>>
>> 8. For the very last transaction in the block, the miner builds a
>>    transaction claiming ALL of these explicit fees, and with a single
>>    zero-valued null/data output, thereby forwarding the fees on to the
>>    coinbase, as far as old clients are concerned.  This is only
>>    concerns consensus in that this final transaction does not change
>>    any of the previously mentioned tallies.
>>
>>    (Aside: the zero-valued output is merely required because all
>>     transactions must have at least one output. It does however make a
>>     great location to put commitments for extensions to the block
>>     header, as being on the right-most path of the Merkle tree can
>>     mean shorter proofs.)
>>
>> 9. The miner is allowed to claim subsidy + the miner's fee tally + the
>>    explicit fee tally for themselves in the coinbase.  The coinbase is
>>    also required to contain all rebated fees above the dust threshold.
>>
>> In summary, all transactions have the same actual fee rate equal to
>> the minimum fee rate that went into the creation of the block, which
>> is basically the marginal fee rate for transaction inclusion.
>>
>> A variant of this proposal is that instead of giving the implicit fee
>> tally to the miner (the excess non-rebateable fees beyond the required
>> minimum), it is carried forward from block to block in the final
>> transaction and the miner is allowed to claim some average of past
>> fees, thereby smoothing out fees or providing some other incentive.
>>
>>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
>

--001a1141be9eea0b81055a4a825e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div>Happy to see Mark Friedenbach&#39;s st=
rawman implementation. Two clarifying verifications:<br><br>This implementa=
tion would allow old-style implicit fees which would have the same behavior=
 (Pay-Your-Bid). Correct?<br><br>In terms of space costs, rebateable fee tx=
ns (or CPFP chains, I&#39;m less clear on that complication) add one UTXO &=
#39;internally&#39; and new consensus rules require one UTXO in the coinbas=
e for the rebate, correct?<br><br></div><div><br>As for the paper itself: i=
t doesn&#39;t account for high-latency/low-fee usage, correct? What if I wa=
nt a transaction to complete anytime in the next N days for as cheap as giv=
en some probability of success?<br><br></div>This has two parts: a. Is ther=
e a clear/clean game-theoretic-compatible UX for users? b. would the implem=
entation be simple enough? If either a is &#39;no&#39; or b is &#39;complic=
ated&#39;, then the trade-off might not be much better than the status quo.=
<br></div><br>Maybe for a high enough latency, the answer to a is &#39;yes&=
#39; and b. is &#39;simple&#39; by this strawman: try a tiny fee, if that d=
oesn&#39;t work, try a new higher fee and repeat. Is that good enough?<br><=
br></div>regards.<br></div>Nathan<br><br></div><div class=3D"gmail_extra"><=
br><div class=3D"gmail_quote">On Fri, Sep 29, 2017 at 10:53 AM, Matt Corall=
o via bitcoin-dev <span dir=3D"ltr">&lt;<a href=3D"mailto:bitcoin-dev@lists=
.linuxfoundation.org" target=3D"_blank">bitcoin-dev@lists.linuxfoundation.o=
rg</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I&#39;m som=
ewhat curious what the authors envisioned the real-world implications of th=
is model to be. While blindly asking users to enter what they&#39;re willin=
g to pay always works in theory, I&#39;d imagine in such a world the fee se=
lection UX would be similar to what it is today - users are provided a list=
 of options with feerates and expected confirmation times from which to sel=
ect. Indeed, in a world where users pay a lower fee if they paid more than =
necessary fee estimation could be more willing to overshoot and the UX arou=
nd RBF and CPFP could be simplified greatly, but I&#39;m not actually convi=
nced that it would result in higher overall mining revenue.<br>
<br>
The UX issues with RBF and CPFP, not to mention the UX issues involved in o=
ptimizing for quick confirmation are, indeed, quite significant, but I beli=
eve them to be solveable with rather striaght-forward changes. Making the m=
arket more useable (for higher or lower overall miner revenue) may be a suf=
ficient goal, however, to want to consider something like this.<div><div cl=
ass=3D"h5"><br><br><div class=3D"gmail_quote">On September 28, 2017 9:06:29=
 PM EDT, Mark Friedenbach via bitcoin-dev &lt;<a href=3D"mailto:bitcoin-dev=
@lists.linuxfoundation.org" target=3D"_blank">bitcoin-dev@lists.<wbr>linuxf=
oundation.org</a>&gt; wrote:<blockquote class=3D"gmail_quote" style=3D"marg=
in:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1e=
x">
<pre class=3D"m_-5237486386035183600k9mail">This article by Ron Lavi, Or Sa=
ttath, and Aviv Zohar was forwarded to<br>me and is of interest to this gro=
up:<br><br>    &quot;Redesigning Bitcoin&#39;s fee market&quot;<br>    <a h=
ref=3D"https://arxiv.org/abs/1709.08881" target=3D"_blank">https://arxiv.or=
g/abs/1709.<wbr>08881</a><br><br>I&#39;ll briefly summarize before providin=
g some commentary of my own,<br>including transformation of the proposed me=
chanism into a relatively<br>simple soft-fork.  The article points out that=
 bitcoin&#39;s auction<br>model for transaction fees / inclusion in a block=
 is broken in the<br>sense that it does not achieve maximum clearing price*=
 and to prevent<br>strategic bidding behavior.<br><br>(* Maximum clearing p=
rice meaning highest fee the user is willing to<br>   pay for the amount of=
 time they had to wait.  In other words, miner<br>   income.  While this is=
 a common requirement of academic work on<br>   auction protocols, it&#39;s=
 not obvious that it provides intrinsic<br>   benefit to bitcoin for miners=
 to extract from users the maximum<br>   amount of fee the market is willin=
g to support.  However strategic<br>   bidding behavior (e.g. RBF and CPFP)=
 does have real network and<br>   usability costs, which a more &quot;corre=
ct&quot; auction model would reduce<br>   in some use cases.)<br><br>Bitcoi=
n is a &quot;pay your bid&quot; auction, where the user makes strategic<br>=
calculations to determine what bid (=3Dfee) is likely to get accepted<br>wi=
thin the window of time in which they want confirmation.  This bid<br>can t=
hen be adjusted through some combination of RBF or CPFP.<br><br>The authors=
 suggest moving to a &quot;pay lowest winning bid&quot; model where<br>all =
transactions pay only the smallest fee rate paid by any<br>transaction in t=
he block, for which the winning strategy is to bid the<br>maximum amount yo=
u are willing to pay to get the transaction<br>confirmed:<br><br><blockquot=
e class=3D"gmail_quote" style=3D"margin:0pt 0pt 1ex 0.8ex;border-left:1px s=
olid #729fcf;padding-left:1ex"> Users can then simply set their bids truthf=
ully to exactly the<br> amount they are willing to pay to transact, and do =
not need to<br> utilize fee estimate mechanisms, do not resort to bid shadi=
ng and do<br> not need to adjust transaction fees (via replace-by-fee mecha=
nisms)<br> if the mempool grows.<br></blockquote><br><br>Unlike other propo=
sed fixes to the fee model, this is not trivially<br>broken by paying the m=
iner out of band.  If you pay out of band fee<br>instead of regular fee, th=
en your transaction cannot be included with<br>other regular fee paying tra=
nsactions without the miner giving up all<br>regular fee income.  Any trans=
action paying less fee in-band than the<br>otherwise minimum fee rate needs=
 to also provide ~1Mvbyte * fee rate<br>difference fee to make up for that =
lost income.  So out of band fee is<br>only realistically considered when i=
t pays on top of a regular feerate<br>paying transaction that would have be=
en included in the block anyway.<br>And what would be the point of that?<br=
><br><br>As an original contribution, I would like to note that something<b=
r>strongly resembling this proposal could be soft-forked in very easily.<br=
>The shortest explanation is:<br><br>    For scriptPubKey outputs of the fo=
rm &quot;&lt;max-42-byte-push&gt;&quot;, where<br>    the pushed data evalu=
ates as true, a consensus rule is added that<br>    the coinbase must pay a=
ny fee in excess of the minimum fee rate<br>    for the block to the push v=
alue, which is a scriptPubKey.<br><br>Beyond fixing the perceived problems =
of bitcoin&#39;s fee auction model<br>leading to costly strategic behavior =
(whether that is a problem is a<br>topic open to debate!), this would have =
the additional benefits of:<br><br>    1. Allowing pre-signed transactions,=
 of payment channel close-out<br>       for example, to provide sufficient =
fee for confirmation without<br>       knowledge of future rates or overpay=
ing or trusting a wallet to<br>       be online to provide CPFP fee updates=
.<br><br>    2. Allowing explicit fees in multi-party transaction creation<=
br>       protocols where final transaction sizes are not known prior to<br=
>       signing by one or more of the parties, while again not<br>       ov=
erpaying or trusting on CPFP, etc.<br><br>    3. Allowing applications with=
 expensive network access to pay<br>       reasonable fees for quick confir=
mation, without overpaying or<br>       querying a trusted fee estimator.  =
Blockstream Satellite helps<br>       here, but rebateable fees provides an=
 alternative option when<br>       full block feeds are not available for w=
hatever reason.<br><br>Using a fee rebate would carry a marginal cost of 70=
-100 vbytes per<br>instance.  This makes it a rather expensive feature, and=
 therefore in<br>my own estimation not something that is likely to be used =
by most<br>transactions today.  However the cost is less than CPFP, and so =
I<br>expect that it would be a heavily used feature in things like payment<=
br>channel refund and uncooperative close-out transactions.<br><br><br>Here=
 is a more worked out proposal, suitable for critiquing:<br><br>1. A transa=
ction is allowed to specify an _Implicit Fee_, as usual, as<br>   well as o=
ne or more explicit _Rebateable Fees_.  A rebateable fee<br>   is an ouput =
with a scriptPubKey that consists of a single, minimal,<br>   nonzero push =
of up to 42 bytes.  Note that this is an always-true<br>   script that requ=
ires no signature to spend.<br><br>2. The _Fee Rate_ of a transaction is a =
fractional number equal to the<br>   combined implicit and rebateable fee d=
ivided by the size/weight of<br>   the transaction.<br><br>   (A nontrivial=
 complication of this, which I will punt on for the<br>    moment, is how t=
o group transactions for fee rate calculation such<br>    that CPFP doesn&#=
39;t bring down the minimum fee rate of the block,<br>    but to do so with=
 rules that are both simple, because this is<br>    consensus code; and fai=
r, so as to prevent unintended use of a<br>    rebate fee by children or si=
blings.)<br><br>3. The smallest fee rate of any non-coinbase transaction (o=
r<br>   transaction group) is the _Marginal Fee Rate_ for the block and is<=
br>   included in the witness for the block.<br><br>4. The verifier checks =
that each transaction or transaction grouping<br>   provides a fee greater =
than or equal to the threshold fee rate, and<br>   at least one is exactly =
equal to the marginal rate (which proves<br>   the marginal rate is the min=
imum for the block).<br><br>This establishes the marginal fee rate, which a=
lternatively expressed<br>is epsilon less than the fee rate that would have=
 been required to get<br>into the block, assuming there was sufficient spac=
e.<br><br>5. A per-block _Dust Threshold_ is calculated using the marginal =
fee<br>   rate and reasonable assumptions about transaction size.<br><br>6.=
 For each transaction (or transaction group), the _Required Fee_ is<br>   c=
alculated to be the marginal fee rate times the size/weight of the<br>   tr=
ansaction.  Implicit fee is applied towards this required fee and<br>   add=
ed to the _Miner&#39;s Fee Tally_.  Any excess implicit fee<br>   remaining=
 is added to the _Implicit Fee Tally_.<br><br>7. For each transaction (grou=
p), the rebateable fees contribute<br>   proportionally towards towards mee=
ting the remaining marginal fee<br>   requirement, if the implicit fee fail=
ed to do so.  Of what&#39;s left,<br>   one of two things can happen based =
on how much is remaining:<br><br>     A. If greater than or equal to the du=
st threshold is remaining in<br>        a specific rebateable fee, a requir=
ement is added that an<br>        output be provided in the coinbase paying=
 the remaining fee to<br>        a scriptPubKey equal to the push value (se=
e #1 above).<br><br>        (With due consideration for what happens if a s=
cript is reused<br>         in multiple explicit fees, of course.)<br><br> =
    B. Otherwise, add remaining dust to the implicit fee tally.<br><br>8. F=
or the very last transaction in the block, the miner builds a<br>   transac=
tion claiming ALL of these explicit fees, and with a single<br>   zero-valu=
ed null/data output, thereby forwarding the fees on to the<br>   coinbase, =
as far as old clients are concerned.  This is only<br>   concerns consensus=
 in that this final transaction does not change<br>   any of the previously=
 mentioned tallies.<br><br>   (Aside: the zero-valued output is merely requ=
ired because all<br>    transactions must have at least one output. It does=
 however make a<br>    great location to put commitments for extensions to =
the block<br>    header, as being on the right-most path of the Merkle tree=
 can<br>    mean shorter proofs.)<br><br>9. The miner is allowed to claim s=
ubsidy + the miner&#39;s fee tally + the<br>   explicit fee tally for thems=
elves in the coinbase.  The coinbase is<br>   also required to contain all =
rebated fees above the dust threshold.<br><br>In summary, all transactions =
have the same actual fee rate equal to<br>the minimum fee rate that went in=
to the creation of the block, which<br>is basically the marginal fee rate f=
or transaction inclusion.<br><br>A variant of this proposal is that instead=
 of giving the implicit fee<br>tally to the miner (the excess non-rebateabl=
e fees beyond the required<br>minimum), it is carried forward from block to=
 block in the final<br>transaction and the miner is allowed to claim some a=
verage of past<br>fees, thereby smoothing out fees or providing some other =
incentive.<br></pre></blockquote></div></div></div></div><br>______________=
________________<wbr>_________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.=
<wbr>linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.<wbr>org=
/mailman/listinfo/bitcoin-<wbr>dev</a><br>
<br></blockquote></div><br></div>

--001a1141be9eea0b81055a4a825e--