In closePot()::Pot.sol, remainingRewards is not updated.
In closePot()::Pot.sol :
https://github.com/Cyfrin/2024-08-MyCut/blob/main/src/Pot.sol#L49-L62
remainingRewardsis unchanged after the execution of the function.
=> It should be updated before the end of the closePot() function, because if not, the remainingRewards will still be at the initial value even if there is no remainingRewards left in the contract, misleading the end user if the front end of the dapp retrieves the value of this remainingRewards variable.
Misleading of the end user if he uses the remainingRewards variable in his interaction with the protocol.
Github, VisualCode.
Update the value of remainingRewards before the end of the closePot()::Pot.solfunction, like follow :
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.