Ajna Protocol - UniversalCrypto'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: 91/114

Findings: 1

Award: $36.24

🌟 Selected for report: 0

🚀 Solo Findings: 0

QA:

  1. Wrong comment for mapping

PositionManager.sol#54

  1. positionIndexes & positions should be deleted for the specified tokenId

PositionManager.sol#149-150

  1. memorializePositions doesn't check params_.indexes.length > 0 which will means this function can burn gas

PositionManager.sol#178

  1. moveLiquidity doesn't check that fromPosition.bucketLp > 0

PositionManager.sol#moveLiquidity

  1. moveStakedLiquidity will revert if RewardsManager hasn't been approved due to mayInteract modifier

RewardsManager.sol#175

  1. moveStakedLiquidity calls _transferAjnaRewards twice in a single call, potentially inflating the amount of rewards sent to msg.sender

RewardsManager.sol#moveStakedLiquidity

  1. Approved users of a NFT will not be able to will not be able to call stake function directly. _isApprovedOrOwner should be used instead of ownerOf

RewardsManager.sol#213

Also note if this change is implemented then RewardsManager.sol#250 will need to change from msg.sender to the owner of the NFT

  1. positionManager.getPositionIndexes(tokenId_); may not return the same index recorded at the time of staking

RewardsManager.sol#289

Low:

  1. First minted tokenId is 2 instead of 1

PositionManager.sol#62 PositionManager.sol#230

#0 - c4-judge

2023-05-18T19:15:20Z

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