https://github.com/tadle-com/market-evm/blob/main/src/core/TokenManager.sol#L32-L38
The TokenManager contract contains a mechanism for whitelisting tokens using the onlyInTokenWhiteList modifier. However, there are gaps in the logic that may allow non-whitelisted point tokens to be used without proper restrictions. This can lead to security issues if unchecked addresses or unauthorized tokens are mistakenly or maliciously interacted with.
Improper token whitelisting checks:
The onlyInTokenWhiteList modifier is designed to restrict operations to whitelisted tokens. However, the current logic allows point tokens to bypass the whitelist check entirely if _isPointToken is true.
There is no verification of the _tokenAddress when _isPointToken is true. This can lead to situations where arbitrary addresses might be used as point tokens, bypassing intended security restrictions.
Allowing unchecked point tokens can lead to unauthorized interactions, including using malicious contracts as point tokens. This may expose the contract to various security risks, including unintended token interactions and loss of funds.
Manual review
Ensure that point tokens also undergo a proper whitelist check or have a separate list of allowed point tokens.
Add a non-zero address check to prevent the use of zero address as a token and maintain separate lists for Point and Non-point Tokens
Invalid, point tokens need not be whitelisted, since they are subjected to the free market to allow free trading within Tadle with the original collateral backing. Since collateral tokens are the subject of focus when valuing points traded, the whitelist is only applicable to them.
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.