The switchUnderlyingToken function is intended to change the underlying ripe token associated with an unripe token. A prerequisite for this operation is that the balanceOfUnderlying for the unripe token must be zero.
Malicious actors could exploit this by holding a minimal amount of unripe tokens and refusing to use the chop function, thereby maintaining a non-zero balanceOfUnderlying and preventing the switch of the underlying token.
This could lead to the contract owner being unable to switch the underlying token when necessary, potentially causing operational issues or financial loss.
manual review
Implement a time-bound function that allows the contract owner to override the zero balance requirement after a certain period.
Introduce a mechanism for compulsory conversion of the last remaining unripe tokens.
Consider a governance vote or multi-sig approval process for switching underlying tokens to prevent unilateral control.
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.