Open code423n4 opened 3 years ago
Confirmed, but we will be using the OpenZeppelin library to replace this function anyway.
Agree with the warden, as per: https://github.com/crytic/evm-opcodes MOD will cost 5 gas which is the same cost as one division
Handle
cmichel
Vulnerability details
PoolFactory.uint2str
computesi % 10
asuint8(_i - (_i / 10) * 10)
. This intuitively seems more gas-expensive than doingi % 10
. Consider usingi % 10
instead which also makes the code simpler to read.