2025-08-04 12:45:23 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
"""
|
2025-08-05 21:39:27 +00:00
|
|
|
Currency Ledger Report Generator - Working Version with Real Data Parsing
|
2025-08-04 12:45:23 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
import csv
|
|
|
|
from datetime import datetime
|
|
|
|
import os
|
|
|
|
from collections import defaultdict
|
|
|
|
|
2025-08-05 21:39:27 +00:00
|
|
|
def parse_sc_transactions():
|
|
|
|
"""Parse live SC transactions and calculate totals"""
|
|
|
|
ledger_file = os.path.join(os.path.dirname(__file__), '..', 'ledger', 'smartup-credits', 'transactions.csv')
|
|
|
|
|
|
|
|
total_minted = 0
|
|
|
|
total_redeemed = 0
|
|
|
|
transactions = []
|
|
|
|
|
|
|
|
try:
|
|
|
|
with open(ledger_file, 'r') as f:
|
|
|
|
reader = csv.DictReader(f)
|
|
|
|
for row in reader:
|
|
|
|
# Skip comment lines and empty rows
|
|
|
|
if not row['timestamp'].startswith('#') and row['timestamp'] != '':
|
|
|
|
transactions.append(row)
|
|
|
|
amount = int(row['amount'])
|
|
|
|
if row['type'] == 'SC':
|
|
|
|
total_minted += amount
|
|
|
|
elif row['type'] == 'REDEEM':
|
|
|
|
total_redeemed += amount
|
|
|
|
except FileNotFoundError:
|
|
|
|
pass
|
|
|
|
|
|
|
|
return total_minted, total_redeemed, transactions
|
|
|
|
|
|
|
|
def parse_treasury_balance():
|
|
|
|
"""Parse treasury balance and get latest state"""
|
|
|
|
ledger_file = os.path.join(os.path.dirname(__file__), '..', 'ledger', 'treasury', 'balance.csv')
|
|
|
|
|
|
|
|
latest_balance = {
|
|
|
|
'total_eur_balance': 0,
|
|
|
|
'sc_outstanding': 0,
|
|
|
|
'sc_liability_eur': 0
|
|
|
|
}
|
|
|
|
|
|
|
|
try:
|
|
|
|
with open(ledger_file, 'r') as f:
|
|
|
|
reader = csv.DictReader(f)
|
|
|
|
for row in reader:
|
|
|
|
# Skip comment lines and get latest entry
|
|
|
|
if not row['timestamp'].startswith('#') and row['timestamp'] != '':
|
|
|
|
latest_balance = {
|
|
|
|
'total_eur_balance': float(row['total_eur_balance']),
|
|
|
|
'sc_outstanding': int(row['sc_outstanding']),
|
|
|
|
'sc_liability_eur': float(row['sc_liability_eur'])
|
|
|
|
}
|
|
|
|
except FileNotFoundError:
|
|
|
|
pass
|
|
|
|
|
|
|
|
return latest_balance
|
|
|
|
|
Complete currency ledger system with pending SC validation
MAJOR ACHIEVEMENT: Comprehensive dual-currency system for Smartup Zero
Currency System:
- Smartup Credits (SC): 1 SC = €1 treasury claim for work
- Social Karma (SK): Non-transferable reputation currency
- Git-native ledger with immutable transaction history
- 3x treasury rule prevents SC inflation
Organizational Structure:
- Book of Owners with team memberships and role assignments
- Progressive transparency (public governance, protected development)
- License system with automatic upgrades (Campaign→Watch→Work→Organizational)
Democratic Founder Model:
- 82,200 SC pending validation (representing 10 years R&D work)
- Phased vesting: 30% design, 40% production, 30% organization
- Cannot self-validate - requires Team Captain + community approval
- Success tied to collective achievement, not individual extraction
Technical Implementation:
- Complete policy framework (rates, validation, organizational structure)
- Management scripts for owners, roles, validation, reporting
- Comprehensive documentation and operational guides
- Ready for Engelbot integration and Open Collective sync
This proves Smartup Zero's democratic principles are real and enforceable.
Even founders must earn through validation, not privilege.
2025-08-04 15:16:57 +00:00
|
|
|
def generate_pending_sc_summary():
|
|
|
|
"""Generate pending SC summary report"""
|
|
|
|
print("⏳ PENDING SC SUMMARY REPORT")
|
|
|
|
print("=" * 32)
|
2025-08-04 12:45:23 +00:00
|
|
|
|
Complete currency ledger system with pending SC validation
MAJOR ACHIEVEMENT: Comprehensive dual-currency system for Smartup Zero
Currency System:
- Smartup Credits (SC): 1 SC = €1 treasury claim for work
- Social Karma (SK): Non-transferable reputation currency
- Git-native ledger with immutable transaction history
- 3x treasury rule prevents SC inflation
Organizational Structure:
- Book of Owners with team memberships and role assignments
- Progressive transparency (public governance, protected development)
- License system with automatic upgrades (Campaign→Watch→Work→Organizational)
Democratic Founder Model:
- 82,200 SC pending validation (representing 10 years R&D work)
- Phased vesting: 30% design, 40% production, 30% organization
- Cannot self-validate - requires Team Captain + community approval
- Success tied to collective achievement, not individual extraction
Technical Implementation:
- Complete policy framework (rates, validation, organizational structure)
- Management scripts for owners, roles, validation, reporting
- Comprehensive documentation and operational guides
- Ready for Engelbot integration and Open Collective sync
This proves Smartup Zero's democratic principles are real and enforceable.
Even founders must earn through validation, not privilege.
2025-08-04 15:16:57 +00:00
|
|
|
ledger_file = os.path.join(os.path.dirname(__file__), '..', 'ledger', 'pending-sc', 'transactions.csv')
|
2025-08-04 12:45:23 +00:00
|
|
|
|
2025-08-05 21:39:27 +00:00
|
|
|
total_pending = 0
|
|
|
|
by_tranche = defaultdict(int)
|
|
|
|
|
2025-08-04 12:45:23 +00:00
|
|
|
try:
|
|
|
|
with open(ledger_file, 'r') as f:
|
|
|
|
reader = csv.DictReader(f)
|
|
|
|
for row in reader:
|
2025-08-05 21:39:27 +00:00
|
|
|
if not row['timestamp'].startswith('#') and row['timestamp'] != '':
|
|
|
|
amount = int(row['amount'])
|
Complete currency ledger system with pending SC validation
MAJOR ACHIEVEMENT: Comprehensive dual-currency system for Smartup Zero
Currency System:
- Smartup Credits (SC): 1 SC = €1 treasury claim for work
- Social Karma (SK): Non-transferable reputation currency
- Git-native ledger with immutable transaction history
- 3x treasury rule prevents SC inflation
Organizational Structure:
- Book of Owners with team memberships and role assignments
- Progressive transparency (public governance, protected development)
- License system with automatic upgrades (Campaign→Watch→Work→Organizational)
Democratic Founder Model:
- 82,200 SC pending validation (representing 10 years R&D work)
- Phased vesting: 30% design, 40% production, 30% organization
- Cannot self-validate - requires Team Captain + community approval
- Success tied to collective achievement, not individual extraction
Technical Implementation:
- Complete policy framework (rates, validation, organizational structure)
- Management scripts for owners, roles, validation, reporting
- Comprehensive documentation and operational guides
- Ready for Engelbot integration and Open Collective sync
This proves Smartup Zero's democratic principles are real and enforceable.
Even founders must earn through validation, not privilege.
2025-08-04 15:16:57 +00:00
|
|
|
total_pending += amount
|
2025-08-05 21:39:27 +00:00
|
|
|
tranche = row['vesting_tranche'] or 'immediate'
|
|
|
|
by_tranche[tranche] += amount
|
|
|
|
|
|
|
|
print(f"Total Pending SC: {total_pending:,}")
|
|
|
|
|
|
|
|
if by_tranche:
|
|
|
|
print(f"\n📊 BY VESTING TRANCHE:")
|
|
|
|
for tranche, amount in by_tranche.items():
|
|
|
|
print(f" {tranche}: {amount:,} SC")
|
|
|
|
|
2025-08-04 12:45:23 +00:00
|
|
|
except FileNotFoundError:
|
2025-08-05 21:39:27 +00:00
|
|
|
print("📝 No pending SC transactions")
|
2025-08-04 12:45:23 +00:00
|
|
|
|
|
|
|
def main():
|
2025-08-05 21:39:27 +00:00
|
|
|
"""Generate comprehensive financial report"""
|
|
|
|
|
2025-08-04 12:45:23 +00:00
|
|
|
print("📈 SMARTUP ZERO FINANCIAL REPORTS")
|
|
|
|
print(f"Generated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
|
|
|
|
print("=" * 50)
|
|
|
|
|
2025-08-05 21:39:27 +00:00
|
|
|
# Parse live SC data
|
|
|
|
total_minted, total_redeemed, transactions = parse_sc_transactions()
|
|
|
|
sc_outstanding = total_minted - total_redeemed
|
|
|
|
|
Complete currency ledger system with pending SC validation
MAJOR ACHIEVEMENT: Comprehensive dual-currency system for Smartup Zero
Currency System:
- Smartup Credits (SC): 1 SC = €1 treasury claim for work
- Social Karma (SK): Non-transferable reputation currency
- Git-native ledger with immutable transaction history
- 3x treasury rule prevents SC inflation
Organizational Structure:
- Book of Owners with team memberships and role assignments
- Progressive transparency (public governance, protected development)
- License system with automatic upgrades (Campaign→Watch→Work→Organizational)
Democratic Founder Model:
- 82,200 SC pending validation (representing 10 years R&D work)
- Phased vesting: 30% design, 40% production, 30% organization
- Cannot self-validate - requires Team Captain + community approval
- Success tied to collective achievement, not individual extraction
Technical Implementation:
- Complete policy framework (rates, validation, organizational structure)
- Management scripts for owners, roles, validation, reporting
- Comprehensive documentation and operational guides
- Ready for Engelbot integration and Open Collective sync
This proves Smartup Zero's democratic principles are real and enforceable.
Even founders must earn through validation, not privilege.
2025-08-04 15:16:57 +00:00
|
|
|
print("📊 SMARTUP CREDITS SUMMARY")
|
|
|
|
print("=" * 30)
|
2025-08-05 21:39:27 +00:00
|
|
|
print(f"Total SC Minted: {total_minted:,}")
|
|
|
|
print(f"Total SC Redeemed: {total_redeemed:,}")
|
|
|
|
print(f"SC Outstanding: {sc_outstanding:,}")
|
|
|
|
|
|
|
|
if transactions:
|
|
|
|
print(f"\n📝 RECENT TRANSACTIONS:")
|
|
|
|
for tx in transactions[-3:]: # Show last 3
|
|
|
|
print(f" {tx['timestamp'][:10]} | {tx['amount']} SC → {tx['to']} | {tx['reference']}")
|
|
|
|
else:
|
|
|
|
print("📝 No live SC transactions yet")
|
Complete currency ledger system with pending SC validation
MAJOR ACHIEVEMENT: Comprehensive dual-currency system for Smartup Zero
Currency System:
- Smartup Credits (SC): 1 SC = €1 treasury claim for work
- Social Karma (SK): Non-transferable reputation currency
- Git-native ledger with immutable transaction history
- 3x treasury rule prevents SC inflation
Organizational Structure:
- Book of Owners with team memberships and role assignments
- Progressive transparency (public governance, protected development)
- License system with automatic upgrades (Campaign→Watch→Work→Organizational)
Democratic Founder Model:
- 82,200 SC pending validation (representing 10 years R&D work)
- Phased vesting: 30% design, 40% production, 30% organization
- Cannot self-validate - requires Team Captain + community approval
- Success tied to collective achievement, not individual extraction
Technical Implementation:
- Complete policy framework (rates, validation, organizational structure)
- Management scripts for owners, roles, validation, reporting
- Comprehensive documentation and operational guides
- Ready for Engelbot integration and Open Collective sync
This proves Smartup Zero's democratic principles are real and enforceable.
Even founders must earn through validation, not privilege.
2025-08-04 15:16:57 +00:00
|
|
|
|
|
|
|
print()
|
|
|
|
generate_pending_sc_summary()
|
|
|
|
|
2025-08-05 21:39:27 +00:00
|
|
|
# Parse treasury data
|
|
|
|
treasury = parse_treasury_balance()
|
|
|
|
|
Complete currency ledger system with pending SC validation
MAJOR ACHIEVEMENT: Comprehensive dual-currency system for Smartup Zero
Currency System:
- Smartup Credits (SC): 1 SC = €1 treasury claim for work
- Social Karma (SK): Non-transferable reputation currency
- Git-native ledger with immutable transaction history
- 3x treasury rule prevents SC inflation
Organizational Structure:
- Book of Owners with team memberships and role assignments
- Progressive transparency (public governance, protected development)
- License system with automatic upgrades (Campaign→Watch→Work→Organizational)
Democratic Founder Model:
- 82,200 SC pending validation (representing 10 years R&D work)
- Phased vesting: 30% design, 40% production, 30% organization
- Cannot self-validate - requires Team Captain + community approval
- Success tied to collective achievement, not individual extraction
Technical Implementation:
- Complete policy framework (rates, validation, organizational structure)
- Management scripts for owners, roles, validation, reporting
- Comprehensive documentation and operational guides
- Ready for Engelbot integration and Open Collective sync
This proves Smartup Zero's democratic principles are real and enforceable.
Even founders must earn through validation, not privilege.
2025-08-04 15:16:57 +00:00
|
|
|
print("\n💰 TREASURY HEALTH REPORT")
|
2025-08-05 21:39:27 +00:00
|
|
|
print("=" * 30)
|
|
|
|
print(f"💶 EUR Treasury: €{treasury['total_eur_balance']:.2f}")
|
|
|
|
print(f"🪙 SC Outstanding: {treasury['sc_outstanding']:,} SC")
|
|
|
|
print(f"💸 SC Liability: €{treasury['sc_liability_eur']:.2f}")
|
|
|
|
|
|
|
|
# Calculate 3x rule compliance
|
|
|
|
if treasury['total_eur_balance'] == 0:
|
|
|
|
if treasury['sc_outstanding'] == 0:
|
|
|
|
print("✅ 3x Rule: COMPLIANT (no live SC outstanding)")
|
|
|
|
else:
|
|
|
|
print("⚠️ 3x Rule: PENDING (SC outstanding but no treasury funding yet)")
|
|
|
|
else:
|
|
|
|
ratio = treasury['sc_outstanding'] / (treasury['total_eur_balance'] * 3)
|
|
|
|
if ratio <= 1:
|
|
|
|
print(f"✅ 3x Rule: COMPLIANT ({ratio:.1%} of limit)")
|
|
|
|
else:
|
|
|
|
print(f"❌ 3x Rule: VIOLATION ({ratio:.1%} of limit)")
|
|
|
|
|
|
|
|
# Financial health assessment
|
|
|
|
print(f"\n📊 FINANCIAL HEALTH: {'EXCELLENT' if treasury['sc_outstanding'] <= 1000 else 'GOOD' if treasury['sc_outstanding'] <= 10000 else 'NEEDS_FUNDING'}")
|
|
|
|
if treasury['total_eur_balance'] == 0 and treasury['sc_outstanding'] > 0:
|
|
|
|
print(" • SC holders earning value through effort-based work")
|
|
|
|
print(" • Treasury funding needed for SC redemption capability")
|
2025-08-04 12:45:23 +00:00
|
|
|
|
|
|
|
print("\n" + "=" * 50)
|
|
|
|
print("💡 All ledger data is public and auditable in git history")
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|