1.2 Proof Ledger
The Proof Ledger defines how native value is distributed proportionally and deterministically among weight holders.
Distribution does not depend on discretion.
It depends entirely on ledger state.
I. Core Accounting Variables
The RecyclingEngine maintains:
accNativePerWeight
totalWeight
rewardDebt(address)
weightOf(address)
These variables define the complete distribution model.
accNativePerWeight
accNativePerWeight represents the accumulated native value per unit of weight.
It increases when native value is routed to the recycle rail.
It never decreases.
It is scaled by:
This prevents precision loss.
Represents total accounting weight minted in the system.
Distribution is proportional:
Each address maintains:
This prevents double-claiming.
When weight is minted or claim occurs, rewardDebt is updated.
Claimable amount is derived from:
Where:
rewardDebt = previous claimed baseline
No other variables influence distribution.
III. Accrual Mechanism
During recycle execution:
Native is routed via router
Recycle rail portion increases
accNativePerWeight increases proportionally:
This ensures:
• Distribution proportional to weight
• No rounding drift accumulation
• No manual allocation
IV. Claim Process
To retrieve accrued native:
Steps:
If transfer fails:
Transaction reverts.
No partial payout.
V. Pending vs Claimable
Two read functions exist:
Both return the native amount available for claim.
They are read-only projections based on current ledger state.
The Proof Ledger enforces the following invariants:
Total distributed native equals cumulative recycle rail.
No user can claim more than proportional weight.
No user can claim twice for the same accrual.
accNativePerWeight is monotonic.
rewardDebt always reflects last settled state.
These invariants are verifiable via:
VII. No Hidden Allocation
The Proof Ledger does not:
• Allocate bonuses
• Apply multipliers
• Provide referral overrides
• Perform discretionary distributions
All distribution originates from:
Recycle execution activity.
VIII. Precision and Scaling
ACC_SCALE exists to prevent integer truncation during division.
It ensures:
High precision accumulation
Fair proportionality across many users
Minimal rounding error drift
Distribution math is bounded and deterministic.
IX. Ledger Audit Method
To independently audit distribution:
Retrieve accNativePerWeight
Retrieve rewardDebt(user)
Compare to claimable(user)
Results must match.
If not, transaction history can be replayed block by block.
No hidden state exists outside contract storage.
Last updated