Submitted by 0xRajeev
Low-level calls call/delegatecall/staticcallreturntrueeven if the account called is non-existent (per EVM design). Solidity documentation warns:
The staticcall here will return True even if the _yieldSource contract doesnt exist at any incorrect-but-not-zero address, e.g. EOA address, used during initialization by accident.
The hack, as commented, to check if its an actual yield source contract, will fail if the address is indeed a contract account which doesnt implement the depositToken function. However, if the address is that of an EOA account, the check will pass here but will revert in all future calls to the yield source forcing contract redeployment after the pool is active. Users will not be able to interact with the pool and abandon it.
Recommend that a contract existence check should be performed on _yieldSource prior to the depositToken function existence hack for determining yield source contract.
asselstine (PoolTogether) confirmed
