The removeLiquidityProportional function in the contract contains a logic flaw where the wrong revert error (WithdrawalByNonOwner) is used when checking if the caller has no deposit records for a specific pool. This issue can mislead developers analyzing the function’s logs, as the error message implies ownership issues rather than the absence of deposit history. Correct revert error handling is crucial for clarity, debugging, and overall contract reliability.
The issue lies in using the WithdrawalByNonOwner error for a condition unrelated to ownership.
Misleading error messages complicate debugging and understanding contract behavior.
Manual Review
Introduce a more appropriate revert error
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.