Open this lesson in your favourite AI. It'll walk you through the why, explain the demo, and quiz you on the try-it list.
Bitcoin's monetary policy is fixed in code: 50 BTC reward per block, halving every 210,000 blocks (~4 years). The total supply asymptotes to 21 million BTC around year 2140. Understanding the supply curve and the security budget (what miners earn) is essential for reasoning about Bitcoin's long-term economics.
Supply curve.
Use these three in order. Each builds on the one before.
In one paragraph, explain Bitcoin's supply schedule.
Walk me through the security budget question post-halving.
What economic mechanisms might emerge to compensate for shrinking block rewards? Argue for and against fee-based security.
# Bitcoin halving schedule
HALVING_INTERVAL = 210_000 # blocks
INITIAL_REWARD = 50 # BTC
def block_reward(height: int) -> float:
halvings = height // HALVING_INTERVAL
if halvings >= 33:
return 0 # Reward floor: after 33 halvings, reward is below 1 sat
return INITIAL_REWARD / (2 ** halvings)
def total_supply_at_block(height: int) -> float:
total = 0.0
for h in range(0, height + 1, HALVING_INTERVAL):
end = min(h + HALVING_INTERVAL, height + 1)
total += block_reward(h) * (end - h)
return total
# Key milestones:
print(f"Block 0: reward = {block_reward(0)} BTC")
print(f"Block 210,000 (2012): reward = {block_reward(210_000)} BTC") # 25
print(f"Block 420,000 (2016): reward = {block_reward(420_000)} BTC") # 12.5
print(f"Block 630,000 (2020): reward = {block_reward(630_000)} BTC") # 6.25
print(f"Block 840,000 (2024): reward = {block_reward(840_000)} BTC") # 3.125
print(f"Block 1,050,000 (2028): reward = {block_reward(1_050_000)} BTC") # 1.5625
print(f"")
print(f"Supply at block 1,000,000: {total_supply_at_block(1_000_000):,.2f} BTC")
print(f"Final supply: ~20,999,999.97 BTC (asymptotic)")
print(f"")
# Security budget = miner_revenue (block reward + fees)
# As reward shrinks, fees must replace it for security to remain robust.
# Current: ~3.125 BTC reward + ~0.5 BTC fees per block (Apr 2025)
# Year 2028 onwards: fees need to be a larger fraction of total miner revenue.