3 ms·
Each Bitcoin transaction has a set of inputs and outputs. The sum of the BTC in the inputs must be strictly greater than or equal to the sum of the BTC in the o
by brotchie 13y ago
Each Bitcoin transaction has a set of inputs and outputs. The sum of the BTC in the inputs must be strictly greater than or equal to the sum of the BTC in the outputs. If sum(inputs) > sum(outputs) then the miner who wins the block containing this transaction gets the residual sum(inputs) - sum(outputs) as their "fee".
The fee charged on transactions is purely a convention, and is not fixed in the Bitcoin protocol. If a sufficiently large group of miners say "We will include transactions in blocks that we mine if and only if the input-output residual is 0.05BTC.", then transactions without this fee will have a low chance of making it onto the blockchain.
If this fee becomes too high, then people may abstain from paying it, reducing the number of transactions that miners are processing, reducing their profit, thus inducing them to lower the fee to capture a larger number of transactions and hence greater profit. There must be some kind of equilibrating fee, modelling this would make an interesting paper / blog post.