You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
contracts/PermissionlessBasicPoolFactory.sol
:112 the require() function refunds any left over gas to the user in case it reverts. Calling the function before setting the variables will save the user gas in case the function reverts. I suggest moving the function to line 103.
:185 instead of testing the pool.totalDepositsWei < pool.maximumDepositsWei case each time the deposit() function is ran, I suggest to save the pool state as a boolean, e.g. "bool isFull" which is set to FALSE at initiation and to true within the if loop of line 186
contracts/FixedPricePassThruGate.sol
:51 remove if qualification (is there any reason for the msg.value to be non-zero if it passes the require() on row 48?)
contracts/SpeedBumpPriceGate.sol
:55 change if evaluation from < to <= to save on computations in the case where priceFloor and lastPrice - decay are the same
:77 remove if qualification (is there any reasons for the msg.value to be non-zero if it passes require() on row 67?)
The text was updated successfully, but these errors were encountered:
112: valid
185: this would involve two checks instead of one in the typical case that the pool is not full
51: debatable and duplicate
55: valid, but very unlikely
77: debatable and duplicate
contracts/PermissionlessBasicPoolFactory.sol
:112 the require() function refunds any left over gas to the user in case it reverts. Calling the function before setting the variables will save the user gas in case the function reverts. I suggest moving the function to line 103.
:185 instead of testing the pool.totalDepositsWei < pool.maximumDepositsWei case each time the deposit() function is ran, I suggest to save the pool state as a boolean, e.g. "bool isFull" which is set to FALSE at initiation and to true within the if loop of line 186
contracts/FixedPricePassThruGate.sol
:51 remove if qualification (is there any reason for the msg.value to be non-zero if it passes the require() on row 48?)
contracts/SpeedBumpPriceGate.sol
:55 change if evaluation from < to <= to save on computations in the case where priceFloor and lastPrice - decay are the same
:77 remove if qualification (is there any reasons for the msg.value to be non-zero if it passes require() on row 67?)
The text was updated successfully, but these errors were encountered: