Bitcoin Forum
May 10, 2024, 07:57:40 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Fee calculation disparity and why it happens  (Read 898 times)
Raoul Duke (OP)
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
April 19, 2012, 04:38:12 PM
Last edit: April 19, 2012, 06:42:54 PM by psy
 #1

I spoted a strange behaviour on fee calculation right now.

I was sending a transaction and it told me that babble about my balance not being enough to include a 0.001 fee that would be necessary to process the transaction.
I lowered the amount to take out that 0.001 so I could pay the fee and when I went to send it it told me that the fee would be 0.0005 instead of the 0.001 stated initially.
So, I went and changed the value of the transaction again to be my complete balance minus the 0.0005 fee. When sending again I got the same popup stating a fee of 0.001 would be needed.
I went back and changed the value to be my complete balance minus the 0.001 fee and sent it and it only charged me the 0.0005 fee leaving me with 0.0005 on my wallet Smiley

If one of the devs wish I'll PM him the tx ID. Not posting it here for obvious reasons. This should be mainly related to the client itself and probably has nothing to do with the transaction, but maybe it helps to see what the transaction was.

Using Bitcoin-Qt 0.6.0.6-beta on x64 Ubuntu.
1715371060
Hero Member
*
Offline Offline

Posts: 1715371060

View Profile Personal Message (Offline)

Ignore
1715371060
Reply with quote  #2

1715371060
Report to moderator
1715371060
Hero Member
*
Offline Offline

Posts: 1715371060

View Profile Personal Message (Offline)

Ignore
1715371060
Reply with quote  #2

1715371060
Report to moderator
1715371060
Hero Member
*
Offline Offline

Posts: 1715371060

View Profile Personal Message (Offline)

Ignore
1715371060
Reply with quote  #2

1715371060
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
April 19, 2012, 06:14:20 PM
 #2

The calculated fee depends on the actual transaction produced, such as on the size, the number of inputs, their value, and their age. The client uses some heuristic to prevent unnecessary losses, but the algorithm is not deterministic. In some cases, a simpler transaction is produced, or if time passed, the fee requirements decrease.

In short, yes, this is possible.

I do Bitcoin stuff.
Raoul Duke (OP)
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
April 19, 2012, 06:41:59 PM
 #3

Well, the time that passed was the 60 seconds i took to change the transaction amount 3 times till I sent it, so probably that wasn't the reason. Most likely it was some of the smaller inputs that was being included in the transaction if I sent it with (Total balance - 0.0005 fee) and wasn't being included when I sent using (Total balance - 0.001 fee), thus reducing the necessary fee for the transaction to go trough and efectively charging me only 0.0005 for fee.

Got it now. Thanks for the explanation.

I'll edit the thread title to reflect that it isn't a bug Smiley
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
April 19, 2012, 09:11:15 PM
 #4

coin "age" is taken into account when dealing with transactions, and a block could have poped up in that time, so i'm not surprised.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
Raoul Duke (OP)
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
April 19, 2012, 09:26:19 PM
 #5

coin "age" is taken into account when dealing with transactions, and a block could have poped up in that time, so i'm not surprised.

If that was the case it wouldn't have happened the way it did Wink
My post above is most likely the reason, as it was a small transaction made up of very small inputs, some of them less than 0.005 BTC.
One of those inputs got left out when I took 0.001 from the amount to send, thus lowering the fee.
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!