The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Liquidation could be revert, if token contract has paused

Summary

The contract does not take into account that sending tokens may not be successful

Vulnerability Details

Sponsor said, that some tokens could be added in accepted tokens list.
Some tokens have pause mode. In this mode, transfer tokens is not possible.
So, if one of token will be with pause mode ON, and someone try call liquidation function, tx will revert, because transfer function in token contract was reveer(pause ON).
Not being able to transfer 1 token should not affect all tokens - this is bad for the protocol.
SmartVaultManagerV5.liquidateVault() -> vault.liquidate() -> in for loop will be called function liquidateERC20 with params like token address.

function liquidateERC20(IERC20 _token) private {
if (_token.balanceOf(address(this)) != 0) _token.safeTransfer(ISmartVaultManagerV3(manager).protocol(), _token.balanceOf(address(this)));
}

and if safeTransfer will revert, liquidation will not be successful at all.

Impact

Liquidation may not take place because some of the tokens may be on pause

Tools Used

Manual review

Recommendations

Add try/catch block in liquidateERC20 functoin, for dont revert liquidation, when safeTransfer function of any token will revert.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

token-pause

sovaslava Submitter
over 1 year ago
hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

token-pause

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.