Open code423n4 opened 1 year ago
0xA5DF marked the issue as duplicate of #370
hansfriese changed the severity to QA (Quality Assurance)
hansfriese marked the issue as grade-b
This previously downgraded issue has been upgraded by hansfriese
hansfriese changed the severity to QA (Quality Assurance)
Lines of code
https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Frankencoin.sol#L153
Vulnerability details
Impact
The
Frankencoin.denyMinter()
function does not correctly check the application period, which allows an FPS holder to deny a minter after the deadline for the application period has passed. As a result, the denied minter would have to be registered as a minter again and pay an extra 1000zchf
as fees.Proof of Concept
The
denyMinter()
function is designed to allow qualified pool share holders to deny minters during the application period. Theminters
mapping keeps track of the application period for each minter.Currently, the
denyMinter()
function only checks if the current block timestamp is greater than theminters[_minter]
timestamp. This means that an FPS holder can deny a minter when the currentblock.timestamp
is equal to theminters[_minter]
timestamp. This allows an FPS holder to deny a minter after the deadline for the application period has passed, which could potentially affect the security and stability of the system.Tools Used
Manual Review
Recommended Mitigation Steps
To mitigate this issue, we recommend updating the
denyMinter()
function as follows: