When the SmartVaultManagerV5::liquidateVault
is called, it does not actually remove the liquidated vault fromt the tokenIds
array which leads to a situation where a one point it will become too expensive to call the vaults
function as it loops thorugh to all token ids, which will lead to a Denial of service
The vaults function loops through each tokenIds of every vault and returns them as shown below
But when a vault gets liquidated, it does not try to remove the tokenId from the tokenIds array as shown below,
As shown above in that code no Removal method or sequence is performed after the liquidation of the vault is successful
Potential DOS of the vaults
function, due to non removal of liquidated vaults from the tokenIds array
Manual Review
A Liquidated vault should be removed from the tokenIds array which should mitigate the potential issue, but if the protocol does not want to carry out that process due to design, a separate array should be created for liquidated vaults, this will ensure complete Mitigation
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.