SmartVaultV3::swap does not allow to specify the min amount of _outToken the vault owner is willing to receive. Instead, it use as slippage the min amount of this token to receive in order to keep the vault collateralized. Therefore, anyone who front run a SmartVaultV3::swap transaction can take advantage by manipulating the price before and after the transaction
The current implementation of SmartVaultV3::swap is susceptible to sandwich attacks.
Alice has a vault with 10 WBTC valued at 1_100_000 EUR
Alice mint 10_000 EUROS through this vault
Alice wants to swap 1 WBTC for ETH. Current rate according AMM where the swap is done through ``SmartVaultV3::swap` is 1 WBTC = 10 ETH. So Alice sent the transcation expecting to get 1 ETH
Bob see these and he has enough funds to manipulate WBTC/ETH LP price, therefore the exchange rate in this LP now is 1 WBTC = 0.01 ETH
Alice transaction pass, but she gets just 0.01 ETH
Bob return the LP to its initial state, getting around 9.99 ETH as profit
Enable theft of funds
Add a parameter to SmartVaultV3::swap that consider _outToken slippage
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.