Author

Topic: This transaction requires a transaction fee of at least 0.0215 because of ... (Read 1275 times)

legendary
Activity: 1428
Merit: 1093
Core Armory Developer
Whoa, didn't the allow-free criteria for transaction size used to be like 4 kB?  I have definitely been using 4 kB ever since Armory was first released...

I'll go ahead and update that...
member
Activity: 69
Merit: 20
Thanks for all the answers!
legendary
Activity: 2940
Merit: 1333
If the total size (in bytes) of the transaction is less than 10kB, then the client lets you send it without the fee . . .
Quote
if (nBytes < 10000)
    nMinFee = 0;

Except that there's also a check made to make sure that the coins you are spending are old enough and big enough to qualify for no fee.  It multiplies the age of the coin (in days) by the value of the coin (in BTC) and needs to get more than 1 for the spend to be free.

For example, a 12 BTC coin only needs to be 2 hours old to not incur a fee when it's spent (12 * 2/24 == 1) but a 0.01 BTC coin needs to be 100 days old before it can be spent without a fee.

If you're spending multiple coins at once, it sums the product of value and age over all the coins you're spending, and if that sum is greater than 1, the coins are deemed big/old enough.  So you can spend the 2 hour old 12 BTC coin and a brand new 0.01 BTC coin without a fee if you spend them both at once.
legendary
Activity: 3472
Merit: 4801
The code can be found in GetMinFee() in main.cpp.

First a fee is calculated by dividing the size of the transaction (in bytes) by 1000, adding one to the integer quotient, and multiplying the sum by 0.0005 (nBaseFee) . . .
Quote
int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee;

If the total size (in bytes) of the transaction is less than 10kB, then the client lets you send it without the fee . . .
Quote
if (nBytes < 10000)
    nMinFee = 0;

However, if any output is less than 0.01, then a the client decides you need a fee after all . . .
Quote
if (txout.nValue < CENT)
    nMinFee = nBaseFee;

After all that, if the fee is bigger than 21,000,000 BTC, then it gets reduced to exactly 21,000,000 BTC.
Quote
if (!MoneyRange(nMinFee))
    nMinFee = MAX_MONEY;
staff
Activity: 4284
Merit: 8808
Can somebody tell me how is this amount calculated?
Thanks!

Your transaction doesn't qualify as free, so it's applying 0.0005  BTC per 1000 bytes of transaction data. Your transaction is 43kilobytes in size. A basic transaction is about 230 bytes in size. Your transaction is likely so large because something has been paying you in very tiny coins.

E.g. it's like you asked for all your change in pennies and now that bank wants a fee to handle the big sack you're turning in to deposit.
member
Activity: 69
Merit: 20
Can somebody tell me how is this amount calculated?

Thanks!
Jump to: