Now that we understand transactions and mining, we can go ahead and take a look at transaction fees. In the previous episode we have said that miners receive a piece of land as a reward for winning each round of the mining game. However, there is also another type of reward in addition to new land awarded by the island. This type of reward is called a transaction fee.
Transaction fees are small pieces of land that owners give miners to motivate them to make their transactions official. In the episode on transactions we have explained that all published transactions first travel to a basket of transactions where they wait to be processed by the winning miner. The winning miner has a power to do two things:
- decide which transaction will be made official in case there are conflicting transactions
- decide which transactions will be included in the new block (a batch of transactions that is made official)
Basket of transaction where all published transactions travel first and wait to be processed by the miner who wins the next round of the mining game.
It might seem strange that miners have power to decide which transactions to include in a block. The reason is that in reality including transactions in a block comes at a cost. We can create a metaphor and say that the winning miner has to manually go and replace the labels on each piece of land included in a transaction. That obviously costs the miner time and energy. In order to motivate miners to process transactions, owners have an option to include a “transaction fee” in their transaction. This fee is actually a piece of land owned by the owner that is transferred to the miner as a reward for processing the transaction.
Transaction fee is a small piece of land that owners give to miners as a reward for processing their transactions.
We can slightly increase the precision of our description of contracts (transactions) from episode 4 and add that transaction fees are also a part of the contract (together with inputs, outputs, transaction ids and signatures).
Transactions that do not get processed remain in the basket of transactions until a miner comes along willing to processes them. However, if the miner decides not to include a transaction in the new block, he is missing out on the transaction fee. This assures that miners are motivated to process transactions and in practice hardly ever forgo the chance to earn extra land.
Owners are also able to include no transaction fees at all and hope there will come a winning miner willing to process their transaction for free. Some miners process transactions for free because it increases the usefulness of the Bitcoin island, and increased usefulness means increased price of land. Since miners are rewarded in land, it is in their direct interest for the land to be as valuable as possible.