sherlock-audit / 2024-08-flayer-judging

2 stars 0 forks source link

steadyman - There is a problem with the logic of the function that cancels the shutdown process #726

Open sherlock-admin3 opened 1 month ago

sherlock-admin3 commented 1 month ago

steadyman

High

There is a problem with the logic of the function that cancels the shutdown process

Summary

There is a problem with the logic of the function that cancels the shutdown process.

Vulnerability Detail

When the vote is passed and totalSupply <= MAX_SHUTDOWN_TOKENS, anyone can cancel the shutdown process. At this time, collectionParams will be directly deleted, making it impossible for users to retrieve their collectionToken.

Impact

The user's collectionToken will be locked in the CollectionShutdown contract.

Code Snippet

https://github.com/sherlock-audit/2024-08-flayer/blob/main/flayer/src/contracts/utils/CollectionShutdown.sol#L390

Tool used

Manual Review

Recommendation

Add the logic of returning collectionToken in the cancel function.