Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: low
Invalid

DOS caused by large address array when returned using the `Swan::getListedAssets`

Relevant GitHub Links

https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/swan/Swan.sol#L314

Summary

There could be DOS vulnerability due to large array when returned using the Swan::getListedAssets which would make the transaction to revert due to out of gas.

Vulnerability Details

function getListedAssets(address _buyer, uint256 _round) external view returns (address[] memory) {
return assetsPerBuyerRound[_buyer][_round];
}

Impact

DOS because of transaction running out of gas

Tools Used

Manual review

Recommendations

A possible way could be to limit the amount of addresses per time that the Swan::getListedAssets function returns.

Updates

Lead Judging Commences

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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