The RegistryFactory contract allows setting of a threshold value without validating it against the number of attesters, which can lead to a non-functional contract state.
In the RegistryFactory contract, the threshold
variable is vital for determining the number of attesters required to approve a module. However, the contract lacks proper validation when setting this threshold, both in the constructor and the setThreshold
function.
This could lead to a situation where the threshold is higher than the total number of attesters, making it impossible to approve any modules.
If the threshold is set higher than the number of attesters, it would render the contract non-functional. No modules could be approved, thereby breaking the core functionality of the RegistryFactory. It could also lead to deployed accounts being unusable or the need to redeploy the entire contract.
Manual code review
Implement a check in both the constructor and setThreshold
function to ensure the threshold is always less than or equal to the number of attesters:
Invalid [known issue [Medium-1]](https://github.com/Cyfrin/2024-07-biconomy/issues/1)
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.