Returns balance
only if the balance is lesser than the total debt in SablierFlow::_coveredDebt
meanwhile one of the core features of the protocol is to ensure flexibility of the protocol according to the docs, and Users might expect to cover their total debt when the balance less than or equals the debt, but with the current logic, that won’t happen.
Here are the details:
Users might expect to cover their total debt when the balance equals the debt, but with the current logic, that won’t happen, skipping the line of code to the next one in the function.
Returning just the balance
can prevent users from covering their total debt if it exactly equals the balance, which could prevent some actions from succeeding if they depend on a complete debt coverage check and limiting the flexibilty of the protocol.
Manual Review
I will recommend this to the codebase below:
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.