Bitcoin Forum
May 02, 2024, 04:24:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Trying to understand how fee works... But its kinda weird.  (Read 97 times)
sebastian (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 118


View Profile
April 27, 2021, 01:06:30 PM
Merited by DdmrDdmr (2)
 #1

I made this transaction:
662f7e90b1e3d6f55c06388c07b62e15c6ab672c936372b64e8748c22d3923fb (game purchase on indiegala)

And it had a really hard time getting into a block even tough paying like 0.0004 in fee. Sites listed it like miners didn't want this transaction.

Then I did this transaction:
f3cb81d3a01f03b4e3b473fd3d264d0661d31f9081ca8ec6c544fee08b4ef853 (purchase of 100€ Steam gift card on bitrefill)

and this time, even when paying LESS in fee - 0.00032649 - it got pretty quick into a block and some sites listed it as a preferable transaction for miners.

What causes this?
It seems that 1000 satoshis / kB is the standard, but miners aren't following that what I understand, because the fee's I paid on both transactions were pretty high, and still the first block had trouble getting across.


How do miners calculate which fee to "require"?
1714623841
Hero Member
*
Offline Offline

Posts: 1714623841

View Profile Personal Message (Offline)

Ignore
1714623841
Reply with quote  #2

1714623841
Report to moderator
1714623841
Hero Member
*
Offline Offline

Posts: 1714623841

View Profile Personal Message (Offline)

Ignore
1714623841
Reply with quote  #2

1714623841
Report to moderator
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714623841
Hero Member
*
Offline Offline

Posts: 1714623841

View Profile Personal Message (Offline)

Ignore
1714623841
Reply with quote  #2

1714623841
Report to moderator
1714623841
Hero Member
*
Offline Offline

Posts: 1714623841

View Profile Personal Message (Offline)

Ignore
1714623841
Reply with quote  #2

1714623841
Report to moderator
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5578


Self-proclaimed Genius


View Profile
April 27, 2021, 01:44:20 PM
Merited by DdmrDdmr (2), bitmover (1)
 #2

Miners aren't prioritizing transaction based from the total fee, they'll base it from the fee rate.

First, take note of the transaction's "virtual size" and "Transaction fees" from here:
The first transaction's size is higher than the second transaction so even though their total fee is almost identical, the fee rate will be lower for the transaction with higher size.
If you're not familiar, 'fee rate' is equal to the 'total fee' divided by 'virtual size'.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
April 27, 2021, 01:59:14 PM
 #3

1000 satoshis/vKB is far from the standard, in fact it is lower than the minimum fees to enter the mempool.

As mentioned, miners have to prioritize the fee rates over the total fees in order to maximize the profit from their very limited block size. It doesn't make sense for them to prioritize total fees, just won't be a good way to maximize the amount of fees collected.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Charles-Tim
Legendary
*
Offline Offline

Activity: 1540
Merit: 4833



View Profile
April 27, 2021, 02:25:49 PM
Merited by DdmrDdmr (2)
 #4

Exactly is it as nc50lc commented. The first transaction has 7 inputs and 2 outputs, the inputs and outputs are higher than the second transaction with 1 input and 1 output. The more the input and output, the more the transaction weight, especially the input add much more to the weight, and transaction fee are calculated in weight or vbyte.

Transactions fee are calculated in weight or vbyte, not the actual amount you are paying. The miners make use of feerate (sat/vbyte) which you can check using reputed mempool observer.

Reputed mempool observers
https://jochen-hoenicke.de/queue/#BTC,24h,fee
https://mempool.space/
https://mempool.observer/

The higher the weight of the transaction, the high the fee.
Feerate= sat/vbyte
Fee= feerate*vbyte

The feerate to get a transaction confirmed is determined by the mempool state of congestion. And the more the transaction weight or vbyte (from most especially the transaction input), the increase in the feerate to get such transaction confirmed and the increase in fee that will be paid.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
bitmover
Legendary
*
Offline Offline

Activity: 2296
Merit: 5914


bitcoindata.science


View Profile WWW
April 27, 2021, 02:47:19 PM
 #5

I made this transaction:
662f7e90b1e3d6f55c06388c07b62e15c6ab672c936372b64e8748c22d3923fb (game purchase on indiegala)

And it had a really hard time getting into a block even tough paying like 0.0004 in fee. Sites listed it like miners didn't want this transaction.

Then I did this transaction:
f3cb81d3a01f03b4e3b473fd3d264d0661d31f9081ca8ec6c544fee08b4ef853 (purchase of 100€ Steam gift card on bitrefill)

and this time, even when paying LESS in fee - 0.00032649 - it got pretty quick into a block and some sites listed it as a preferable transaction for miners.

What causes this?
It seems that 1000 satoshis / kB is the standard, but miners aren't following that what I understand, because the fee's I paid on both transactions were pretty high, and still the first block had trouble getting across.


How do miners calculate which fee to "require"?

A block has a limited size, in bytes (it is actually virtual byte, but lets consider it as bytes now to make it simple).

Each transaction has a different size. There are many things that control transaction size:
 
  • address format - old address format is called Legacy, and those addresses are bigger in bytes
  • number of inputs - Each time you receive BTC, even if using the same address, you generate one input. Each input occupy a space in the transaction size. The more inputs, the bigger the transction size.
  • number of outputs - number of destination addresses. Usually a transaction has at least 2 outputs, one as change (to receive back the remaning btc) and one destination.



Now let's look your transactions

 
  • This transaction has 7 inputs and 2 outputs. This transaction has the size of 1332 vB. You paid 30 sat/vbyte in this one.
  • While this tranasction transaction has only 1 input and 1 output, and the size of 221vB. The second transaction has 1/6 of the former transaction, and you paid 130 sat/vbyte in that one.

Miners will of course prefer a small transaction paying 130 sat/vbyte than a big one, which you paid only 30 sat/vbyte.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pmalek
Legendary
*
Offline Offline

Activity: 2758
Merit: 7124



View Profile
April 27, 2021, 03:04:05 PM
 #6

A bitcoin block has a weight limit of 4.000.000 weight units (WU). To understand how much your transaction "weighs", simply multiply your virtual size times 4. For the two transactions you made, the first one weighs 5328 WU and pays 30.0 sat/vByte while the second one weighs only 884 WU and pays 147.7 sat/vByte. Miners will always prioritize the second one because it pays more per vbyte and they have more free space to include other transactions.

In my town, we have a taxy service that drives around on the boulevard. They charge a fixed fee per person for each drive on the boulevard. That means that each person pays a fixed fee and the ride isn't exclusive for you. The driver can pick up additional people along the boulevard. If the drive is $5, one person pays $5, if two people enter the cab, they pay $10 in total, etc., you get the point. You have limited capacity in a taxy (that's your weight unit) and it's in your interest, as the driver, to fill it up and get paid as much as possible every time you drive.

Now you have two options.
You can take that tall and fat dude who will take up your entire backseat (he represents your 5328 WU transaction), or you can pick up that skinny teenager who weighs 884 WU. If you go for the fat dude, you wont have any more space on the backseat. Even if he pays $6 or $7 for the ride, it pays off more to drive the teenager for $5 because you know that along the way you will stop for more potential clients who will have room in the backseat and increase your earnings to $10 or $15. That is why miners will rather mine the 2nd of your two transactions because they know they will have much more space to include other transactions and earn more overall. 

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!