Post
Topic
Board Speculation
Re: rpietila Wall Observer - the Quality TA Thread ;)
by
phatsphere
on 03/08/2014, 16:20:23 UTC
Ah, please tell me what is a floating fee then?
currently, a client like bitcoin core -- and the floating fees are ONLY about clients sending out TXs, nothing related to miners -- has a fixed minimum fee. other online wallets also have a fixed minimum fee, etc. you can also send out TXs with any other fee, also zero, but it's just a guess out of your butt.

what you want is actually this: higher fee -> quicker inclusion in the next block. lower fee -> maybe wait an hour or two, but it will get included.

solution:
1.  let your client monitor the last 2500 successfully confirmed transactions (ignore what's currently in the mempool or what your client hasn't seen so far) whereas they are grouped by the number of blocks they had to wait until they are confirmed in bins of maximum size 100,
2. calculate for each of them the TX-fee per kB,
3. sort them by this value and put them into 25 bins of size 100 each (and yes, if you don't have 2500 TXs, bins are smaller),
4. select bin number "n" for your desired number of blocks "n" you want wait for inclusion -> calculate the median TX-fee of that bin number "n" and multiply it by the kB your new TX.

For example, this is what my dev client says are the fees to be included in the next "n"-th block:

Code:
$ echo `seq 1 25` | xargs -n 1 bitcoin-cli estimatefee | nl
     1 0.00045662
     2 0.00044247
     3 0.00038910
     4 0.00038610
     5 0.00026809
     6 0.00022831
     7 0.00019193
     8 0.00015885
     9 0.00014461
    10 0.00013614
    11 0.00012547
    12 0.00012315
    13 0.00012241
    14 0.00012195
    15 0.00011851
    16 0.00011778
    17 0.00011764
    18 0.00011475
    19 0.00011282
    20 0.00011040
    21 0.00010928
    22 0.00010787
    23 0.00010548
    24 0.00010405
    25 0.00006574