AbraNFT contest - 0xf15ers's results

A peer to peer lending platform, using NFTs as collateral.

General Information

Platform: Code4rena

Start Date: 27/04/2022

Pot Size: $50,000 MIM

Total HM: 6

Participants: 59

Period: 5 days

Judge: 0xean

Id: 113

League: ETH

Abracadabra Money

Findings Distribution

Researcher Performance

Rank: 16/59

Findings: 3

Award: $657.08

🌟 Selected for report: 0

🚀 Solo Findings: 0

1. Add zero address check for asset too

2. USE_VALUE2 is declared but not used anywhere inside the contract.

3. The cook() function accepts unbounded arrays as input, which could grow gas cost large to unfit in a single block.

4. The bool return value of variable success is not checked/handled in removeCollateral() of NFTPairWithOracle.sol

#0 - cryptolyndon

2022-05-12T04:58:25Z

Seen. See #30 for 1. Can't argue with 2. 3 is one of many ways to run out of gas using cook()

4 warrants designation as a "proper" issue; duplicate of #21

Awards

44.3166 MIM - $44.32

Labels

bug
G (Gas Optimization)

External Links

1. Make public functions external

  • External functions are cheaper than public functions
  • withdrawFees(), setFeeTo(), init(), updateLoanParams(), etc. are declared as public and not called anywhere within the contract, making them external will save gas

2. Using ++i instead of i++ saves gas

3. Caching array length saves gas in loop

#0 - cryptolyndon

2022-05-14T01:10:08Z

Seen, thanks

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