Proof Ledger

(Verification Surface)

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.


totalWeight

Represents total accounting weight minted in the system.

Distribution is proportional:


rewardDebt

Each address maintains:

This prevents double-claiming.

When weight is minted or claim occurs, rewardDebt is updated.


II. Distribution Formula

Claimable amount is derived from:

Where:

  • weight = weightOf(user)

  • rewardDebt = previous claimed baseline

No other variables influence distribution.


III. Accrual Mechanism

During recycle execution:

  1. Native is routed via router

  2. Recycle rail portion increases

  3. accNativePerWeight increases proportionally:

This ensures:

• Distribution proportional to weight • No rounding drift accumulation • No manual allocation


IV. Claim Process

To retrieve accrued native:

Steps:

  1. Compute pending amount

  2. Update rewardDebt

  3. Transfer native

  4. Emit event:

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.


VI. Invariants

The Proof Ledger enforces the following invariants:

  1. Total distributed native equals cumulative recycle rail.

  2. No user can claim more than proportional weight.

  3. No user can claim twice for the same accrual.

  4. accNativePerWeight is monotonic.

  5. rewardDebt always reflects last settled state.

These invariants are verifiable via:

  • Event logs

  • State reads

  • Historical replay


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:

  1. Retrieve accNativePerWeight

  2. Retrieve weightOf(user)

  3. Retrieve rewardDebt(user)

  4. Apply formula

  5. 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