Mimo August 2022 contest - ladboy233's results

Bridging the chasm between the DeFi world and the world of regulated financial institutions.

General Information

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

Mimo DeFi

Findings Distribution

Researcher Performance

Rank: 45/69

Findings: 2

Award: $106.78

🌟 Selected for report: 0

🚀 Solo Findings: 0

Missing 0 address check in the constructor.

https://github.com/code-423n4/2022-08-mimo/blob/eb1a5016b69f72bc1e4fd3600a65e908bd228f13/contracts/actions/MIMOEmptyVault.sol#L25

constructor( IAddressProvider _a, IDexAddressProvider _dexAP, IPool _lendingPool, IMIMOProxyRegistry _proxyRegistry ) MIMOFlashloan(_lendingPool) MIMOSwap(_a, _dexAP) { if (address(_proxyRegistry) == address(0)) { revert CustomErrors.CANNOT_SET_TO_ADDRESS_ZERO(); } proxyRegistry = _proxyRegistry; }

can add zero address for _a, _dexAp, and _lendingPool.

https://github.com/code-423n4/2022-08-mimo/blob/eb1a5016b69f72bc1e4fd3600a65e908bd228f13/contracts/actions/MIMOLeverage.sol#L25

constructor( IAddressProvider _a, IDexAddressProvider _dexAP, IPool _lendingPool, IMIMOProxyRegistry _proxyRegistry ) MIMOFlashloan(_lendingPool) MIMOSwap(_a, _dexAP) { if (address(_proxyRegistry) == address(0)) { revert CustomErrors.CANNOT_SET_TO_ADDRESS_ZERO(); } proxyRegistry = _proxyRegistry; }

can add zero address for _a, _dexAp, and _lendingPool.

https://github.com/code-423n4/2022-08-mimo/blob/eb1a5016b69f72bc1e4fd3600a65e908bd228f13/contracts/actions/MIMORebalance.sol#L25

constructor( IAddressProvider _a, IDexAddressProvider _dexAP, IPool _lendingPool, IMIMOProxyRegistry _proxyRegistry ) MIMOFlashloan(_lendingPool) MIMOSwap(_a, _dexAP) { if (address(_proxyRegistry) == address(0)) { revert CustomErrors.CANNOT_SET_TO_ADDRESS_ZERO(); } proxyRegistry = _proxyRegistry; }

can add zero address for _a, _dexAp, and _lendingPool.

collateralBalanceAfter - flashloanRepayAmount can cached.

https://github.com/code-423n4/2022-08-mimo/blob/eb1a5016b69f72bc1e4fd3600a65e908bd228f13/contracts/actions/MIMOLeverage.sol#L132

if (collateralBalanceAfter > flashloanRepayAmount) { token.safeIncreaseAllowance(address(core), collateralBalanceAfter - flashloanRepayAmount); core.deposit(address(token), collateralBalanceAfter - flashloanRepayAmount); }

collateralBalanceAfter - flashloanRepayAmount appear twices. We can cache the balance difference.

uint256 balanceDifference = collateralBalanceAfter - flashloanRepayAmount

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter