The function UnripeFacet:addUnripeToken(address unripeToken, address underlyingToken, bytes32 root)
does not perform any input validation on the provided addresses (unripeToken, underlyingToken). It's essential to verify that these addresses are valid and non-zero before proceeding.
As seen below, there is no input validation check for the addresses.
If the addUnripeToken function does not properly handle zero addresses and attempts to use them in operations that require valid addresses, it may prevent the contract from functioning correctly or executing certain functionalities as intended. Also storing zero addresses as valid token addresses can lead to confusion and incorrect data representation within the system.
Manual Review
Before proceeding with token registration, validate that both the unripe token address and the underlying token address are non-zero and acceptable to be added. This ensures that only valid token addresses are accepted for registration.
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.