Paladin contest - 0xmint's results

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

General Information

Platform: Code4rena

Start Date: 29/03/2022

Pot Size: $50,000 USDC

Total HM: 16

Participants: 42

Period: 5 days

Judge: 0xean

Total Solo HM: 9

Id: 105

League: ETH

Paladin

Findings Distribution

Researcher Performance

Rank: 33/42

Findings: 2

Award: $154.47

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

51.5728 USDC - $51.57

Labels

bug
G (Gas Optimization)

External Links

Since last UpdateReward is a time in the past, it would be smaller than block.timestamp, therefore use unchecked block:

https://github.com/code-423n4/2022-03-paladin/blob/9c26ec8556298fb1dc3cf71f471aadad3a5c74a0/contracts/HolyPaladinToken.sol#L748

The nested ifs are already numerous but for gas savings :

https://github.com/code-423n4/2022-03-paladin/blob/9c26ec8556298fb1dc3cf71f471aadad3a5c74a0/contracts/HolyPaladinToken.sol#L828

Use unchecked block for the aforementioned line :

if (vars.bonusRatioDecrease >= vars.previousBonusRatio) {

newBonusRatio =0 ;

} else{

unchecked{

newBonusRatio=vars.previousBonusRatio-vars.bonusRatioDecrease;

}

}

#0 - Kogaroshi

2022-04-03T07:25:54Z

QA & gas optimizations changes are done in the PR: https://github.com/PaladinFinance/Paladin-Tokenomics/pull/6 (some changes/tips were implemented, others are noted but won't be applied)

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