Mining and staking
How mining works, the mempool, proof of work versus proof of stake, and staking.
Start the chapter5 lessons
Lessons
- 01What is crypto mining?Crypto mining is the work of packing pending transactions into a block, then racing other computers to find a number that makes the block valid. The winner adds the block to the blockchain and collects newly created coins plus the fees inside it. Bitcoin is the best-known coin that is secured this way.
- 02What is a mempool?A mempool is the waiting area for crypto transactions that have been sent but not yet added to a block. Each node keeps its own copy in memory. When blocks are full, miners pick the transactions that pay the highest fee for each unit of space first, so a low-fee payment can wait for hours or longer.
- 03How does Bitcoin mining work?Bitcoin miners build a candidate block, then hash its header over and over, changing a number called the nonce each time. The block counts only when its hash comes out below a target set by the network. Every 2,016 blocks the network resets the target so that blocks keep arriving about every ten minutes.
- 04Proof of work vs proof of stake.Proof of work and proof of stake are two ways for a blockchain to decide who adds the next block. In proof of work, miners spend electricity on a guessing race. In proof of stake, validators lock up the network's own coins as a deposit, get picked in proportion to that stake, and lose part of it if they cheat.
- 05What is staking?Staking is locking up coins on a proof of stake blockchain so they can help secure it. The coins back a validator that proposes and checks blocks, and the network pays rewards in new coins and fees. You can run a validator, delegate to one, or stake through a pool or an exchange, and each route carries its own risks.