Paladin - Warden Pledges contest - emrekocak's results

A governance lending protocol transforming users voting power into a new money lego.

General Information

Platform: Code4rena

Start Date: 27/10/2022

Pot Size: $33,500 USDC

Total HM: 8

Participants: 96

Period: 3 days

Judge: kirk-baird

Total Solo HM: 1

Id: 176

League: ETH

Paladin

Findings Distribution

Researcher Performance

Rank: 83/96

Findings: 1

Award: $11.52

Gas:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Use assembly to check for address(0)

Saves 6 gas per instance if using assembly to check for address(0)
e.g.

assembly {  if iszero(_addr) {   mstore(0x00, "zero address")   revert(0x00, 0x20)  } }

Instances include: contracts/WardenPledge.sol:310 contracts/WardenPledge.sol:460 contracts/WardenPledge.sol:492 contracts/WardenPledge.sol:527 contracts/WardenPledge.sol:571 contracts/WardenPledge.sol:586 contracts/WardenPledge.sol:600

Write direct outcome, instead of performing mathematical operations 

Instances include:
contracts/WardenPledge.sol:24

instead of using this:

uint256 public constant WEEK = 7 * 86400;

use this:

uint256 public constant WEEK = 604800; // 7 * 86400

DUPLICATED REQUIRE()/REVERT() CHECKS SHOULD BE REFACTORED TO A MODIFIER OR FUNCTION

Error instances: NotAllowedToken() NotPledgeCreator() ExpiredPledge() PledgeClosed() InvalidPledgeID()

#0 - c4-judge

2022-11-12T00:20:31Z

kirk-baird 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