Normal Behavior: When updating critical external dependencies, such as the address of a ZK-proof Verifier contract, the input parameters must be validated to ensure they are not set to the zero address (0x0000000000000000000000000000000000000000). This prevents the main contract from attempting to execute calls on non-existent bytecode.
Specific Issue: The updateVerifier function accepts an IVerifier type address and assigns it directly to the verifier state variable without validating the input. If the protocol owner accidentally passes address(0) during an emergency update, the state is saved. Subsequently, when any user attempts to call the claim function, the contract will execute verifier.verify(proof, publicInputs). Because high-level Solidity calls to EOAs or the zero address revert if the target has no code, the entire claim function will consistently revert. This causes a complete Denial of Service (DoS) for the core application logic until the owner submits another transaction to fix it.
Likelihood:
This relies entirely on an administrative mistake (human error) during a contract upgrade or emergency intervention.
Impact:
A complete Denial of Service (DoS) for the claim function. Users will be entirely unable to claim their rewards.
Funds and rewards will remain temporarily locked in the contract until the administrator recognizes the mistake, unpauses, pauses again, and executes another update transaction with a valid contract address.
The following steps outline the exact execution flow that leads to the DoS:
The owner pauses the contract to perform an upgrade.
The owner accidentally submits address(0) as the parameter for updateVerifier.
The transaction succeeds, setting the verifier state variable to 0x00...00.
The owner unpauses the contract.
A user submits a valid ZK proof to the claim function.
The EVM attempts to call verify() on address(0). Because it is a high-level call to an address with no deployed contract code, the EVM immediately reverts the transaction.
Explanation of the fix: Adding a specific if statement or require check against address(0) acts as an automated safeguard against human error. This mirrors the exact safety check that the developer originally included in the constructor, ensuring consistency across the codebase.
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.
The contest is complete and the rewards are being distributed.