Users face potential slippage risks when interacting with SmartVaultV3::swap()
and there are no minted EUROs
assets at that moment. This risk arises from a calculation within SmartVaultV3::calculateMinimumAmountOut()
, which returns 0 as the accepted slippage control in such cases.
This vulnerability arises from the following function:
We can see in the last part that if collateralValueMinusSwapValue
is greater than requiredCollateralValue
, then 0 will be returned as the minimum amount out. This will be the case if minted
is 0 (the vault is not collateralized).
This is then used in SmartVaultV3::swap()
and passed to the amountOutMinimum
param of UniswapV3, which is where the risky trade happens:
Another way to expose the trader to this risk is if some malicious actor comes in and burns their tokens in someone else's vault. This will cause minted
to drop to 0 and the vault owner might not realize it.
If we look at the code for SmartVaultV3::burn()
:
We will see that this is indeed the case. This will cost the attacker money and might not be practical to exploit but it's still worth mentioning.
Users are exposed to potentially dangerous swaps due to a lack of slippage check in this particular case
Manual Analysis
Do not let users execute SmartVaultV3::swap()
when the vault is uncollateralized.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.