The owner can bypass the expiration date by acting as an organizer
In setContest & deployProxyAndDistribute there is no check on msg.sender, so essentially after a contest is created where owner = organizer msg.sender can be the owner and deploy a proxy and distribute funds before expiration ends.
Steps:
Owner calls setContest with organiser as owner's address.
We know that owner can deploy and distribute only after EXPIRATION_TIME is over.
https://github.com/Cyfrin/2023-08-sparkn/blob/0f139b2dc53905700dd29a01451b330f829653e9/src/ProxyFactory.sol#L187
But owner can bypass this check if they call deployProxyAndDistribute function directly as they are the organiser too.
https://github.com/Cyfrin/2023-08-sparkn/blob/0f139b2dc53905700dd29a01451b330f829653e9/src/ProxyFactory.sol#L127
Invariant that owner can distribute only after EXPIRATION_TIME is over is broken. Also, it increases unnecessary centralization.
Run forge test --mt testIfOwnerCanDeployAndDistributeFundsBeforeExpiryEnds -vvv
Manual
In setContest, check that organiser != owner
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.