A vaultOwner who is "not confident enough in ourselves to stay up-to-date with market conditions to know when we should move to less volatile collateral to avoid liquidations." They can open their vault to other users who pay attention to the markets and would call rebalance to recieve the insentivized fees. The vaultOwner who doesn't want to pay the baiting high fees instead front-runs the autoRebalance() with setAutomation() to lower incentives.
Proof of Concept
A Mallory a vaultOwner isn't confident in staying up-to-date with market conditions. She has her vault setup to be automated and has high fee incentives.
Alice a user who is confident in staying up-to-date with market conditions see's a profitable opportunity and calls rebalance().
Mallory is confident in her programing and watching mempools for when rebalance() is called. See's that Alice just called rebalance() and calls setAutomation() to lower the incentives.
Alice's call to rebalance() then goes through getting lower incentives and Mallory then calls setAutomation() to set the incentives back to normal.
Tools Used
Manual Review
Recommended Mitigation Steps
Add a time-lock to setAutomation so that the vaultOwner can't front-run users.
Lines of code
https://github.com/code-423n4/2022-08-mimo/blob/main/contracts/actions/automated/MIMOAutoAction.sol#L32 https://github.com/code-423n4/2022-08-mimo/blob/main/contracts/actions/automated/MIMOAutoRebalance.sol#L54
Vulnerability details
Impact
A
vaultOwner
who is "not confident enough in ourselves to stay up-to-date with market conditions to know when we should move to less volatile collateral to avoid liquidations." They can open their vault to other users who pay attention to the markets and would callrebalance
to recieve the insentivized fees. ThevaultOwner
who doesn't want to pay the baiting high fees instead front-runs theautoRebalance()
withsetAutomation()
to lower incentives.Proof of Concept
vaultOwner
isn't confident in staying up-to-date with market conditions. She has her vault setup to be automated and has high fee incentives.rebalance()
.rebalance()
is called. See's that Alice just calledrebalance()
and callssetAutomation()
to lower the incentives.rebalance()
then goes through getting lower incentives and Mallory then callssetAutomation()
to set the incentives back to normal.Tools Used
Manual Review
Recommended Mitigation Steps
Add a time-lock to
setAutomation
so that thevaultOwner
can't front-run users.