Closed code423n4 closed 2 years ago
gzeon
To keep the most precision, it is better to mul before div https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/facets/Basket/BasketFacet.sol#L260
return totalSupply.mul(annualizedFee).div(10**18).mul(timePassed).div( 365 days );
to
return totalSupply.mul(annualizedFee).mul(timePassed).div(10**18).div( 365 days );
Duplicate of #155
Handle
gzeon
Vulnerability details
To keep the most precision, it is better to mul before div https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/facets/Basket/BasketFacet.sol#L260
to