Bitcoin Transactions
Bitcoin Transactions¶
Bitcoin transactions are digital currency transfers conducted through the Bitcoin network.
Bitcoin Transaction Steps¶
-
Create Transaction: Users create transactions using a Bitcoin wallet, specifying inputs, outputs, and transaction fees. The transaction is signed with a private key to ensure its authenticity.
-
Broadcast Transaction: The created transaction is broadcast to other nodes through the Bitcoin network.
-
Verify Transaction: Bitcoin nodes verify whether the transaction is legitimate, including checking signatures and ensuring that inputs have not been double-spent.
-
Inclusion in a Block: Miners include verified transactions in a new block and solve the block's mathematical puzzle using the Proof of Work (PoW) algorithm.
-
Block Confirmation: When a block is successfully mined and added to the blockchain, the transaction is confirmed. Typically, a transaction requires multiple block confirmations (such as 6 confirmations) to be considered secure.

Bitcoin Transaction Structure¶
A Bitcoin transaction consists of the following components:
- Contains one or more inputs: The source of the transaction, i.e., where the bitcoins come from. Inputs reference a previous transaction ID, output index, and unlocking script (also called script signature).
- Contains one or more outputs: Specifies where the bitcoins are being sent. Each output contains a receiving address and the amount of bitcoin being sent.
- The sum of all outputs is slightly less than the sum of all inputs, and the difference represents the implicit transaction fee, incentivizing miners to include the transaction in a block.
Bitcoin Transaction Inputs¶
Transaction inputs mark UTXOs as "to be consumed" by referencing them and provide proof of ownership through an unlocking script (also called script signature). When constructing a transaction, a wallet selects UTXOs it controls with sufficient value to cover the requested payment. Sometimes one UTXO is enough, sometimes more than one is needed. For each UTXO used for payment, the wallet creates an input pointing to that UTXO (setting it as an input) and unlocks it using the unlocking script.
A transaction input contains four parts:
- A transaction ID (transaction hash) referencing the transaction containing the UTXO to be consumed
- An output index (vout), identifying which UTXO from that transaction is being referenced (the first is 0)
- A scriptSig (script signature) that satisfies the UTXO's spending conditions, unlocking it for spending
- A sequence number, currently unused transaction replacement feature, set to 0xFFFFFFFF (4294967295)
Bitcoin Transaction Outputs¶
The fundamental building block of a Bitcoin transaction is the transaction output. Transaction outputs are the indivisible basic units of bitcoin, recorded on the blockchain and recognized as valid by the entire network. Bitcoin full nodes track all findable and spendable outputs, known as "unspent transaction outputs" mentioned above. Every transaction creates outputs, generating a certain number of UTXOs.
A transaction output contains two parts:
- A certain amount of bitcoin, denominated in "satoshis", the smallest unit of bitcoin (1 bitcoin = 100,000,000 satoshis)
- A cryptographic puzzle that determines the conditions required to spend the output. This cryptographic puzzle is also called a locking script, witness script, or scriptPubKey, and this puzzle can only be solved by the recipient
For more about scripts, click here for details.

Bitcoin transactions can be viewed through block explorers (such as Blockchain.info or Blockchair). These tools display detailed information about specific transactions, including inputs, outputs, transaction fees, and confirmation status.