Submitted by kenzo, also found by danb and harleythedog
A vault wouldnt let the strategy be changed unless the strategy holds no funds.
Since anybody can send funds to the strategy, a griefing attack is possible.
Strategy couldnt be changed.
setStrategy requires strategy.investedAssets() == 0. (Code ref)
investedAssets contains the aUST balance and the pending redeems: (Code ref)
So if a griefer sends 1 wei of aUST to the strategy before it is to be replaced, it would not be able to be replaced. The protocol would then need to redeem the aUST and wait for the process to finish - and the griefer can repeat his griefing. As they say, griefers gonna grief.
Consider keeping an internal aUST balance of the strategy, which will be updated upon deposit and redeem, and use it (instead of raw aUST balance) to check if the strategy holds no aUST funds.
Another option is to add capability for the strategy to send the aUST to the vault.
ryuheimat (Sandclock) confirmed
CloudEllie (C4) commented:
