Mimo DeFi contest - GalloDaSballo's results

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

General Information

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

Mimo DeFi

Findings Distribution

Researcher Performance

Rank: 32/43

Findings: 1

Award: $89.04

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

89.0354 USDC - $89.04

Labels

bug
QA (Quality Assurance)
sponsor disputed

External Links

Lines of code

https://github.com/code-423n4/2022-04-mimo/blob/b18670f44d595483df2c0f76d1c57a7bfbfbc083/core/contracts/liquidityMining/v2/DemandMinerV2.sol#L67 https://github.com/code-423n4/2022-04-mimo/blob/b18670f44d595483df2c0f76d1c57a7bfbfbc083/core/contracts/liquidityMining/v2/DemandMinerV2.sol#L90

Vulnerability details

Impact

The functions deposit and withdraw in DemanMinerV2 are not conformant to CEI (Checks Effects Ineractions) as they transfer the token (external call) before performing internal checks and updates.

For this reason, if the contract was setup to use a token with hooks (e.g. ERC777) reEntrancy could be exploited, creating undefined scenarios

Add nonReentrant modifier to these functions

#0 - m19

2022-05-05T07:37:14Z

While the recommended CEI pattern isn't being followed a reentrancy attack is not actually possible, even with an ERC777 token. A reentrancy attack on the withdraw function would only work if the transfer happens between the check and the state update. We also don't see any way a reentrancy on the deposit function is possible.

#1 - gzeoneth

2022-06-05T12:36:43Z

Reentrancy without exploit. Downgrading to Low / QA.

#2 - gzeoneth

2022-06-05T16:30:32Z

Treating as warden's QA report.

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