ENS contest - ElKu's results

Decentralised naming for wallets, websites, & more.

General Information

Platform: Code4rena

Start Date: 12/07/2022

Pot Size: $75,000 USDC

Total HM: 16

Participants: 100

Period: 7 days

Judge: LSDan

Total Solo HM: 7

Id: 145

League: ETH

ENS

Findings Distribution

Researcher Performance

Rank: 65/100

Findings: 2

Award: $118.73

🌟 Selected for report: 0

🚀 Solo Findings: 0

Use unchecked arithmetic for arithmetical operations which will never overflow or underflow.

This includes the increment of the loop indices, which most probably will never overflow.

  1. for (uint idx = 0; idx < shortest; idx += 32)
  2. for(uint i = 0; i < len; i++)
  3. for(uint256 idx = off; idx < off + len; idx++)
  4. len % 8 in these if-else statements can be pre computed to save gas.
  5. for(uint i = 0; i < input.length; i++)
  6. idx += labelLen + 1;
  7. offset += labelLen + 1;
  8. count += 1;
  9. counts -= 1;
  10. return off + 1 + body.readUint8(off);
  11. for(uint i = 0; i < data.length + 31; i += 32)
  12. uint unused = 256 - (data.length - i) * 8;
  13. for (uint256 i = 0; i < data.length; i++)
  14. The whole of for loop block can be placed inside unchecked.
  15. for (uint256 i = 0; i < accounts.length; ++i)
  16. for (uint256 i = 0; i < ids.length; ++i)
  17. This calculation: (8 * (32 - shortest + idx)) can be placed inside an unchecked variable. But you would need to declare a temporary variable to hold the value.
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