If vault have accepted token that is pausable, vault can't be liquidated due to revert on transfer
When a vault is under-collateralised, anyone can call liquidation to liquidate that vault. In that case, all token will be transfered:
function liquidate() external onlyVaultManager {
require(undercollateralised(), "err-not-liquidatable");
liquidated = true;
minted = 0;
liquidateNative();
ITokenManager.Token[] memory tokens = getTokenManager().getAcceptedTokens();
for (uint256 i = 0; i < tokens.length; i++) {
if (tokens[i].symbol != NATIVE) liquidateERC20(IERC20(tokens[i].addr)); // <------
}
}
function liquidateERC20(IERC20 _token) private {
if (_token.balanceOf(address(this)) != 0) _token.safeTransfer(ISmartVaultManagerV3(manager).protocol(), _token.balanceOf(address(this))); // <-----
}
If accepted token in the vault is pausable, like USDC, is paused, all transfer will be reverted, and vault won't be liquidated even it is under-collateralised.
User can avoid being liquidated unfairly
Manual review
Skip transfer if token failed to transfer, and do not allow vault owner transfer asset that accepted after liquidation
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.