Skip to content
Business logic Audit finding Intermediate

transferERC721 doesn’t clean timelockERC721s

gpersoon Follow

Originally disclosed on Code4rena

Submitted by gpersoon, also found by shw

The function transferERC721 works similar to the functions timeUnlockERC721 with timelocked NFT’s. However timeUnlockERC721 cleans timelockERC721s (delete timelockERC721s[key];), while transferERC721 doesn’t clean timelockERC721s

This could mean that timelock keys could be used later on (when the NFT would have been transferred to the contract on a later moment in time). Also, the administration doesn’t correspond to the available NFT’s. Additionally doing a delete gives backs some gas (at least for now).

See Issue #19 for code referenced in proof of concept

Recommend checking if the timelockERC721s mapping should also be cleaned from transferERC721, if so adapt the code accordingly.

xyz-ctrl (Visor) confirmed:

ztcrypto (Visor) patched:

patch link

The original report as published on Code4rena, by gpersoon. 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.

What is known

A medium-severity business logic bug in Visor Finance. Code4rena made it public on 30 August 2021. Found in the 2021-05-visorfinance audit contest (finding M-02).

About Business logic

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

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

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by gpersoon

View all

47 more disclosed reports, best first.

More from Visor Finance

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.