TERM_DEF // BITCOIN_BASICS / TRANSACTION
TRANSACTION
Transaction. A signed message that spends one or more existing UTXOs and creates new ones, transferring value on the ledger.
This page sits in the Bitcoin Basics section — The vocabulary you meet on day one — what Bitcoin is and the pieces that make it move. Read on for what it is, why it exists, how it works under the hood, and what to watch out for.
This page sits in the Bitcoin Basics section — The vocabulary you meet on day one — what Bitcoin is and the pieces that make it move. Read on for what it is, why it exists, how it works under the hood, and what to watch out for.
WHAT_TRANSACTION_IS
Transaction — at a glance
BITCOIN BASICS
A Bitcoin transaction is a signed message that destroys one or more existing UTXOs (the inputs) and creates one or more new UTXOs (the outputs). The transaction itself is just a few hundred bytes of binary data — but those bytes encode the entire spending authorisation, recipient addresses, and the implicit fee paid to the miner who includes it in a block.
Why it exists
DESIGN
Bitcoin has no concept of account balances. Coins exist only as UTXOs — locked outputs waiting to be spent. A transaction is the mechanism for moving value: it provides cryptographic proof that the spender controls the keys for the inputs, specifies the new locks for the outputs, and lets every node/">full node verify the transfer independently. No central ledger, no rollback, no permission needed.
HOW_IT_WORKS
Mechanism
HOW IT WORKS
Mechanically, a transaction is a deterministic serialisation: version, input count, inputs (each pointing at a prevout txid + vout, plus a script or witness providing the unlock data), output count, outputs (each with a satoshi amount + a scriptPubKey lock), and a locktime. The transaction id (txid) is the SHA256(SHA256(serialised tx)) — so any change to any byte produces a different id.
1. Wallet selects UTXOs whose total value covers (amount + fee).
2. Wallet builds the unsigned tx: version, inputs (prevout pointers, empty scriptSig), outputs (value + scriptPubKey), locktime.
3. For each input: compute the sighash (which parts of the tx the signature commits to — controlled by the SIGHASH flag).
4. Sign each sighash with the right private key. Place the signature(s) in scriptSig (legacy) or witness (SegWit/Taproot).
5. Broadcast the signed tx via P2P. Peers verify scripts + signatures + double-spend rules before relaying.
6. A miner includes it in a block (~10 min later); each subsequent block adds 1 confirmation.
WORKED_EXAMPLE
A 1-input → 2-output transaction, byte by byte
EXAMPLE
Field Hex (little-endian where applicable)
─────────────────────────────────────────────────────────────────────────
version 01000000 (version 1, 4 bytes)
input_count 01 (CompactSize: 1 input)
prev_txid 7b1eabe0209b1fe794124575ef807057 (32 bytes, the UTXO being spent)
c3f9895dd3e9d775e7d62cf5d2f50e
vout 00000000 (which output of that tx — index 0)
script_len 8b (scriptSig is 139 bytes)
scriptSig 48304502... (signature + pubkey)
sequence ffffffff (final / no relative-timelock)
output_count 02 (2 outputs)
value 404b4c0000000000 (5,000,000 sats = 0.05 BTC)
pk_script_len 19 (P2PKH = 25 bytes)
scriptPubKey 76a914a45..88ac (OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG)
value 80969800 00000000 (10,000,000 sats = 0.1 BTC, change)
pk_script_len 19
scriptPubKey 76a91488ac
locktime 00000000 (spend any time)
txid = SHA256(SHA256(entire serialised tx)) → 32-byte unique identifier
KEY_PROPERTIES
ATOMIC
A transaction is either fully accepted into a block or fully rejected. There is no partial spend.
IMMUTABLE INPUTS
IDENTIFIED BY TXID
The txid is the double-SHA-256 of the serialised tx — change anything, get a new id. SegWit segregates witness data from this hash.
IRREVERSIBLE AFTER 6
After ~6 confirmations (~1 hour), reversing the tx would require redoing more PoW than the honest network produces.
COMMON_PITFALLS
Things that catch people out
PITFALLS
- address-reuse/">Address reuse degrades privacy — every reuse links more of your UTXOs together publicly. Modern wallets generate a fresh address per receive.
- Fee estimation matters: under-pay → tx sits in mempool for hours; over-pay → tip miners more than necessary. Use a mempool-aware fee estimator.
- "Change outputs" must go back to a fresh address you control. A missing change output sends the difference to the miner as fee — a known footgun.
- RBF (Replace-By-Fee, BIP-125) lets you re-broadcast a tx with a higher fee. Useful for stuck txs but means a 0-confirmation tx is never truly final.
WHERE_YOU'LL_SEE_IT
Pages on this site that cover Transaction in more depth:
RELATED_CONCEPTS
Other terms from Bitcoin Basics — click any to read its page:
TERMINOLOGY_INDEX
TERMINOLOGY
Transaction
A signed message that spends one or more existing UTXOs and creates new ones, transferring value on the ledger.
Bitcoin
A peer-to-peer-p2p/">peer-to-peer digital cash system where coins are entries in a public ledger that anyone can verify and no one controls.
BTC
The ticker symbol for one bitcoin; one BTC equals 100,000,000 satoshis, the smallest divisible unit.
Satoshi (unit)
The smallest unit of bitcoin (1 sat = 0.00000001 BTC); all on-chain amounts are stored as integer satoshis to avoid floating-point errors.
Satoshi Nakamoto
The pseudonymous author of the 2008 Bitcoin whitepaper and the original Bitcoin software; their identity remains unknown.
Blockchain
An append-only chain of blocks where each block commits to the previous one via its hash, making history tamper-evident.
Decentralization
No single party can change the rules or freeze funds, because thousands of independent nodes each validate every transaction themselves.
Peer-to-peer (P2P)
A network where every participant talks directly to other participants, with no central server in the middle.