Closed code423n4 closed 2 years ago
Gauge shouldn't be changed unless made sure that funds are transferred to the new one.
While strategist has privileged access for setting gauge
in Vault, the funds deposited in the gauge are sent back to the user
The only attack vector I see here is if the strategist where to rug user funds by setting up a malicious gauge
However this is not what this warden found
Invalid
Handle
pauliax
Vulnerability details
Impact
VaultHelper deposits/withdraws from _gauge if it is set or directly from the vault otherwise. The problem is that gauge can change in Vault (function setGauge) so in theory, it is possible that old deposits will be stuck in such case, e.g.: 1) user deposits to gauge; 2) gauge is set to point to a new address; 3) user tries to withdraw but the old gauge does not have enough funds to fulfill the order.
Recommended Mitigation Steps
To solve this potential problem consider migrating funds from the old gauge to the new one when gauge is updated in function setGauge.