Blockchain Transactions
A transaction is a signed instruction that moves value or triggers a smart contract. Every action on a blockchain starts as a transaction. Learning its parts and journey explains how a network stays accurate without a bank.
Parts of a Transaction
| Part | Meaning |
|---|---|
| Sender | The address that spends the funds |
| Receiver | The address that gets the funds |
| Amount | The value to transfer |
| Fee | A small payment to the miner or validator |
| Signature | Proof that the sender approved the transfer |
| Nonce or input reference | A marker that stops the same transaction from running twice |
Journey of a Transaction
1. Create Wallet builds the message
↓
2. Sign Private key adds the signature
↓
3. Broadcast Wallet sends it to nearby nodes
↓
4. Wait Nodes hold it in the memory pool
↓
5. Validate Miner or validator checks the rules
↓
6. Include The transaction enters a new block
↓
7. Confirm More blocks stack on top
Example: Asha Pays Ravi
Asha owes Ravi 3 coins for a bicycle. She opens her wallet, types Ravi's address, and enters 3 coins. The wallet signs the transaction and sends it out. Nodes check that Asha owns enough coins and that the signature is valid. A miner places the transaction in the next block. Ravi sees the payment as soon as the block appears and trusts it more as new blocks arrive.
Two Ways to Track Balances
UTXO Model
Bitcoin uses unspent transaction outputs. Imagine cash notes in a wallet. Asha holds one 5-coin note and wants to pay 3 coins. The transaction spends the whole 5-coin note, sends 3 coins to Ravi, and returns 2 coins to Asha as change.
Account Model
Ethereum uses accounts that hold balances, much like a bank statement. A transaction subtracts 3 from Asha's balance and adds 3 to Ravi's balance.
| Feature | UTXO Model | Account Model |
|---|---|---|
| Analogy | Cash notes | Bank balance |
| Used by | Bitcoin | Ethereum |
| Strength | Simple parallel checking | Easy smart contract logic |
Confirmations
A block that contains your transaction counts as one confirmation. Each later block adds another. More confirmations make a reversal less likely. Many Bitcoin services wait for six confirmations before they treat a large payment as final. Small payments often need fewer.
The Memory Pool
Every node keeps a waiting area called the mempool. Unconfirmed transactions sit there until a miner picks them up. Miners usually choose transactions with higher fees first. A low fee can leave a transaction waiting for a long time.
Why Transactions Fail
- The sender balance is too low.
- The signature does not match the message.
- The nonce is wrong or repeated.
- The fee is too small for current network traffic.
- A smart contract rejects the request.
Transactions Cannot Be Undone
A confirmed transaction stays on the chain permanently. Nobody can cancel it, not even the developers. Double-check the receiver address before you press send. A single wrong character can send funds to a stranger or to an address that nobody controls.
Key Takeaways
Wallets create and sign transactions. Nodes verify them. Miners or validators bundle them into blocks. Confirmations build trust over time.
