Ajna Protocol - Tomio's results

A peer to peer, oracleless, permissionless lending protocol with no governance, accepting both fungible and non fungible tokens as collateral.

General Information

Platform: Code4rena

Start Date: 03/05/2023

Pot Size: $60,500 USDC

Total HM: 25

Participants: 114

Period: 8 days

Judge: Picodes

Total Solo HM: 6

Id: 234

League: ETH

Ajna Protocol

Findings Distribution

Researcher Performance

Rank: 97/114

Findings: 1

Award: $22.28

Gas:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

22.2767 USDC - $22.28

Labels

bug
G (Gas Optimization)
grade-b
G-13

External Links

Title: Unnecessary variable declaration

Proof of Concept: RewardsManager.sol#L436 RewardsManager.sol#L444 Consider declare this variable directly instead, which can save gas costs by reducing unnecessary variable declarations.

Recommended Mitigation Steps:

for (uint256 i = 0; i < positionIndexes_.length; ) { uint256 bucketIndex = positionIndexes_[i]; //declare here BucketState memory bucketSnapshot = stakes[tokenId_].snapshot[bucketIndex]; if (epoch_ != stakingEpoch_) { // if staked in a previous epoch then use the initial exchange rate of epoch uint256 bucketRate = bucketExchangeRates[ajnaPool_][bucketIndex][epoch_]; //declare here } else {

#0 - c4-judge

2023-05-17T10:50:52Z

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