Bitcoin creation is based on the Proof-of-Work (PoW) consensus algorithm, which involves mining—a process where miners solve complex mathematical puzzles to validate transactions and add new blocks to the blockchain.
Bitcoin creation is based on the Proof-of-Work (PoW) consensus algorithm, which involves mining—a process where miners solve complex mathematical puzzles to validate transactions and add new blocks to the blockchain. The key algorithm behind Bitcoin creation includes:
1. Hashing (SHA-256)
Bitcoin uses the SHA-256 (Secure Hash Algorithm 256-bit) cryptographic function.
Miners must find a valid hash (a number) that meets the network's difficulty target by adjusting a variable called the nonce.
The hash function ensures that even a small change in input completely changes the output.
2. Proof of Work (PoW)
Miners compete to find a hash that is lower than or equal to the target set by the network's difficulty level.
This process is computationally intensive and requires massive processing power.
The first miner to solve the puzzle gets the right to add a new block to the blockchain.
3. Block Rewards & Halving
The miner who successfully mines a block gets a block reward (newly minted bitcoins).
Initially, the reward was 50 BTC per block, but it undergoes halving every 210,000 blocks (~4 years):
2012: 25 BTC
2016: 12.5 BTC
2020: 6.25 BTC
2024: 3.125 BTC (next halving expected in April 2024)
4. Difficulty Adjustment
Bitcoin adjusts mining difficulty every 2016 blocks (~2 weeks) to maintain an average block time of ~10 minutes.
If blocks are mined too quickly, difficulty increases; if too slow, difficulty decreases.
5. Limited Supply (21 Million Cap)
Bitcoin has a fixed supply of 21 million coins to prevent inflation.
Once all 21 million bitcoins are mined (expected around 2140), miners will earn transaction fees instead of block rewards.
This combination of hashing, PoW, block rewards, difficulty adjustment, and a finite supply ensures Bitcoin's security, decentralization, and scarcity.