Fees, weight, and vbytes
Terms used in this lesson
- Virtual byte
- A fee-accounting unit derived from Bitcoin transaction weight; fee rates are commonly quoted per virtual byte.
- Witness
- Signatures, scripts, or other data supplied to satisfy a Bitcoin output’s spending condition.
- SegWit
- Segregated Witness: a Bitcoin upgrade that separates authorization data from the transaction identifier and introduces versioned witness programs.
- Proof-of-work target
- The maximum header-hash value accepted for a block; lowering it makes valid hashes harder to find.
Fees equal inputs minus outputs, while feerates use virtual size derived from transaction weight.
Loading lesson visuals...
Learn the idea
A transaction fee is input value minus output value. Transaction weight charges non-witness bytes four weight units and witness bytes one weight unit. Virtual size, or vbytes, is weight divided by four and rounded up. Feerate is fee divided by virtual size, commonly measured in satoshis per vbyte.
Calculate base and total size
Base size is the serialization without SegWit marker, flag, or witness. Total size includes the complete serialized transaction.
Inspect every idea above to open it.
Cost depends on weight composition and chosen feerate. Witness and non-witness bytes contribute different weight.
The questions unlock after every required learning activity
Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.