freecoding.school100% FREE · NO SIGNUP
Ledger LandISSUE #19 of 90

transactions · inputs · outputs · fees

BlockyVSDouble-Spend Dan
Blocky saysA transaction moves value or triggers a contract, paying a fee for inclusion.

A transaction specifies sender, recipient, amount/data, a nonce (ordering/replay protection), and a fee that pays the block producer. It must be signed by the sender's private key. Bitcoin models value as unspent outputs (UTXOs); Ethereum uses account balances. Either way, fees ration limited block space — pay more to be included sooner.

Power-ups you unlock

Double-Spend Dan attacks — common mistakes

Boss battleList the fields a transaction needs and why the nonce matters.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>{ from, to, value, nonce, fee, signature }
nonce: ordering + replay protection
fee: bids for limited block space</pre></body></html>
▶ Open the interactive comic issue
‹ Mempool · The Pending PoolBitcoin · The First Blockchain ›