With the current design of the protocol, any user could call deposit
, flashloan
, repay
, or even redeem
if they have already deposited funds, with a 0 value for amount
(or amountOfAssetToken
for redeem
function).
Such a call would succeed while no action would be executed. This would result in a transaction being executed entirely for no reasons. This would cost gas and could be prevented by a sanity check for 0 value.
The impact is LOW and it might almost be considered a gas optimisation (but for users). Adding a sanity check would prevent useless call to functions like flashloan
or deposit
that might consume gas for nothing.
Manual
I recommend to add the following check in deposit
, redeem
and flashloan
functions :
after declaring a new custom error in the contract :
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.