FactoryDAO contest - ych18's results

The DAO that builds DAOs.

General Information

Platform: Code4rena

Start Date: 04/05/2022

Pot Size: $50,000 DAI

Total HM: 24

Participants: 71

Period: 5 days

Judge: Justin Goro

Total Solo HM: 14

Id: 119

League: ETH

FactoryDAO

Findings Distribution

Researcher Performance

Rank: 51/71

Findings: 2

Award: $108.38

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

3.1753 DAI - $3.18

Labels

bug
duplicate
2 (Med Risk)

External Links

Lines of code

https://github.com/code-423n4/2022-05-factorydao/blob/main/contracts/MerkleDropFactory.sol#L107

Vulnerability details

This issue is omnipresented in the project:

Although the ERC20 standard suggests that a transfer should return true on success, many tokens are non-compliant in this regard (including high profile, like USDT) . In that case, the transfer()/transferFrom() call will revert even if the transfer is successful, because solidity will check that the RETURNDATASIZE matches the ERC20 interface.

Recommendation: Consider using OpenZeppelin’s SafeERC20.

#1 - gititGoro

2022-06-14T01:55:38Z

Changing severity due pool isolation, rewards tokens represent leakage not lost funds and because transfer of deposited funds would fail on deposit.

Findings Information

🌟 Selected for report: reassor

Also found by: IllIllI, VAD37, hyh, kenzo, leastwood, rajatbeladiya, ych18

Labels

bug
duplicate
2 (Med Risk)

Awards

105.1961 DAI - $105.20

External Links

Lines of code

https://github.com/code-423n4/2022-05-factorydao/blob/main/contracts/PermissionlessBasicPoolFactory.sol#L169 https://github.com/code-423n4/2022-05-factorydao/blob/main/contracts/PermissionlessBasicPoolFactory.sol#L282

Vulnerability details

  • Some tokens have a decimals != 18 (including high profile, like USDC where decimals = 6). getMaximumRewards() and getRewards() functions would not calculate the right amount of these tokens because these functions divide the amount of token by 1e18 whereas the tokens with decimals==6 should be divided by 1e6

Recommendation: divide the wei amount of token by 1/e(token.decimals()) to have the correct amount of token.

#1 - gititGoro

2022-06-14T03:16:06Z

#2 - gititGoro

2022-06-14T03:16:37Z

Reducing severity as rewards do not constitute user deposits

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