Functions in the PreMarkets contract call the TokenManager::tillIn function with _isPointToken set to false, which bypasses the whitelist checks for tokens. This inconsistency may allow unauthorized or unapproved tokens to be processed.
The createOffer, listOffer, relistOffer and _depositTokenWhenCreateTaker functions in the PreMarkets contract call TokenManager::tillIn with _isPointToken =false:
As a result, the onlyInTokenWhiteList modifier in TokenManager::tillIn is not applied. This modifier is responsible for ensuring that only tokens which are part of an approved whitelist are processed. By setting _isPointToken to false, the whitelist check is bypassed, allowing tokens that are not whitelisted to be used. This inconsistency could lead to the processing of unauthorized tokens, potentially compromising the integrity of the token management system.
The bypassing of whitelist checks allows tokens that are not approved to be used, which can lead to unauthorized or malicious tokens being processed. This may result in financial loss or system exploitation.
Allowing unapproved tokens in critical operations increases the risk of exploitation by malicious actors, who could manipulate or disrupt the system by using these tokens.
Manual Code Review
Ensure that the tillIn function enforces whitelist checks consistently. This involves setting _isPointToken to true where appropriate to validate token approval, particularly in cases where the token's approval status needs to be checked.
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.