I've recently looked up the exact format of a transaction and came up with this (source with explanation):

enter image description here

However, this seems not to include transaction fees. Are they not part of the transaction? Or do they have a special output lock script that basically makes it available to everybody?

1 Answer 1


The transaction fee is implicitly specified. It is given to the miner as the remainder of the transaction: the difference between the sum of all transaction inputs and the sum of all transaction outputs is left free to be collected by the miner.

See also: collecting block reward and transaction fees

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.