The city of Oakhaven didn’t have a bank; it had the Facility of Redemption
units ≤ available_balance.-- Validation Step 1: Does the code exist in the database?
local rewardData = RedemptionDatabase[upperCode]
User Request → API Gateway → Redemption Script → Validation Engine →
Pricing Module → Ledger Update → Payout Trigger → Confirmation
amount = calculate_redemption(shares, fmv, debt, discount)
- Key: The Code (e.g., "SUMMER2024").
- Value: The Reward (e.g., Item ID "Sword_01" or Amount "500").