Pages:
Author

Topic: problem with bitcoin payment fees (Read 1736 times)

legendary
Activity: 1652
Merit: 1088
CryptoTalk.Org - Get Paid for every Post!
April 29, 2013, 09:14:54 AM
#27
DannyHamilton - you're a star! Thank you very much!
legendary
Activity: 3472
Merit: 4801
April 29, 2013, 09:05:45 AM
#26
OK - another question about inputs and outputs.

Say I have a wallet with 2 BTC in it, which is made up of 50inputs of  0.04BTC each. I want to send 1BTC to another wallet - am I right that this will be made up of 25 inputs, and the transaction size will be 25 x 200bytes = 5000 ?

Yes, if every unspent output in your wallet was exactly 0.04 BTC, then a transaction to send 1 BTC would be at least 25 inputs.  Depending on the wallet program used to create the transaction there might be a preference programmed in to create "change".  This improves privacy a bit.  If a transaction only has a single output, then it becomes immediately obvious what address is being paid and how much is being sent.  If an address has 2 outputs, then it isn't as easy for someone to tell which is the "change" and which is the "payment".  If the wallet has a preference programmed in to create "change", then it might actually use something like 28 inputs, and create a second output for 0.12 BTC.


A transaction size is made up of more than just inputs, and inputs are typically more like 180 bytes each.

For the sake of the math, lets assume that your wallet creates a transaction with exactly 25 inputs and 1 output, here's the structure of such a transaction:

