Blockchain.playground
BBitcoinBTC$40,088.10+5.21%
EEthereumETH$2,578.10-3.09%
BBNBBNB$15,236.00+5.21%
BBitcoinBTC$40,088.10+5.21%
EEthereumETH$2,578.10-3.09%
BBNBBNB$15,236.00+5.21%
BBitcoinBTC$40,088.10+5.21%
EEthereumETH$2,578.10-3.09%
BBNBBNB$15,236.00+5.21%

How a Blockchain Transaction Works: Keys, UTXO, Mempool and Mining

When you send cryptocurrency, nobody "debits your account" the way a bank does. A transaction is a signed message saying which coins you're passing to whom. The network checks the signature, queues the transaction, and a miner writes it into a block. Let's go through each step — exactly as it works on our learning network.

Step 1. The wallet: address, public and private key

A wallet isn't a coin vault — it's a pair of keys. The private key is the secret you sign transactions with. The public key is derived from it and lets anyone verify your signature. The address is a shorter identifier derived from the public key — that's what you give to people who send you funds.

Step 2. Where funds come from: the UTXO model

In Bitcoin and in our learning network, a balance isn't stored as a single number. Instead the network tracks unspent transaction outputs — UTXOs. Every incoming transfer to your address is a separate UTXO, like a banknote in your wallet. Your balance is the sum of all your "banknotes".

To pay, you use one or more of those "banknotes" as inputs of a new transaction and create outputs: the amount for the recipient and, if needed, change back to yourself. The used UTXOs are then spent and can't be used again.

Step 3. Signing the transaction

To prove you're allowed to spend those UTXOs, you sign the transaction with your private key. The signature is unique to that transaction: changing the amount or recipient afterwards invalidates it. Yet anyone can verify it using only the public key.

Step 4. The mempool: the waiting line

The signed transaction is broadcast to the network. Nodes check the signature and that the inputs are still unspent, then place it in the mempool — the list of transactions waiting to be included in a block. In the mempool a transaction is already visible but not yet confirmed.

Step 5. Mining and the block

A miner takes transactions from the mempool, builds a block and solves a computational puzzle to earn the right to add it to the chain. The new block contains the previous block's hash, so it becomes part of the network's history. For each block added, the miner gets a reward — on our learning network that's 10 STUFF.

Step 6. Confirmations

Once the block with your transaction is in the chain, the transaction has one confirmation. Each following block adds another, making it ever harder to alter. That's why services usually wait for several confirmations for large amounts.

In short: a transaction's journey

  1. Create a wallet — get an address and a key pair.
  2. Pick unspent outputs (UTXOs) that cover the amount.
  3. Build the transaction: inputs, recipient, change.
  4. Sign it with the private key.
  5. The transaction enters the mempool.
  6. A miner includes it in a block — it's confirmed.

Walk the path yourself

On the learning network you can do all of this by hand: create two wallets, send a transaction between them and find it in the chain of blocks. Want a refresher first? Read what blockchain is in plain English.

Read also

What Is Blockchain? A Plain-English Explanation

Blocks, hashes, nodes and mining — with everyday analogies and no formulas. Then you can try it all on a learning network.

6 min read · Read →