Aave Lens contest - d4rk's results

Web3 permissionless, composable & decentralized social graph

General Information

Platform: Code4rena

Start Date: 10/02/2022

Pot Size: $100,000 USDC

Total HM: 13

Participants: 21

Period: 7 days

Judge: leastwood

Total Solo HM: 10

Id: 85

League: ETH

Aave Lens

Findings Distribution

Researcher Performance

Rank: 20/21

Findings: 1

Award: $217.22

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: Dravee

Also found by: 0x0x0x, 0x1f8b, IllIllI, Jujic, csanuragjain, d4rk, defsec, gzeon, nahnah, pauliax, rfa

Labels

bug
G (Gas Optimization)

Awards

217.2215 USDC - $217.22

External Links

Loading the array length here isn't needed as this is already the initial value, which in turn costs extra gas: LensHub.sol::541 - for (uint256 i = 0; i < vars.datas.length; ++i) { PublishingLogic.sol::400 - if (byteHandle.length == 0 || byteHandle.length > Constants.MAX_HANDLE_LENGTH) PublishingLogic.sol::403 - for (uint256 i = 0; i < byteHandle.length; ++i) { InteractionLogic.sol::46 - if (profileIds.length != followModuleDatas.length) revert Errors.ArrayMismatch(); InteractionLogic.sol::47 - for (uint256 i = 0; i < profileIds.length; ++i) {

Initializing variables that have the same default value is unnecessary and costs extra gas. FollowNFT.sol::120 - uint256 lower = 0; FollowNFT.sol::162 - uint256 lower = 0;

SHR opcode uses less gas compared to DIV opcode FollowNFT.sol::134 - uint256 center = upper - (upper - lower) / 2; FollowNFT.sol::176 - uint256 center = upper - (upper - lower) / 2;

#0 - Zer0dot

2022-03-25T18:11:12Z

These are valid (except the 2nd point which appears to be handled by the optimizer) and are already addressed in https://github.com/aave/lens-protocol/pull/80

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