<p>The sum of a transaction's inputs must be greater than or equal to the sum of outputs as part of the validation rules.  This difference is the transaction fee.</p>

<p>So to answer your question directly, when a UTXO is spent, it is referenced as part of a transaction input.  A UTXO is always completely consumed (analogous to how if you spend a dollar bill, you have to spend the whole bill and get change), so the fees are not taken from that per se.  It is the difference of the inputs (sum of the UTXO values being spent) and the outputs of a properly formed transaction that becomes the miner's fee.</p>

CC BY-SA 4.0
2020-02-21T17:02:54.113Z
Greater or equal. Fees are not a consensus rule.
Claris
CC BY-SA 4.0
2020-02-22T00:12:06.443Z
Or put otherwise: the transaction itself commits to turning some of its input values into fees. Miners are allowed to take it, but they take it from the amount redirected to fees by transactions already - they don't modify the transaction in doing so.
Pieter Wuille
CC BY-SA 4.0
2020-02-21T14:08:05.470Z
2020-02-21T23:16:01.240Z
2020-02-21T23:16:01.240Z
Chan-Ho Suh
<p>How is it possible for a miners to deduct the transactions fees from the UTXO output which is locked by locking script or encumbrances?</p>

<transactions><transaction-fees>
How miner deduct Transactions fees from transaction?
zircon
# How miner deduct Transactions fees from transaction?

(Asked by: username_0 on 2020-02-21)

How is it possible for a miners to deduct the transactions fees from the UTXO output which is locked by locking script or encumbrances?

**Tags:** transactions, transaction-fees


---

## 1 answers

### Answer by username_1 on 2020-02-21. Score: 2 | Accepted answer

The sum of a transaction's inputs must be greater than or equal to the sum of outputs as part of the validation rules. This difference is the transaction fee.

So to answer your question directly, when a UTXO is spent, it is referenced as part of a transaction input. A UTXO is always completely consumed (analogous to how if you spend a dollar bill, you have to spend the whole bill and get change), so the fees are not taken from that per se. It is the difference of the inputs (sum of the UTXO values being spent) and the outputs of a properly formed transaction that becomes the miner's fee.

> **Comments:**
> **username_2**: Greater or equal. Fees are not a consensus rule.  
> **username_3**: Or put otherwise: the transaction itself commits to turning some of its input values into fees. Miners are allowed to take it, but they take it from the amount redirected to fees by transactions already - they don't modify the transaction in doing so.  

---

