Closed sherlock-admin3 closed 1 month ago
1 comment(s) were left on this issue during the judging contest.
0xmystery commented:
invalid because getPendingPoints() will not practically be used till point farming has ended. The higher precision adopted is by design
ArsenLupin
high
Inflated amount of points will be received in the _pendingPoints
Summary
The _pendingPoints function, doesn't handle the decimals correctly, thus it results in the inflated amount of pending points returned
Vulnerability Detail
Last minutes of contest. Sorry, could PoC if necessary
Assume as an example:
Impact
Inflated amount of pending points will be returned
Code Snippet
https://github.com/sherlock-audit/2024-05-sophon/blob/main/farming-contracts/contracts/farm/SophonFarming.sol#L357-L384
Tool used
Manual Review
Recommendation
Adjust the decimals correctly. Simplify the logic