Emission:calculateEmission Rounding Error in Calculating Emission of Mento Token for specific emission Target
ParthMandale
High
Emission:calculateEmission Rounding Error in Calculating Emission of Mento Token for specific emission Target
Summary
The calculateEmission function in the Emission.sol contract suffers from a rounding error due to integer division not being precise enough, potentially leading to incorrect emission amounts.
Vulnerability Detail
Loss of precision due to integer division without proper scaling.
ParthMandale
medium
Emission:calculateEmission
Rounding Error in Calculating Emission of Mento Token for specific emission TargetParthMandale
High
Emission:calculateEmission
Rounding Error in Calculating Emission of Mento Token for specific emission TargetSummary
The
calculateEmission
function in the Emission.sol contract suffers from a rounding error due to integer division not being precise enough, potentially leading to incorrect emission amounts.Vulnerability Detail
Loss of precision due to integer division without proper scaling.
Impact
This will result in emitting slightly more or fewer tokens than intended, leading to an inaccurate total supply over time.
Code Snippet
https://github.com/sherlock-audit/2024-02-mento/blob/main/mento-core/contracts/governance/Emission.sol#L124
Tool used
Manual Review
Recommendation