tokenManager::withdraw() will revert if withdraw asset's approve method doesn't return a bool
A user can withdraw his tokens from capitalPool using tokenManager:withdraw(). If _from = capitalPool & allowance is 0 then it calls the ERC20::approve method, which is expected to return a bool value
Using ERC20::approve will not work with ERC20 tokens that do not return a bool (e.g., USDT).
Solidity has return data length checks, and if the token implementation does not return a bool value, the transaction will revert.
//Here is PoC
Run test with forge test --mc POC --rpc-url=<mainnet-rpc-url> -vv
Token of users will stuck in capitalPool as approve() will revert
Manual Review
Use forceApprove from OpenZeppelin's SafeERC20 library.
Invalid, low level call will always return true as long as the call succeeds without reverting, so this has no impact described, given approvals can only fail when some weird tokens do not allow a uint256.max approval, which is not described in any of the issues below.
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.