Token transfer from TokenManager to CapitalPool can be blocked in case of insufficient allowance.
Currently there are two options for token transfers between TokenManager and CapitalPool: it either appove type(uint256).max or check if current allowance is zero:
and here is a check in transfer func:
So consider the scenario when it is required to transfer a large ammount of tokens from TokenManager to CapitalPool.
Current allowance is not equal to zero;
The amount to trasfer is more that allowance;
Transfer will fail as it doesn't have anoigh rights to transfer tokens and it is impossible to call approve() to increase it.
Token will not be transfered and some core funtions from related PreMarkets contract will be blocked.
Token transfers will be blocked between contracts.
Manual review
Provide a check to see if it has enough allowance before token transfer and approve again is it's not.
This is at most low severity, even though giving max approvals shouldn't be permisionless, the respective tokenManager address is retrieved from the TadleFactory contract whereby the trusted guardian role is responsible for deploying such contracts as seen [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/factory/TadleFactory.sol#L68). Since the user still has to go through the PreMarkets/DeliveryPlace contracts to perform market actions, this max approval cannot be exploited.
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.