Open code423n4 opened 2 years ago
WatchPug
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/TroveManagerRedemptions.sol#L440-L440
uint256 redeemedYUSDFraction = _YUSDDrawn.mul(10**18).div(_totalYUSDSupply);
10 ** 18 can be changed to 1e18 to avoid unnecessary arithmetic operation and save gas.
10 ** 18
1e18
Duplicate #16
Taking as main
Handle
WatchPug
Vulnerability details
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/TroveManagerRedemptions.sol#L440-L440
10 ** 18
can be changed to1e18
to avoid unnecessary arithmetic operation and save gas.