Submitted by GalloDaSballo, also found by 0xRajeev and gpersoon
The function swapYieldSource SwappableYieldSource.sol` L307
Can be called by the owner (deployer / initializer) or Asset Manager. The function will take all funds from the old Yield Source, and transfer them to the new Yield source. Any contract that implement the function function depositToken() external returns (address) will pass the check
However, if either the owner or the assetManager have malicious intent, this function allows them to instantly rug all funds
I highly recommend checking that the YieldSource is from a trusted registry before allowing this swap.
Alternatively forcing each Owner to be a TimeLock with at least 48 hours may provide enough security to allow this to be used in practice
PierrickGT (PoolTogether) disputed:
0xean (Judge) commented:
PierrickGT (PoolTogether) commented:
