The SmartVaultV3::canRemoveCollateral
function incorrectly underestimates the max amount of collateral that can be removed, which limits the user ability to withdraw or manage his assets.
The issue arises in the calculation within the SmartVaultV3::canRemoveCollateral
function. The current implementation does not correctly factor in the collateral rate when determining if collateral can be removed.
The function underestimates the amount of collateral that can be safely removed. Which can restrict users from withdrawing to their actual maximum withdrawable amount.
This can greatly limit the users flexibility to manage their funds especially for big collateral depositors.
Manual review
To correct this issue, the calculation within canRemoveCollateral
should be modified to minted < currentMintable - eurValueToRemove * * ISmartVaultManagerV3(manager).HUNDRED_PC() / ISmartVaultManagerV3(manager).collateralRate();
.
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.