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

Findings: 1

Award: $67.51

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Awards

67.5073 USDC - $67.51

Labels

bug
disagree with severity
QA (Quality Assurance)
old-submission-method

External Links

Lines of code

https://github.com/code-423n4/2022-08-mimo/blob/eb1a5016b69f72bc1e4fd3600a65e908bd228f13/contracts/proxy/MIMOProxyRegistry.sol#L49-L51

Vulnerability details

Impact

In MIMOProxyRegistry.deployFor() function, anyone can call to deploy for other users. And if the proxy already exists, it will revert instead of returning the existing one.

if (address(currentProxy) != address(0) && currentProxy.owner() == owner) {
  revert CustomErrors.PROXY_ALREADY_EXISTS(owner);
}

Attacker can front-run users when users try to deploy proxy, make the transaction of users revert. Users still get their proxy but it shows transaction reverted on UI, block explorer,... and affect user experience.

Proof of Concept

Consider the scenario

  1. Alice called MIMOProxyRegistry.deploy() to deploy her own MIMOProxy.
  2. Bob front-run Alice by calling MIMOProxyRegistry.deployFor(address(Alice)) and deploy the proxy for Alice.
  3. Transaction of Alice will be reverted because the proxy already exists. She might be confused and affect her experience. Instead we can simply return the existing one for Alice in her transaction.

Tools Used

Manual Review

Consider to return the proxy address if it already exists in MIMOProxyRegistry.deployFor()

if (address(currentProxy) != address(0) && currentProxy.owner() == owner) {
  return currentProxy;
}

#0 - horsefacts

2022-08-08T23:06:10Z

Agree with the narrow finding here, defer on the severity.

#1 - RayXpub

2022-08-10T11:34:38Z

This is more of a UI problem as mentioned, there is no risk of loss for the user and no incentive for an attacker to do so, thus we consider that this issue should be downgraded to QA

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