Bitcoin Forum
December 15, 2024, 07:00:18 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: transaction fees and negative balances  (Read 2226 times)
Nefario (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 513


GLBSE Support support@glbse.com


View Profile WWW
April 30, 2011, 01:21:58 PM
 #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?

PGP key id at pgp.mit.edu 0xA68F4B7C

To get help and support for GLBSE please email support@glbse.com
genjix
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
April 30, 2011, 01:36:55 PM
 #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.
Nefario (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 513


GLBSE Support support@glbse.com


View Profile WWW
April 30, 2011, 03:14:42 PM
 #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.

PGP key id at pgp.mit.edu 0xA68F4B7C

To get help and support for GLBSE please email support@glbse.com
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2311


Chief Scientist


View Profile WWW
April 30, 2011, 11: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 "").


How often do you get the chance to work on a potentially world-changing project?
Nefario (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 513


GLBSE Support support@glbse.com


View Profile WWW
May 01, 2011, 03:03:04 PM
 #5

Much thanks, also fee's are charged on every transaction or only ones below a certain amount?

PGP key id at pgp.mit.edu 0xA68F4B7C

To get help and support for GLBSE please email support@glbse.com
DataSurfer
Newbie
*
Offline Offline

Activity: 6
Merit: 0



View Profile
May 01, 2011, 04:57:54 PM
 #6

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.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2311


Chief Scientist


View Profile WWW
May 01, 2011, 05: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.

How often do you get the chance to work on a potentially world-changing project?
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!