-
Notifications
You must be signed in to change notification settings - Fork 12
Overflow-Safe Stake Accounting & Slashing with Checked i128 Math #42
Copy link
Copy link
Closed
Paranoa-dev/trustflow-contract
#1Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26difficulty: hardHard difficulty issueHard difficulty issueenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededpriority: highHigh priority issueHigh priority issue
Description
Activity
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26difficulty: hardHard difficulty issueHard difficulty issueenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededpriority: highHigh priority issueHigh priority issue
Description
This issue aims to address the implementation of Overflow-Safe Stake Accounting & Slashing with Checked i128 Math.
The core objective is to: Reimplement stake, reward, and slashing accounting using checked i128 arithmetic with saturating/guarded paths so no operation can overflow or silently truncate funds.
By completing this feature, we will ensure that the TrustFlow protocol maintains its high standards for security, usability, and decentralized logic. This issue requires careful attention to the Smart Contracts architecture and adherence to the existing project conventions.
When picking up this issue, please ensure you document any new dependencies or architectural decisions made during development.
Component
Smart Contracts
Difficulty
🔴 Hard
Tasks
soroban-cliusagecargo fmtandcargo clippysoroban contract buildsuccessfully compiles to WASM without bloating sizeAcceptance Criteria
Estimated Time
1-3 days