Platform: Code4rena
Start Date: 02/08/2022
Pot Size: $50,000 USDC
Total HM: 12
Participants: 69
Period: 5 days
Judge: gzeon
Total Solo HM: 5
Id: 150
League: ETH
Rank: 39/69
Findings: 2
Award: $107.00
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0x1f8b, 0xDjango, 0xNazgul, 0xc0ffEE, 8olidity, Bnke0x0, Chom, CodingNameKiki, Deivitto, Dravee, Funen, JC, JohnSmith, NoamYakov, ReyAdmirado, Rohan16, Rolezn, Sm4rty, SooYa, TomFrenchBlockchain, TomJ, Waze, __141345__, ajtra, ak1, aysha, bin2chen, bobirichman, brgltd, bulej93, c3phas, delfin454000, durianSausage, erictee, fatherOfBlocks, gogo, horsefacts, hyh, ladboy233, mics, natzuu, nxrblsrpr, oyc_109, rbserver, samruna, sikorico, simon135, tofunmi, wagmi
67.7324 USDC - $67.73
It can be deleted since it was not used in the contract
File :
(IAddressProvider .sol & IMIMOProxyRegistry.sol )
used return vaultRatio
instead of (vaultRatio)
for good readibility and code.
@return value was mismatch since it was declared the return was used for vaultRatio, so it can be changed
File :
https://github.com/code-423n4/2022-08-mimo/blob/main/contracts/actions/MIMOFlashloan.sol#L28-L44
🌟 Selected for report: Dravee
Also found by: 0x040, 0x1f8b, 0xDjango, 0xNazgul, 0xSmartContract, 0xc0ffEE, Aymen0909, Bnke0x0, Chom, CodingNameKiki, Deivitto, Fitraldys, Funen, IllIllI, JC, JohnSmith, NoamYakov, ReyAdmirado, Rolezn, TomJ, Waze, ajtra, bearonbike, bobirichman, brgltd, c3phas, durianSausage, fatherOfBlocks, gogo, ignacio, jag, joestakey, ladboy233, mics, oyc_109, rbserver, samruna, sikorico, simon135
39.2722 USDC - $39.27
This implementation below can be set for saving more gas above (± 12 gas) :
address collateralType = vaultsData.vaultCollateralType(vaultId); uint256 collateralBalance = vaultsData.vaultCollateralBalance(vaultId); uint256 collateralValue = priceFeed.convertFrom(collateralType, collateralBalance); uint256 vaultDebt = vaultsData.vaultDebt(vaultId);
// 530726 before changed // 530714 after changed
Another same case occurance :
managedVault.allowedVariation can be store as memory for saving lot of gas (± 12 gas)
Another same case occurance :
>
is cheaper than >=
File :
1e15
, 0.1% to account for rounding