Bitcoin Forum
December 05, 2016, 02:41:13 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Fee calculation disparity and why it happens  (Read 735 times)
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
April 19, 2012, 04:38:12 PM
 #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.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480905673
Hero Member
*
Offline Offline

Posts: 1480905673

View Profile Personal Message (Offline)

Ignore
1480905673
Reply with quote  #2

1480905673
Report to moderator
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1036


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.

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



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
Global Moderator
Legendary
*
Offline Offline

Activity: 1932



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.

Tired of annoying signature ads? Ad block for signatures
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!