BA-05 · Intermediate

Transactions, UTXOs, and the mempool

Construct, inspect, price, and debug Bitcoin transactions.

Follow these 13 lessons in order, or choose the topic you need. Each lesson combines an explanation, a worked example and practice inside the Guild.

  1. The UTXO model

    A UTXO is a specific unspent transaction output; transactions consume whole outputs and create new ones.

    35 minutes · Open lesson
  2. Inputs, outputs, and change

    Inputs reference prior outpoints and provide witnesses; outputs assign values to new locking conditions.

    45 minutes · Open lesson
  3. Serialization and txids

    Version, vectors, scripts, sequence, witness, and locktime serialize deterministically; txid and wtxid commit to different data.

    55 minutes · Open lesson
  4. Fees, weight, and vbytes

    Fees equal inputs minus outputs, while feerates use virtual size derived from transaction weight.

    65 minutes · Open lesson
  5. Coin selection

    Wallets trade off fees, privacy, change, consolidation, and future spending cost when selecting UTXOs.

    35 minutes · Open lesson
  6. Mempool policy versus consensus

    Nodes can reject relay or mining of a consensus-valid transaction under local policy without making it invalid forever.

    45 minutes · Open lesson
  7. Confirmations and finality

    Confirmations measure accumulated proof of work after inclusion; required depth depends on value, threat model, and protocol configuration.

    55 minutes · Open lesson
  8. RBF

    Replace-by-fee uses sequence and mempool rules to replace an unconfirmed transaction with a higher-fee conflict.

    65 minutes · Open lesson
  9. CPFP and package economics

    A child can pay enough fee for miners to include a low-fee parent when the package feerate is attractive.

    35 minutes · Open lesson
  10. Timelocks

    nLockTime, sequence, CLTV, and CSV constrain when transactions or spending paths become valid.

    45 minutes · Open lesson
  11. Raw transaction inputs and outputs

    Decode outpoints, ScriptSig, sequence, amounts, ScriptPubKeys, CompactSize lengths, and locktime directly from serialized transaction bytes.

    55 minutes · Open lesson
  12. Witnesses, wtxids, and block commitments

    Trace witness serialization, txid versus wtxid, the coinbase witness reserved value, and the witness commitment that binds SegWit data into a block.

    65 minutes · Open lesson
  13. The complete mempool lifecycle

    Follow admission, relay, conflicts, RBF replacement, block connection, reorg reconsideration, expiry, size eviction, and local policy differences.

    35 minutes · Open lesson