Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Invalid

Unbounded Loops in `getUserCollateralValue` Risk Denial of Service

Summary

The getUserCollateralValue function iterates over all NFTs deposited by a user, risking gas exhaustion and denial of service.

Vulnerability Details

The function loops through all NFTs without a cap:

for (uint256 i = 0; i < user.nftTokenIds.length; i++) { // @audit no bound, this can cause a dos if too large
totalValue += getNFTPrice(user.nftTokenIds[i]);
}

Impact

  • Gas Exhaustion: Users with many NFTs cannot interact with the protocol because it will be gas expensive or will even revert with a gas limit error.

Tools Used

Manual review

Recommendations

The protocol can set a maximum number of NFTs a user can hold or use pagination to get user NFTs (start and end)

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

LendingPool: Unbounded NFT array iteration in collateral valuation functions creates DoS risk, potentially blocking liquidations and critical operations

LightChaser L-36 and M-02 covers it.

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

LendingPool: Unbounded NFT array iteration in collateral valuation functions creates DoS risk, potentially blocking liquidations and critical operations

LightChaser L-36 and M-02 covers it.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.