There are multiple places to check the condition of saltToCloseTime[salt] == 0, ideally it should be consistent in each deployProxy functions but right now it isn't.
For example in deployProxyAndDistributeByOwner
function, it checks saltToCloseTime[salt] == 0
and saltToCloseTime[salt] + EXPIRATION_TIME > block.timestamp
while in deployProxyAndDistributeBySignature
function, it checks saltToCloseTime[salt] == 0
and saltToCloseTime[salt] > block.timestamp
.
We'd better to update the condition checks to solidity modifiers
to make the functions clean and more readable.
https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/ProxyFactory.sol#L132-L134
https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/ProxyFactory.sol#L162-L163
https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/ProxyFactory.sol#L186-L187
https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/ProxyFactory.sol#L214-L216
Manual review
Update the condition checks to modifiers
and make them consistent in each function
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.