The UnripeFacet::getPercentPenalty
function returns 0
instead of revert if the input parameter unripeToken
is neither C.UNRIPE_BEAN
, nor C.UNRIPE_LP
.
The UnripeFacet::getPercentPenalty
function returns the percent penalty of chopping an unripeToken
into its ripe token. The function checks if the input argument unripeToken
is C.UNRIPE_BEAN
or C.UNRIPE_LP
.
The problem is that the function doesn't handle the case in which the input parameter unripeToken
is incorrect and the both if
statements are false. In that case the return value of penalty
will be 0
.
If the getPercentPenalty
function returns 0
instead of reverting, it implies that the penalty is zero percent for the given unripeToken
that doesn't match C.UNRIPE_BEAN
or C.UNRIPE_LP
. This could be misleading if the intention is to indicate that the token is not supported.
If the function returns 0
, the users will think that there is no penalty for chopping the provided unripeToken
while the given unripeToken
is incorrect.
Manual Review
Revert (like in UnripeFacet::getRecapFundedPercent
) if the unripeToken
is neither C.UNRIPE_BEAN
, nor C.UNRIPE_LP
.
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.