Skip to content
DoS Audit finding Intermediate

timelockERC721Keys could exceed the block size limit

The function that loops over all timelocked ERC721 token IDs could exceed the block gas limit if the collection grows large, causing transactions to fail. An attacker could not directly exploit this, but a successful project with many NFTs might make the function unusable.

Sherlock Follow

Originally disclosed on Code4rena

Submitted by Sherlock, also found by shw

On line 504 of Visor.sol, looping through the timelockERC721Keys could exceed the block size limit

Recommend transfer by index instead of token ID

xyz-ctrl (Visor) acknowledged:

sponsor acknowledged We will be significantly refactoring experimental nft functionality in our next version before exposing to users of platform. In this refactor we will cap size of nft collection

ghoul-sol (Judge) commented:

I’m going to bump it to medium severity because this may happen if project is very successful

ztcrypto (Visor) patched:

patch link

By using EnumerableSets

The original report as published on Code4rena, by Sherlock. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

If the NFT collection becomes large, the function could become unusable because transactions would exceed the block gas limit, but this is not a direct security exploit.

What the attacker needed

Large number of NFTs in the collection

The fix

The issue was fixed by using EnumerableSets and capping the size of the NFT collection.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A smart contract function tries to process every NFT in a list at once. If the list gets too long, the transaction runs out of gas and fails. This is a scalability problem, not a direct attack.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More from Visor Finance

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.