MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: low
Invalid

Lack of validations on `thirdPeriodReward_` can alter reward distribution

Summary

The LinearDistributionIntervalDecrease library in Solidity calculates rewards over time with linear distribution and interval decrease. Its main function, getPeriodReward, computes rewards based on various parameters like initial amount, decrease amount, and time intervals.

Vulnerability Details

A thorough review revealed a key oversight: the omission of startTime_ in the calculation of thirdPeriodReward_ within the getPeriodReward function. This could result in inaccurate reward calculations for the final part of the distribution period. Additionally, the code's calculations involving divisions and multiplications might suffer from precision loss due to Solidity's integer arithmetic limitations. The library's reliance on block timestamps raises concerns about the potential impact of miner manipulation on these calculations.

Impact

The missing startTime_ parameter could lead to financial discrepancies in reward distribution. Precision issues might cause minor inaccuracies in the rewards, affecting distribution fairness. Reliance on timestamps could introduce vulnerabilities if miner manipulation affects critical calculations.

Tools Used

Manual Review

Recommendations

It's recommended to correct the thirdPeriodReward_ calculation by including startTime_.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.