The BoostController::updateUserBoost
function checks if the user address is the zero address but incorrectly reverts with the InvalidPool()
error message which is not the correct message. It creates confusion and misleads users or developers about the nature of the error.
The vulnerability lies in the following line of code:
Here, the function checks if the user address is the zero address, which is a valid check to prevent invalid inputs. However, the error message InvalidPool()
is misleading because the issue is related to the user address, not the pool address. The correct error message should be InvalidUser()
to accurately reflect the nature of the error.
Example Scenario:
A user accidentally passes address(0)
as the user parameter.
The function reverts with the error InvalidPool()
, which is confusing because the issue is with the user
address, not the pool
address.
Developers or users may misinterpret the error, leading to unnecessary debugging efforts.
Developers or users may mistakenly assume the pool
parameter is invalid rather than user
.
Manual Code Review
To address this issue, update the error message to accurately reflect the nature of the error. Ensure InvalidUser()
event is declared and replace InvalidPool()
with InvalidUser()
in the following line:
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.