-
Notifications
You must be signed in to change notification settings - Fork 0
Integer Overflow Checks #12
Copy link
Copy link
Open
Labels
@geevapp/app/wave2Moving to the app repo, as the contracts repo was not accepted for Drips Wave 2Moving to the app repo, as the contracts repo was not accepted for Drips Wave 2
Description
User Story
As a User,
I want to ensure math errors don't lose my money.
Description
Use explicitly checked arithmetic.
Files to Create/Edit
contracts/geev-core/src/
└── mutual_aid.rs
Functional Requirements
- Math: Replace
+withchecked_add. - Math: Replace
-withchecked_sub.
Suggested Implementation
// THROUGHOUT CODE:
// 1. Identify all math operations on i128.
// 2. Replace 'a + b' with 'a.checked_add(b).unwrap_or_else(|| panic!(...))'.
// 3. Define specific error codes for Overflow.Acceptance Criteria
- No raw operators on token amounts.
Submission Guidelines
- Branch:
security/safe-math
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@geevapp/app/wave2Moving to the app repo, as the contracts repo was not accepted for Drips Wave 2Moving to the app repo, as the contracts repo was not accepted for Drips Wave 2