Platform: Code4rena
Start Date: 28/04/2022
Pot Size: $50,000 USDC
Total HM: 7
Participants: 43
Period: 5 days
Judge: gzeon
Total Solo HM: 2
Id: 115
League: ETH
Rank: 26/43
Findings: 2
Award: $140.08
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Dravee
Also found by: 0x1f8b, 0x4non, 0x52, 0xDjango, AlleyCat, Funen, GalloDaSballo, GimelSec, Hawkeye, MaratCerby, Picodes, berndartmueller, cccz, defsec, delfin454000, dipp, hyh, ilan, joestakey, kebabsec, luduvigo, pauliax, peritoflores, robee, rotcivegaf, samruna, shenwilly, sikorico, simon135, sorrynotsorry, unforgiven, z3s
89.0354 USDC - $89.04
Non Critical
the top comment line should be the same as the others for better readability, so you can make the lines indent.
##Tool Used Manual Review
typo comment oracle
It can be changed into oracle
##Tool Used Manual Review
##Impact Off-chain tools will not work as expected.
##Tool Used Manual Review
##Occurance
IVaultsCore.sol for VaultsCore
Missing Opened
Missing Liquidate https://github.com/code-423n4/2022-04-mimo/blob/b18670f44d595483df2c0f76d1c57a7bfbfbc083/core/contracts/interfaces/IVaultsCore.sol#L17
51.0404 USDC - $51.04
Its cheaper to using type(uint).max instead of using 2**256-1 calculation for unlimited approval
##Tools Used Manual Review
##Recommended Mitigation
uint256 private constant MAX_INT = type(uint).max;
##Occurances VaultsCore#L23 InceptionVaultsCore#L23 PARMinerV2.sol#L58
= 0
If a variable was not set/initialized, it is assumed to have default value to 0
this implementation was used for saving more gas by removing = 0
##TOOLS USED Manual Review
##Mitigation Step
Remove = 0
this implementation below can be used for saving more gas. since it called once, so you dont need to declare _accAmountPerShare
for userInfo.accParAmountPerShare
. it can be directly into userInfo.accAmountPerShare
.
##Tool Used Manual Review
##Recommended Mitigation
userInfo.accAmountPerShare = _accAmountPerShare; userInfo.accParAmountPerShare = _accParAmountPerShare;
changed to
userInfo.accParAmountPerShare = userInfo.accAmountPerShare