How are fees derived?

I have won XCH that had no fees, and I have won XCH that included fees.

When your plot has the best proof, and you win XCH, what determines whether your win will include or not include fees?

And if it your win includes fees, what determines the amount of the fees?

Amount of fees depend on how much fees people put into their transactions.
A block has a certain number of transactions, anyone making a transaction is free to add a fee or not.
When blocks get more full, fees become higher because without it your transaction might be late, or forever waiting.

So if @Voodoo adds a fee to his transaction, and then @seymour.krelborn wins 2 XCH, what determines whether or not it should be my win that gets Voodoo’s fee, rather than someone else that wins 2 XCH?

If @seymour.krelborn is the only winner of a block and the transaction of @Voodoo happens to be in that block, @seymour.krelborn gets it. Which fee get’s into which block is just a matter of timing when the transaction is made.

If there are multiple winners for the same block (I think this is possible but not sure at all, then I suppose the fees just get divided, but again not sure about this situation. )

But well my in-depth knowledge of blockchain workings goes about skin-deep, so looking forward to someone else chiming in here :innocent:

2 Likes

Just making sure I am on the same page…
A “block” is the two XCH that you win (assuming solo farming), comprised of 1.75 XCH + 0.25 XCH?

A block is a record of new transactions added to the chain, that’s it’s primary function.

To compensate farmers, a block also contains a reward to the farmer who had the best proof at that time. That farmer is awarded 1.75 + 0.25 XCH for their trouble and any fees that where included in the transations recorded in that block.

If multiple farmers find a proof, they will get .25+1.75 rewards each, up to 4 farmers per block I believe.

Only one of them will actually sign the block. And that farmer will get the fees.

Also that farmer gets to decide what transactions to fit into that block. Chia software by default works in such a way that transactions with the most fees get priority. But theoretically, you could run your own software that uses the same protocol, and you could shoehorn your own transactions for free (as long as you sign). This gets realistic for pools that run their custom farmers and win blocks often.

Whether or not you get fees also depends on whether or not you farmed a transaction block or not.

I don’t know much more detail beyond what is written in the docs regarding Block Validation, but it seems like these finished blocks do not contain any transactions, and as such, no transactions fees are rewarded when these blocks are farmed. You still get the farmer and pool rewards on transaction blocks.

The Block Rewards page touches on how the fees are rewarded on transaction blocks, implicitly stating that you only get fees when farming a transaction block.

The fees then depend on what fees (if any) were sent along with the transactions on the farmed block.

Here’s an example, block 1,900,000 isn’t a transaction block and received no fees in addition to the 1.75 + 0.25 XCH rewards. The block before it, 1,899,999, had transactions and received some fees from them.