Submitted by cmichel
The idea of YieldSourcePrizePool_canAwardExternal seems to be to disallow awarding the interest-bearing token of the yield source, like aTokens, cTokens, yTokens.
However, the code checks _externalToken != address(yieldSource) where yieldSource is the actual yield strategy contract and not the strategys interest-bearing token.
Note that the yieldSource is usually not even a token contract except for ATokenYieldSource and YearnV2YieldSource.
The _canAwardExternal does not work as expected. It might be possible to award the interest-bearing token which would lead to errors and loss of funds when trying to redeem underlying.
There doesnt seem to be a function to return the interest-bearing token. It needs to be added, similar to depositToken() which retrieves the underlying token.
asselstine (PoolTogether) acknowledged:
aodhgan (PoolTogether) commented:
asselstine (PoolTogether) commented:
