The SmartVaultV3::swap()
is used to swap collateral in the vault to allow the adjustment of risk. In the swap function the SmartVaultV3::calculateMinimumAmountOut()
is called, user can swap any tokens that are not whitelisted as collateral for the vault if the collateralValueMinusSwapValue
is more than requiredCollateralValue
.
The SmartVaultV3::calculateMinimumAmountOut()
is used to check if the collateral in the vault is in excess, which means that the amount of collateral is higher than the threshold of collateral.
Thus the main issue is that there will not be any checks for the output of tokens swapped if it's above required collateral amount and users will lose tokens since you cannot withdraw and remove collateral in the vault due to the Token Manager getToken
function.
Users will lose tokens if the collateralized amount is higher than the collateral threshold during the swapping of collateral.
Manual Review
Check for the output of tokens swapped regardless of the collateral amount that is higher or lower than threshold,
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.