Mimo DeFi contest - 0x1f8b'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: 10/43

Findings: 3

Award: $1,259.52

🌟 Selected for report: 1

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: 0x1f8b

Also found by: broccolirob, pauliax

Labels

bug
2 (Med Risk)
sponsor confirmed

Awards

1119.4434 USDC - $1,119.44

External Links

Lines of code

https://github.com/code-423n4/2022-04-mimo/blob/b18670f44d595483df2c0f76d1c57a7bfbfbc083/core/contracts/oracles/GUniLPOracle.sol#L47 https://github.com/code-423n4/2022-04-mimo/blob/b18670f44d595483df2c0f76d1c57a7bfbfbc083/core/contracts/oracles/GUniLPOracle.sol#L51

Vulnerability details

Impact

It is possible to produce underflows with specific tokens which can cause errors when calculating prices.

Proof of Concept

The pragma is pragma solidity 0.6.12; therefore, integer overflows must be protected with safe math. But in the case of GUniLPOracle, there is a decimal subtraction that could underflow if any token in the pool has more than 18 decimals. this could cause an error when calculating price values.

Ensure that tokens have less than 18 decimals.

#0 - m19

2022-05-05T08:27:39Z

We confirm this issue

Awards

89.0354 USDC - $89.04

Labels

bug
QA (Quality Assurance)

External Links

  1. It was found some transfer, approve and transferFrom without checking the boolean result, ERC20 standard specify that the token can return false if this call was not made, so it's mandatory to check the result of these methods.

Awards

51.0404 USDC - $51.04

Labels

bug
G (Gas Optimization)

External Links

  1. Gas saving using immutable. It's possible to avoid storage access a save gas using immutable keyword for the following variables:
  1. Change the incremental logic from i++ to ++i in order to save some opcodes:
  1. It's possible to safe gas updating the outdated contract ABDKMath64x64, there are a lot of optimizations with unchecked regions.
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