Skip to content

[SC-HARD-18] Safe Fixed-Point Math & Invariant Bounds Engine #1364

Description

@ayomideadeniran

📋 Hard & Advanced Production Epic

Identifier: SC-HARD-18 | Complexity: Hard / Advanced

⚙️ Specifications & Architectural Breakdown

  • Compounded Sub-Tasks: [Easy: Replace raw + with checked_add] + [Medium: Replace raw * with checked_mul] + [Advanced: Fixed-point math arithmetic library with 18-decimal precision, overflow guards, and explicit typed error reporting].
    • Target Files: contracts/continuous_bonding_curve/src/lib.rs, contracts/lending_pool/src/lib.rs
    • Overview: Replace raw arithmetic operations with audited fixed-point and checked math routines, preventing overflow exploits and integer panics.
    • Acceptance Criteria: Arithmetic calculations never panic in WASM; extreme inputs return typed math error enums.

Generated for Web3 Student Lab Production & MVP Transition.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions