Skip to content

Comments

feat: implement safe math wrapper for proportion calculations (#304)#352

Merged
Yunusabdul38 merged 1 commit intoWeb3Novalabs:mainfrom
Ndifreke000:main
Feb 21, 2026
Merged

feat: implement safe math wrapper for proportion calculations (#304)#352
Yunusabdul38 merged 1 commit intoWeb3Novalabs:mainfrom
Ndifreke000:main

Conversation

@Ndifreke000
Copy link
Contributor

Closes #304

  • Add SafeMath module with fixed-point arithmetic
  • Implement safe percentage and proportion calculations
  • Add three rounding modes: ProtocolFavor, Neutral, UserFavor
  • Include overflow/underflow protection
  • Add comprehensive unit tests (12 tests)
  • Add usage examples for real-world scenarios (9 examples)
  • All tests passing, clippy clean, formatted

…valabs#304)

- Add SafeMath module with fixed-point arithmetic
- Implement safe percentage and proportion calculations
- Add three rounding modes: ProtocolFavor, Neutral, UserFavor
- Include overflow/underflow protection
- Add comprehensive unit tests (12 tests)
- Add usage examples for real-world scenarios (9 examples)
- All tests passing, clippy clean, formatted
@vercel
Copy link

vercel bot commented Feb 21, 2026

@Ndifreke000 is attempting to deploy a commit to the shola's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@Yunusabdul38 Yunusabdul38 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Yunusabdul38 Yunusabdul38 merged commit 2f7cd19 into Web3Novalabs:main Feb 21, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Safe Math Wrapper for Proportion Calculations

2 participants