In the case of a full liquidation, collateralReward == collateralBalance.
There is no additional incentive amount sent to the liquidator. This is a problem in cases when maxCollateralRatioMantissa >= 1e18: there is absolutely no incentive for users to call liquidate, as the collateral they would receive would be the same value as their repay amount.
Impact
It affects pool in the edge case where maxCollateralRatioMantissa == 1e18.
Looking at pool deployments, the only requirement on _maxCollateralRatioMantissa is the following:
63: require(_maxCollateralRatioMantissa > 0, "Pool: _maxCollateralRatioMantissa too low");
Consider creating a liquidation incentive system, where perhaps some of the balances of liquidity providers would be deducted to reward liquidators during liquidations.
joestakey
medium
There is no liquidation incentive if
maxCollateralRatioMantissa >= 1e18
Summary
There is no incentive for liquidators if
maxCollateralRatioMantissa >= 1e18
Vulnerability Detail
The collateral reward sent back to a liquidator is computed as follow:
In the case of a full liquidation,
collateralReward == collateralBalance
.There is no additional incentive amount sent to the liquidator. This is a problem in cases when
maxCollateralRatioMantissa >= 1e18
: there is absolutely no incentive for users to callliquidate
, as the collateral they would receive would be the same value as their repay amount.Impact
It affects pool in the edge case where
maxCollateralRatioMantissa == 1e18
.Looking at pool deployments, the only requirement on
_maxCollateralRatioMantissa
is the following:Meaning this is a valid edge case to look at.
Code Snippet
https://github.com/sherlock-audit/2023-02-surge/blob/main/surge-protocol-v1/src/Pool.sol#L580-L588
Tool used
Manual Review
Recommendation
Consider creating a liquidation incentive system, where perhaps some of the balances of liquidity providers would be deducted to reward liquidators during liquidations.