Mimo DeFi contest - GimelSec'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: 27/43

Findings: 2

Award: $140.08

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Awards

89.0354 USDC - $89.04

Labels

bug
QA (Quality Assurance)

External Links

(Non-Critical) It’s better to use SafeERC20

Impact

It’s better to use the trusted 3rd party library SafeERC20 to check the return value of transfer.

Proof of Concept

liquidityMining/v2/VotingMinerV2.sol 44: require(_a.mimo().transfer(_user, pendingMIMO), "LM100"); 47: require(_par.transfer(_user, pendingPAR), "LM100"); liquidityMining/v2/GenericMinerV2.sol 220: require(_a.mimo().transfer(_user, pendingMIMO), "LM100"); 223: require(_par.transfer(_user, pendingPAR), "LM100"); liquidityMining/v2/PARMinerV2.sol 320: require(_par.transfer(_user, pendingPAR), "LM100"); 323: require(_a.mimo().transfer(_user, pendingMIMO), "LM100");

Tools Used

vim

Use SafeERC20 rather than checking manually. https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/utils/SafeERC20.sol

Awards

51.0404 USDC - $51.04

Labels

bug
G (Gas Optimization)

External Links

Save gas in for loops by ++i rather than i++

In for loops, using ++i rather than i++ to save gas.

Proof of Concept

core/contracts/inception/AdminInceptionVault.sol 108: for (uint8 i = 1; i < _collateralCount + 1; i++) { core/contracts/dex/DexAddressProvider.sol 16: for (uint256 i; i < dexes.length; i++) {

Recommendation

Use ++i rather than i++ to save gas.

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