Lens Protocol V2 - fatherOfBlocks's results

An open technology stack, builders can create social front-ends or integrate Lens social capabilities.

General Information

Platform: Code4rena

Start Date: 17/07/2023

Pot Size: $85,500 USDC

Total HM: 11

Participants: 26

Period: 14 days

Judge: Picodes

Total Solo HM: 1

Id: 263

League: ETH

Lens Protocol

Findings Distribution

Researcher Performance

Rank: 9/26

Findings: 1

Award: $31.38

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

31.3772 USDC - $31.38

Labels

bug
grade-b
QA (Quality Assurance)
Q-16

External Links

contracts/libraries/MetaTxLib.sol

  • L169/345/346/347/368/390/391/493 - abi.encodePacked() should not be used with dynamic types when passing the result to a hash function such as keccak256() Use abi.encode() instead which will pad items to 32 bytes, which will prevent hash collisions (e.g. abi.encodePacked(0x123,0x456) => 0x123456 => abi.encodePacked(0x1,0x23456), but abi.encode(0x123,0x456) => 0x0...1230...456). “Unless there is a compelling reason, abi.encode should be preferred”. If there is only one argument to abi.encodePacked() it can often be cast to bytes() or bytes32() instead. If all arguments are strings and or bytes, bytes.concat() should be used instead.

contracts/base/HubRestricted.sol

  • L24 - No validation is performed in the constructor and the HUB variable is immutable, therefore they should be validated before setting the variable to != 0x.

contracts/base/LensImplGetters.sol

  • L11 - No validation is performed in the constructor and the variables are immutables, therefore they should be validated before setting the variable to != 0x.

contracts/base/LensProfiles.sol

  • L33 - No validation is performed in the constructor and the variables are immutables, therefore they should be validated before setting the variable to != 0x.

contracts/misc/ImmutableOwnable.sol

  • L26 - No validation is performed in the constructor and the variables are immutables, therefore they should be validated before setting the variable to != 0x.

  • L26 - You should check that owner != lensHub, otherwise you would enter an incorrect state of the contract.

contracts/misc/LensV2Migration.sol

  • L26/27/28/29/30 - No validation is performed in the constructor and the variables are immutables, therefore they should be validated before setting the variable to != 0x.

contracts/misc/LensV2UpgradeContract.sol

  • L33/34/35 - No validation is performed in the constructor and the variables are immutables, therefore they should be validated before setting the variable to != 0x.

contracts/misc/ProfileCreationProxy.sol

  • L29/30 - No validation is performed in the constructor and the variables are immutables, therefore they should be validated before setting the variable to != 0x.

contracts/misc/access/Governance.sol

  • L16 - No validation is performed in the constructor and the LENS_HUB variable is immutable, therefore they should be validated before setting the variable to != 0x.

contracts/misc/access/ProxyAdmin.sol

  • L17 - No validation is performed in the constructor and the LENS_HUB variable is immutable, therefore they should be validated before setting the variable to != 0x.

contracts/namespaces/TokenHandleRegistry.sol

  • L43/44 - No validation is performed in the constructor and the variables are immutables, therefore they should be validated before setting the variable to != 0x.

#0 - c4-judge

2023-08-28T20:52:31Z

Picodes marked the issue as grade-b

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