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

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?

user117651: 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

6721: <p>I've recently looked up the exact format of a transaction and came up with this (<a href="https://betterprogramming.pub/the-bitcoin-script-language-e4379908448f" rel="noreferrer">source with explanation</a>):</p>
<p><a href="https://i.stack.imgur.com/uyBFG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/uyBFG.png" alt="enter image description here" /></a></p>
<p>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?</p>
 117651: <p>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.</p>
<p>See also:
<a href="https://bitcoin.stackexchange.com/questions/80784/collecting-block-reward-and-transaction-fees?rq=1">collecting block reward and transaction fees</a></p>
