Description
Per spec Phase 11 (T129) and whitepaper, the credit system needs:
- 45-day half-life decay: credits decay with minimum floor protection (
trailing_30d_earn_rate * 30)
- DRF dominant-dimension accounting: multi-dimensional credit computation (compute, memory, storage, network)
- Caliber-class redemption matching: redemption jobs placed on hardware at or above earned class
- Anti-hoarding: if outstanding credits exceed 110% of trailing redemption demand, decay rate increases
Requirements
- Implement CreditDecay LedgerEntry type
- Decay runs on configurable schedule (default: daily)
- Floor protection prevents active donors from losing all credits
- DRF accounting tracks 4 dimensions per credit event
- Caliber matching enforced at scheduler level
- Anti-hoarding mechanism adjusts decay rate dynamically
Success Criteria
Testing (Principle V)
- Simulate 90 days of credit earn/spend → verify decay curve matches 45-day half-life
- Active donor with floor protection → verify minimum balance preserved
- Submit redemption job at C3 caliber → verify placed on C3+ hardware only
- Simulate hoarding scenario → verify increased decay rate activates
Description
Per spec Phase 11 (T129) and whitepaper, the credit system needs:
trailing_30d_earn_rate * 30)Requirements
Success Criteria
cargo testpassesTesting (Principle V)