Vaults, when undercollateralized, face liquidation through LiquidationPoolManager
. However, the protocol's use of tokens that revert on zero transfer will block all liquidation
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPoolManager.sol#L80
Seeing a vault's undercollateralised position runLiquidation()
is called which invokes LendingPool.distributeAssets()
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L219
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L232
The vulnerability lies in the possibility of a small position of a collateral token being set, which reverts during a zero-transfer scenario, making _portion = (asset.amount * _positionStake) / stakeTotal
evaluate to zero (e.g., asset.amount ≈ 1 wei)
. This triggers a revert during the safeTransferFrom() operation, preventing liquidation.
No Liquidation can take a place if collateral tokens revert on zero transfer
Manual
Prior to transferring tokens, include a check to ensure the amount being transferred is nonzero
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.