Mimo August 2022 contest - Chom'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: 43/69

Findings: 2

Award: $106.78

🌟 Selected for report: 0

🚀 Solo Findings: 0

executeOperation is a crucial function but doesn't emit any events.

executeOperation on all file that require flash loan is a crucial function but doesn't emit any events. It is hard to keep track of the transactions if events aren't emitted.

Missing collateralBalanceBefore > 0 check

depositAndBorrow using collateralBalanceBefore = 0 may cause some problem

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

uint256 collateralBalanceBefore = token.balanceOf(address(this)); token.safeIncreaseAllowance(address(core), collateralBalanceBefore); core.depositAndBorrow(address(token), collateralBalanceBefore, swapAmount);

Add unchecked

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

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

collateralBalanceAfter > flashloanRepayAmount is already checked. No underflow occur on 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