Author

Topic: transaction fees and negative balances (Read 2225 times)

legendary
Activity: 1652
Merit: 2301
Chief Scientist
May 01, 2011, 12:55:09 PM
#7
"you didn't offer a fee" is misleading; the bitcoin software 99+% of people are using today doesn't let "you" very much flexibility in how you offer fees.  So basically, 99+% of people using bitcoin are charged fees based on a set of built-in rules.

If you want to send a fee with every transaction, you can run bitcoin with the -paytxfee= option; there isn't much reason to do that now, unless you're generating lots of very small (few-bitpenny) transactions.  The Bitcoin Faucet is running with -paytxfee=0.01 because it DOES generate lots of very small transactions.

From the wiki:
Quote
Current "Default" Rules for the regular Bitcoin client (Bitcoin 0.3.20)
0.01 BTC fee if sending any transaction less than 0.01 BTC. This is to help prevent DoS attacks against the network. Remember: fees are not network-enforced, so it's still possible to send these small transactions without the fee -- you just have to generate the blocks that contain them yourself (after modifying Bitcoin).
0.01 BTC fee per kilobyte of transaction, but:
If the blocksize (size of all transactions currently waiting to be included in a block) is less than 27 kB, transactions are free.
If the blocksize is more than 250 kB, transactions get increasingly more expensive as the blocksize approaches the limit of 500 kB. Sending a transaction when the blocksize is 400 kB will cost 5 times the normal amount; sending when it's 499 kB will cost 500x, etc.
Transactions within each fee tier are prioritized based on several factors. Most importantly, a transaction has more priority if the coins it is using have a lot of confirmations. Someone spamming the network will almost certainly be re-using the same coins, which will lower the priority of their transactions. Priority is also increased for transactions with more BTC, and reduced for transactions with more data.
If the blocksize is over 4kB, free transactions in the above rules are only allowed if the transaction's priority is above a certain level.
newbie
Activity: 6
Merit: 0
Fees are not "charged", fees are offered.  If you didn't offer a fee in your transaction it will have the lowest priority for miners.  Some miners even go so far as to ignore any transaction that does not offer a fee.
hero member
Activity: 602
Merit: 513
GLBSE Support [email protected]
Much thanks, also fee's are charged on every transaction or only ones below a certain amount?
legendary
Activity: 1652
Merit: 2301
Chief Scientist
April 30, 2011, 06:11:52 PM
#4
Uhhh...  maybe a specific example will help.  Lets say you start with accounts/balances of:

A: 5
B: 5
"": 1
Total wallet balance: 11

Now you send 5 BTC from A, and pay a 0.01BTC fee.  Account balances will be:

A: -0.01 BTC
B: 5
"": 1
Total wallet balance: 5.99

The fee isn't 'taken' from either B or "".  You'll have to decide how to handle fees; for ClearCoin, I keep a positive balance in the "" account and automatically move coins from there if a transaction results in a fee (so for the above case, 0.01 bitcoins would be moved from the "" account to A, so A ended up with a zero balance and the fee is paid from "").

hero member
Activity: 602
Merit: 513
GLBSE Support [email protected]
April 30, 2011, 10:14:42 AM
#3

negative balance results from moving one address from the default account "" to another.


I don't think so. I had an account with 0.00000002btc in it, it then sent the same amount to another bitcoin address, now the account is negative 0.01btc. It seems that a transaction charge can also put an account into negative balance.

Thanks for the reply on the other parts.
legendary
Activity: 1232
Merit: 1076
April 30, 2011, 08:36:55 AM
#2
right. fee is taken from wallet.

negative balance results from moving one address from the default account "" to another.

not sure about 3rd question. possibly random.
hero member
Activity: 602
Merit: 513
GLBSE Support [email protected]
April 30, 2011, 08:21:58 AM
#1
Firstly a question about transaction fees.

The fee is taken out of the sending wallet and not from the bitcoin being sent right?
So if I have a wallet of 10btc, and send 5 btc then the balance should be 4.99btc right?

Second a question about negative balances.
If I have a number of accounts in a wallet, and one of them results in a negative balance (say, caused by the previously mentioned transaction fee, actually happened) how are other account's effected?

Lets also assume for this case that the default account "" has a balance of 0, how does bitcoind decide who's account to take that btc from?
Jump to: