Vulnerability Pattern: Coding Mistake
Severity: Low
Ecosystem: Sui
Protocol: Magma Finance
Auditor: Zellic
Report: https://github.com/Zellic/publications/blob/master/Magma%20Finance%20-%20Zellic%20Audit%20Report.pdf
Report Date: Jan 2025
Description: In the extract_claimable_for function, it checks if the claimable amount is greater than the DURATION. The DURATION is set to 7 * 86400, which is irrelevant to the claimable amount.
Impact:
Rewards below the DURATION value cannot be claimed, which may prevent reward distribution in certain scenarios.
Recommendation: Remove the check.
Coding/Auditing Tip: Look out for useless assertions.


