Bitcoin Forum
May 22, 2024, 04:16:02 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Minimum tx amount where amount = fee  (Read 2336 times)
DougPeters (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
July 15, 2014, 01:57:08 PM
 #1

What is the absolute minimum amount which, when transferred over a tx, its value equals the tx's suggested fee? Is it the dust amount of 0.00005430 BTC? How is this value affected when that amount is the only unspent output spent in the tx and when there are more unspent outputs than just this one?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
July 15, 2014, 03:45:38 PM
 #2

What is the absolute minimum amount which, when transferred over a tx, its value equals the tx's suggested fee?

The minimum suggested transaction fee (when a fee is suggested) is currently typically 0.0001 BTC.

Therefore, the minimum value that would equal the typically suggested minimum fee would be 0.0001 BTC.

Perhaps I'm not understanding your question?  That answer seems rather obvious.

Is it the dust amount of 0.00005430 BTC?

The current protocol rules for relaying transactions enforced by most peers requires that all outputs be higher than 0.00005430 BTC.  If there are any outputs in the transaction with a lower value, then most peers won't relay the transaction, and many miners won't include the transaction in the blocks they are mining.  This amount is often called "dust" to indicate that the value is so low that receiving it it is essentially worthless (it generally costs more in transaction fees to send it than it is worth).

How is this value affected when that amount is the only unspent output spent in the tx and when there are more unspent outputs than just this one?

The suggested fees increase as the size (in bytes) of the transaction increases.  The more inputs (or outputs) that a transaction has, the more bytes that are required to represent the transaction.  Each additional input requires approximately 148 bytes, and each output requires approximately 34 bytes.
DougPeters (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
July 15, 2014, 04:03:17 PM
 #3

Thanks for your answer @DannyHamilton. And you are right, my description is rather confusing. So let me express it with an example:

For a given tx the amount to be sent is X btc. The (suggested) tx fee for this tx is Y. However, X = Y, so there's no point in sending out this tx. So my question is, does the above occur for any given value of X?

My arbitrary assumption is also that amounts smaller than X will need more fees to be sent than the actual value, I might be wrong on this one.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
July 15, 2014, 04:35:13 PM
 #4

Thanks for your answer @DannyHamilton. And you are right, my description is rather confusing. So let me express it with an example:

For a given tx the amount to be sent is X btc. The (suggested) tx fee for this tx is Y. However, X = Y, so there's no point in sending out this tx. So my question is, does the above occur for any given value of X?

My arbitrary assumption is also that amounts smaller than X will need more fees to be sent than the actual value, I might be wrong on this one.

The suggested fee is based on the size of the transaction (in bytes), not quantity of bitcoins being exchanged.
The suggested transaction fee is currently suggested in increments of 0.0001 BTC (100 µBTC) per kilobyte.

So, a transaction that is sending 0.001 BTC (1,000 µBTC) could have a suggested fee of as little as 0.0001 BTC (100 µBTC) but if the transaction consisted of many inputs and many outputs, the suggested fee could be higher than 0.001 BTC (1,000 µBTC).

If we assume the smallest possible transaction (only one input, and only one output), then you are looking at a transaction that is less than 1 kilobyte.  Therefore, the smallest possible transaction fee (on a transaction that has a transaction fee) is 0.0001 BTC (100 µBTC).

Based on your quote above, this means Y=0.0001 BTC (100 µBTC).

If X is less than 0.0001 BTC (100 µBTC), then the fee is more than X.
If X is more than 0.0001 BTC (100 µBTC), then the fee is less than X.

Of course, depending on the contents of your wallet, it is possible that the transaction is not less than 1 kilobyte.
This means that Y may increase even if X stays the same.

It depends entirely on the quantity and values of the unspent outputs in the wallet and the number of new outputs your transaction is creating.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 15, 2014, 05:36:54 PM
 #5

Fee is per kb so there isn't an exact 1:1 relationship.  The dust threshold is designed to prevent creating output which would cost a significant fraction of their value to spend.

There is no single transaction size, or even single size for inputs or outputs.  The actual size will depend on the type of input/output, the number, and small variations in signature and key size.

Still for most transactions involving P2PkH outputs and compressed keys:
tx size ~= 10 bytes + (num_inputs * 110 bytes) + (num_outputs * 32 bytes)

Note: using uncompressed keys, P2SH, multisig would result in significantly different txns sizes.

So if a txn "costs" 100 bits (10,000 satoshis) per KB then lets simplify things and look use 2 outputs (most txns have a single recipient and a change output) that means you have 926 bytes / 110 bytes per input = 9 inputs per KB.  That means the min "spendable" value of an input would be 100 / 9 = 12 bits ea. Note I use the word "spendable" loosely here as 9 inputs @ 12 bits each = 108 bits - 100 bits in fees = 8 bits in output.  The dust threshold is 54.3 bits so the txn would be non-standard and you would be spending ~99% of the input value as fees.

This is the type of problems the dust limit was designed to prevent.  The dust limit is currently 54.3 bits.  If you received nothing but dust and spent them optimally it would be ~488 bits spent costing 100 bits in fees or ~20% in fees.  I would recommend using larger amount when possible but it does show how the dust threshold puts a cap on fees as a percentage of the transaction amount.
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!