Skip to content

Instantly share code, notes, and snippets.

@kdmukai
Last active August 22, 2025 14:45
Show Gist options
  • Save kdmukai/f16d332a499b7b6b8666aacd7a4354cc to your computer and use it in GitHub Desktop.
Save kdmukai/f16d332a499b7b6b8666aacd7a4354cc to your computer and use it in GitHub Desktop.
Power Law & Power Law Floor calculations
"""
This script calculates the Power Law and PL Floor projections for the
last day of each year through 2040.
---
Power Law:
1.0117e-17 * (days since genesis block)^5.82
Power Law Floor:
(power law) * 0.42
Model projections said to be invalid beyond 2040.
"""
from datetime import date
from decimal import Decimal
genesis = date.fromisoformat('2009-01-03')
title = "Power law & power law floor at end of year:"
print(title)
print("-" * len(title))
for year in range(date.today().year, 2041):
target_date = date(year, 12, 31)
days_since_genesis = (target_date - genesis).days
power_law = Decimal(Decimal('1.0117e-17') * Decimal(Decimal(days_since_genesis)**Decimal('5.82'))).quantize(Decimal('1.00'))
power_law_floor = (power_law * Decimal('0.42')).quantize(Decimal('1.00'))
print(f"{year} | {int(power_law):9,} | {int(power_law_floor):9,}")
"""
Power law & power law floor at end of year:
-------------------------------------------
2025 | 120,009 | 50,404
2026 | 167,365 | 70,293
2027 | 229,248 | 96,284
2028 | 309,231 | 129,877
2029 | 410,744 | 172,512
2030 | 538,425 | 226,138
2031 | 697,355 | 292,889
2032 | 893,904 | 375,439
2033 | 1,133,542 | 476,087
2034 | 1,424,098 | 598,121
2035 | 1,773,791 | 744,992
2036 | 2,193,032 | 921,073
2037 | 2,689,722 | 1,129,683
2038 | 3,276,159 | 1,375,987
2039 | 3,964,739 | 1,665,190
2040 | 4,771,455 | 2,004,011
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment