/ components / alpha / A001-credits_only.component.cspec
A001-credits_only.component.cspec
 1  # A001-credits_only.component.cspec
 2  
 3  metadata:
 4    id: A001
 5    name: credits_only
 6    version: 1.1.0
 7    domain: alpha
 8    stability: high_change
 9    updated: 2026-01-15
10    cascade_priority: 20
11    roles:
12      primary: [Arch, Dev]
13      review: [Security]
14    expertise:
15      required: [architecture, security]
16      helpful: [zk_proofs]
17    context_tags: [credits_only, attack_surface, simplification]
18  
19  dependencies:
20    upstream: []
21    downstream: [A004]
22  
23  interface:
24    types_ref: _registry/types.cspec
25    types:
26      AX: alpha_native, decimals:4, microcredits:10000/AX, supply:variable, mint:GOV_only, privacy:zk_full, state:record_utxo
27    functions:
28      credits.alpha: single_program_for_all_credit_operations
29    events:
30      - credit_transfer
31      - credit_mint
32      - credit_burn
33  
34  spec:
35    design:
36      program: credits.alpha
37      deployment: governor_gated  # Requires 90% governor approval
38      rationale: [attack_surface_reduction, formal_verification_feasible, prover_optimization, no_gas_complexity]
39  
40    # === DEPLOYMENT MODEL ===
41    deployment_model:
42      user_deployment: disabled  # No arbitrary user contract deployment
43      governor_deployment:
44        enabled: true
45        approval_threshold: 90%  # Same as software_updates
46        quorum: 67%
47        timelock: 7d
48        process:
49          - governor_submits_contract_deployment_proposal
50          - includes: [contract_source, audit_report, security_rationale]
51          - 90%_governors_must_approve
52          - 7_day_timelock
53          - deployment_executed_by_consensus
54  
55      genesis_contracts:
56        - credits.alpha     # Native token operations
57        - governance.alpha  # Governor voting
58        - rewards.alpha     # Validator/prover rewards
59        - fees.alpha        # Fee collection
60        - clp.alpha         # Continuous liveness proofs
61  
62      deployable_contracts:
63        examples:
64          - name_service.alpha  # If needed on Alpha (currently Delta)
65          - recovery.alpha      # Social recovery if needed
66        requirement: governor_proposal_with_90%_approval
67  
68    security_gains:
69      - single_audited_program_at_genesis
70      - no_untrusted_user_code
71      - new_contracts_require_90%_governor_approval
72      - eliminates: [reentrancy, logic_bombs, arbitrary_execution]
73  
74    simplification:
75      instructions: 13  # vs 85+ in full Aleo
76      types: 5          # vs 20+ in full Aleo
77      codebase_reduction: 60%
78  
79  changelog:
80    - version: 1.1.0
81      date: 2026-01-15
82      type: feature
83      description: "Added governor-gated deployment model (90% approval for new contracts)"
84      breaking: false
85  
86    - version: 1.0.0
87      date: 2026-01-07
88      type: initial
89      description: "Migrated from alpha_chain.cspec"
90      breaking: false