The burn
function in SmartVaultV3.sol has only ifMinted
modifier , and it's external which means anyone can call it as the SmartVaults share a Euros contract.
A malicious user that already has minted EURs
tokens can call the burn function of another SmartVault contract. He can cause the minted
variable to be 0. This on the other hand will cause the requiredCollateralValue
to equal zero in function calculateMinimumAmountOut(bytes32 _inTokenSymbol, bytes32 _outTokenSymbol, uint256 _amount)
. This on the other hand will cause the function to return 0.
And now we get to swap
function, where minimumAmountOut = calculateMinimumAmountOut(_inToken, _outToken, _amount);
Meaning minimumAmountOut = 0
which according to the UniswapDocs:
Which will cause to loss of funds while swapping.
High as it can lead to loss of funds.
Manual review
Inctroduce onlyOwner
modifier.
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.