Skip to content

#54 Issue 54: [Security] Guard Against Precision Loss on Micro-Claims #106

@JerryIdoko

Description

@JerryIdoko

Description:
If a user calls claim() every single ledger (every ~5 seconds), integer division truncation might result in them losing tiny fractional amounts of tokens each time. Over a 4-year period, this "dust" accumulates into a significant loss.
Acceptance Criteria:

[ ] Track cumulative_claimed_amount instead of just relying on time elapsed minus previous claims.

[ ] Formula update: Total_Vested = (Elapsed_Time * Total_Allocation) / Total_Duration. Then, Current_Payout = Total_Vested - Cumulative_Claimed.

[ ] Add fuzz tests ensuring no dust is permanently trapped in the contract.
Labels: security, math

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions