Skip to content

[vault-contract] Fix overflow in TotalTokensRedeemed #26

@Villarley

Description

@Villarley

Based on SECURITY_AUDIT_VAULT_CONTRACT-V1.0.0.md (finding F-05).

Severity: High

Summary

Use checked_add for total_redeemed + token_balance (line 198).

Acceptance criteria

  • Use checked_add and propagate ContractError::ArithmeticOverflow on overflow
  • Tests pass
  • Scout no longer reports overflow at line 198

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions