30818 - [SC - Low] division before multiplication in theamountToRa...
Description
Brief/Intro
Vulnerability Details
function amountToRagequit(uint256 _tokenId) public view returns (uint256) {
// amount of flux earned in one epoch
uint256 oneEpochFlux = claimableFlux(_tokenId);
// total amount of epochs in fluxMultiplier amount of years
uint256 totalEpochs = fluxMultiplier * ((MAXTIME) / EPOCH); //@audit we div before mul
// based on one epoch, calculate total amount of flux over fluxMultiplier amount of years
uint256 ragequitAmount = oneEpochFlux * totalEpochs;
return ragequitAmount;
}Impact Details
Recommend
Proof of Concept
Previous30814 - [SC - Critical] Wrong calculation of boost amount in VoterpokeNext30825 - [SC - Critical] Users can get unlimited amounts of Flux tokens
Last updated
Was this helpful?