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
Acceptance Criteria
Estimated Time
1-3 days
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