Code:
4 byte version number
1 byte input quantity
Then for each input:
Code:
32 byte transactionID
4 byte index
1 byte scriptSig length
1 byte signature length
variable length signature (perhaps typically approximately 72 bytes?)
1 byte public key length
65 byte public key
4 byte sequence number
(That's 108 bytes plus the signature per input, figure a typical input at 180 bytes)
Then:
Code:
1 byte output quantity
Then for each output:
Code:
8 byte output value
1 byte script length
1 byte OP_DUP script code
1 byte OP_HASH160 script code
1 byte code to push 20 bytes onto the script processing stack
20 byte bitcoin address to pay to
1 byte OP_EQUALVERIFY script code
1 byte OP_CHECKSIG script code
(That's 34 bytes per output)


So depending on the length of the signatures in your example transaction, it should be around:

4 + 1 + (180 X 25) + 1 + (34 X 1) = 4,540 bytes
legendary
Activity: 1652
Merit: 1088
CryptoTalk.Org - Get Paid for every Post!
April 29, 2013, 03:03:58 AM
#25
OK - another question about inputs and outputs.

Say I have a wallet with 2 BTC in it, which is made up of 50inputs of  0.04BTC each. I want to send 1BTC to another wallet - am I right that this will be made up of 25 inputs, and the transaction size will be 25 x 200bytes = 5000 ?
legendary
Activity: 3472
Merit: 4801
April 27, 2013, 12:17:04 PM
#24
- snip -
Hi - I just checked on my blockchain wallet - the oldest transaction has over 900 confirmations. How high do the confirmations go? Does anyone have any idea?

They don't stop.  Every time a new block is added to the blockchain (approximately every 10 minutes on average), the transaction is considered to have another "confirmation".  This will continue for as long as bitcoin exists.
legendary
Activity: 1652
Merit: 1088
CryptoTalk.Org - Get Paid for every Post!
April 27, 2013, 12:13:07 PM
#23

Btw:
The formula for priority is
priority = ((BTC address balance*100000000) * number of confirmations (weighted over all coins) / size of transaction message in bytes)
A priority of 57.600.000 is needed to send without fees.
It will be years before you could send dust without fee without bundling it with bigger transactions.


Hi - I just checked on my blockchain wallet - the oldest transaction has over 900 confirmations. How high do the confirmations go? Does anyone have any idea?
sr. member
Activity: 364
Merit: 250
April 24, 2013, 10:51:31 PM
#22

Thanks everyone for the cogent replies... and if anybody can figure out how the requested fees can jump around like a flea with an itch, pray continue.

My guess is that the used coins for the transaction are selected randomly.
Usually you have to pay a size fee for every 5-6 transaction used, so if it selects 30 dust transactions...
The age of the coins isn't relevant to this fee.

There are two different fees, one is about the file size (0.0005 for every 5-6 transactions included),
the other one is about priority (fixed 0.0005).


Btw:
The formula for priority is
priority = ((BTC address balance*100000000) * number of confirmations (weighted over all coins) / size of transaction message in bytes)
A priority of 57.600.000 is needed to send without fees.
It will be years before you could send dust without fee without bundling it with bigger transactions.

This is mandatory in the qt-client, the fees aren't enforced by the Bitcoin system itself.
So it could be handled in another way by the online wallet.
newbie
Activity: 3
Merit: 0
April 24, 2013, 09:51:00 PM
#21
Wow.  I post a simple question, look at the first few replies, go take a nap and then come back and see a plethora of knowledgeable replies on the topic from the bitcoin community.

As I said, wow.

This confirms me in the belief, formed over a year ago, that for some reason, bitcoin has sucked in some of the brightest people on this planet.

That having been said, however, now I REALLY think there's a bug in this wallet.  I was already aware (though not to the depth that many of the people replying to my post are, to be sure) of the age and "dust" issues... but that still doesn't explain why the fees my wallet is requesting change at every request, EVEN WHEN I'M NOT CHANGING ANYTHING ELSE.

Other data: there are only two transactions in this wallet younger than EIGHT MONTHS.  This was one of my first wallets, set up over a year ago, when I was first getting into bitcoins, and I was just trying to clean up and remove any coins from this old wallet before May 15th and shut off the POS laptop it occupies.

The two newest transaction are also over two weeks old, two referrals from Bitvisitor for 8 and 16 microbitcoins respectively... these are also the two smallest transactions in the wallet, as far as I am aware.  Every other transaction is at least seven and a half months older and up into the milli-bitcoin range or larger.

Thanks everyone for the cogent replies... and if anybody can figure out how the requested fees can jump around like a flea with an itch, pray continue.
full member
Activity: 174
Merit: 100
< My mining rig >
April 24, 2013, 09:47:12 PM
#20
Not trying to be flip here, but if I understand the end-game for deflationary currencies like Bitcoin, then the value of even small "denominations" will become so great as to be almost unspendable.  If that's true, then you probably won't use Bitcoins to buy T-shirts, instead, you'll use your Bitcoin holdings as collateral for the loan to buy a T-shirt manufacturing business.

Sure but what about your nanobitcoins?  How long do you suppose it would take for deflationary forces to affect the value of bitcoin to the point that nanobitcoins are too valuable to be spent for everyday purchases?

Ah, got it -- forgot how many digits there were after the decimal point.  So consolidaters will be balanced by spenders, and transaction fees will grow.  Thanks for the calibration.
legendary
Activity: 3472
Merit: 4801
April 24, 2013, 07:53:06 PM
#19
Not trying to be flip here, but if I understand the end-game for deflationary currencies like Bitcoin, then the value of even small "denominations" will become so great as to be almost unspendable.  If that's true, then you probably won't use Bitcoins to buy T-shirts, instead, you'll use your Bitcoin holdings as collateral for the loan to buy a T-shirt manufacturing business.

Sure but what about your nanobitcoins?  How long do you suppose it would take for deflationary forces to affect the value of bitcoin to the point that nanobitcoins are too valuable to be spent for everyday purchases?
full member
Activity: 174
Merit: 100
< My mining rig >
April 24, 2013, 07:35:39 PM
#18
Not trying to be flip here, but if I understand the end-game for deflationary currencies like Bitcoin, then the value of even small "denominations" will become so great as to be almost unspendable.  If that's true, then you probably won't use Bitcoins to buy T-shirts, instead, you'll use your Bitcoin holdings as collateral for the loan to buy a T-shirt manufacturing business.
sr. member
Activity: 364
Merit: 250
April 24, 2013, 05:47:15 PM
#17
birdy - I just had a look at your coin control thread (thanks to you and DannyHamilton  - you've cleared up a lot of things).

Is it possible to use the coin control thing on a wallet in blockchain.info?

I don't think so :/
It's an addition to the qt-client.
legendary
Activity: 1652
Merit: 1088
CryptoTalk.Org - Get Paid for every Post!
April 24, 2013, 05:46:23 PM
#16
birdy - I just had a look at your coin control thread (thanks to you and DannyHamilton  - you've cleared up a lot of things).

Is it possible to use the coin control thing on a wallet in blockchain.info?
legendary
Activity: 3472
Merit: 4801
April 24, 2013, 05:43:22 PM
#15
Amount being spent you say, is that spent by the people buying t-shirt or the t-shirt company?

Yes.  As I said, as long as the total size of a transaction is less than 10 kilobytes, and the value of every output is larger than 0.01 BTC, and the priority of the transaction is greater than the equivalent of 1 bitcoin day, the transaction can be attempted without fees at the moment.  It doesn't matter who's doing the spending, only that the "spam filter" fee requirements aren't exceeded. Fee requirements are likely to change in the future as the exchange rate increases (it has changed in the past).

On the other hand, as bitcoin gains popularity, the available space in a block will become more valuable.  As such, even if the "spam rules" don't require a fee, it may become nearly impossible to get a confirmation without a reasonable fee.  It's possible that by then there will be third-party services that will provide methods for transferring bitcoin value off-blockchain.

Also you said;
"If you have inputs valued at 0.00000001 BTC (frequently received from SatoshiDice), they'd have to age for 10,000,000 days before they could be individually spent without a fee."

So for example;
 I have a few of those 0.00000 transactions is there any hope for me to ever be able to spend bitcoins without having to pay a few? Or are was my first day in bitcoin world with a lot of small transactions messing it up for the rest of my life?

Well, as the exchange rate for bitcoins increases, the fee requirements are likely to be reduced.  In the meantime, you could create a backup of your current wallet (to recover in the future after the outputs have aged and the fee requirements are reduced), and start a new wallet.  You could also (as has already been mentioned by "DeathAndTaxes") send a single larger output to the wallet.  Over time, as the "dust" ages, the wallet may occasionally include it with the larger output to "consolidate" it.  Meanwhile the wallet will use the larger output for transactions and simply ignore the tiny ones.
sr. member
Activity: 364
Merit: 250
April 24, 2013, 05:30:39 PM
#14
I don't know if it's aviable for your old version, but I use coin control to be able to select what coins are sent.

https://bitcointalksearch.org/topic/yet-another-coin-control-release-closed-144331

Quote
So for example;
 I have a few of those 0.00000 transactions is there any hope for me to ever be able to spend bitcoins without having to pay a few? Or are was my first day in bitcoin world with a lot of small transactions messing it up for the rest of my life?

You can bundle them up with bigger transaction using this coin control.
I'm still dust cleaning in my wallet whenever I have to send something xD
newbie
Activity: 14
Merit: 0
April 24, 2013, 05:30:02 PM
#13
I still don't understand why it cost more to SEND something if you have more transactions going IN to your wallet.
Why does the system care where I got the money from (as long as they are verified)?

if I want to send 1 BTC why does it matter if I accumulated my "wealth" by 5000 or 5 transactions? This hurt business that sell t-shirts over people selling gaming computers then, since they have more transactions with less money coming in.

It only hurts if the amount being spent is so small as to be considered "spam" by the network.


Amount being spent you say, is that spent by the people buying t-shirt or the t-shirt company?

Also you said;
"If you have inputs valued at 0.00000001 BTC (frequently received from SatoshiDice), they'd have to age for 10,000,000 days before they could be individually spent without a fee."

So for example;
 I have a few of those 0.00000 transactions is there any hope for me to ever be able to spend bitcoins without having to pay a few? Or are was my first day in bitcoin world with a lot of small transactions messing it up for the rest of my life?
legendary
Activity: 3472
Merit: 4801
April 24, 2013, 05:23:39 PM
#12
I still don't understand why it cost more to SEND something if you have more transactions going IN to your wallet.
Why does the system care where I got the money from (as long as they are verified)?

if I want to send 1 BTC why does it matter if I accumulated my "wealth" by 5000 or 5 transactions? This hurt business that sell t-shirts over people selling gaming computers then, since they have more transactions with less money coming in.

It only hurts if the amount being spent is so small as to be considered "spam" by the network.

The problem is that spending more outputs results in larger sized transactions (in terms of bytes).  Those bytes take up space in the blocks that the miners are creating, and there is a limited amount of space available in each block (currently 1 megabyte). So block space is valuable to the miner.  They total fees they can earn for a single block depends on the fees paid per byte of transaction size by those sending transactions.
legendary
Activity: 3472
Merit: 4801
April 24, 2013, 05:19:12 PM
#11
If I have a wallet that has 20 outputs each valued at 0.1 BTC, I'd have to wait 10 days to spend any of them fee-less.  In the mean time, EVERY transaction I create will require a 0.0005 BTC fee.
Does that mean that if you have a lot of small credits in your wallets ("dust" I think you called them!), you should wait ten days before doing anything? Why ten days - is that the time it takes for the small inputs to get confirmed by all the nodes in the network?

Sorry if this is a stupid question, but I'm new and I don't really understand the point of the fees at all.

There are a few conditions that trigger a fee requirement.

If a transaction is larger than 10 kilobytes, then you need a fee per kilobyte.

If any output of the transaction is less than 0.01 BTC then you need a fee.

If the "priority" of the transaction is too low, then you need a fee.

Assuming that your transaction is smaller than 10 kilobytes, and that all outputs are larger than 0.01 BTC, the calculated "priority" will determine if a fee is required.

Priority is determined by both the value and age of the inputs.  Generally one "bitcoin day" is enough to avoid a fee.

As such, 2 bitcoins aged a half day, or 4 bitcoins aged a forth of a day, or a half bitcoin aged 2 days, would all be enough to avoid the fee.

Since I used 0.1 BTC (one tenth of a bitcoin) in my example, as the value of the inputs, they'd need to age ten days to get a high enough priority.  Meanwhile after consolidating them, you'd have a single input valued at nearly 2 bitcoins, so it'd have a high enough priority in just over 12 hours.

If you have inputs valued at 0.00000001 BTC (frequently received from SatoshiDice), they'd have to age for 10,000,000 days before they could be individually spent without a fee.

If you add larger outputs to your wallet, they can be spent combined with the smaller outputs to arrive at a higher average priority.
newbie
Activity: 14
Merit: 0
April 24, 2013, 05:09:17 PM
#10
I still don't understand why it cost more to SEND something if you have more transactions going IN to your wallet.
Why does the system care where I got the money from (as long as they are verified)?

if I want to send 1 BTC why does it matter if I accumulated my "wealth" by 5000 or 5 transactions? This hurt business that sell t-shirts over people selling gaming computers then, since they have more transactions with less money coming in.
legendary
Activity: 1652
Merit: 1088
CryptoTalk.Org - Get Paid for every Post!
April 24, 2013, 04:59:18 PM
#9

If I have a wallet that has 20 outputs each valued at 0.1 BTC, I'd have to wait 10 days to spend any of them fee-less.  In the mean time, EVERY transaction I create will require a 0.0005 BTC fee.


Does that mean that if you have a lot of small credits in your wallets ("dust" I think you called them!), you should wait ten days before doing anything? Why ten days - is that the time it takes for the small inputs to get confirmed by all the nodes in the network?

Sorry if this is a stupid question, but I'm new and I don't really understand the point of the fees at all.
legendary
Activity: 3472
Merit: 4801
April 24, 2013, 04:43:44 PM
#8
- snip -
As far as spendability.  Not really.  You are simply paying the fee now vs potentially paying a fee in the future.

If I have a wallet that has 20 outputs each valued at 0.1 BTC, I'd have to wait 10 days to spend any of them fee-less.  In the mean time, EVERY transaction I create will require a 0.0005 BTC fee.

So, If I wanted to send 5 transactions during that 10 days, I'd end up spending 0.0025 BTC in fees.  Meanwhile, due to the change from each of those transactions, I'd end up with several even smaller outputs that will require even longer before they are spendable. Meaning after the 10 days is up, I'd still have required fees.

Now, if I consolidated the 20 outputs, I could pay a single 0.0005 BTC fee, and end up with a single 1.9995 BTC output in my wallet.  About 12 hours later this output would be available to be spent without fees, and the resulting change would again be a large output (the difference between 1.9995 and the amount spent).  Assuming the amount spent was less than 0.9995 BTC, the change would also be spendable fee-less within a day.  You could spend around 0.1 BTC every day for 10 days on that single 0.0005 fee used for consolidation.


Pages:
Jump to: