Open c4-bot-1 opened 8 months ago
0xEVom marked the issue as sufficient quality report
0xEVom marked the issue as primary issue
Medium severity at best, liquidators are still incentivized to participate.
kalinbas (sponsor) confirmed
kalinbas marked the issue as disagree with severity
Low severity
According to the C4 rules, an M is appropriate as this disrupts certain designs in the economic model.
jhsagd76 changed the severity to 2 (Med Risk)
jhsagd76 marked the issue as satisfactory
jhsagd76 marked the issue as selected for report
Lines of code
https://github.com/code-423n4/2024-03-revert-lend/blob/main/src/V3Vault.sol#L1112-L1119
Vulnerability details
Bug Description
As stated in the Revert Lend Whitepaper, the liquidation fee for underwater positions is supposed to be 10% of the debt.
However the code within
V3Vault::_calculateLiquidation
(shown below) calculates the liquidation fee as 10% of thefullValue
rather than 10% of thedebt
.A permalink to the code snippet is here
Impact
As the
fullValue
decreases belowdebt
(since the position is underwater), liquidators are less-and-less incentivised to liquidate the position. This is because asfullValue
decreases, the liquidation fee (10% offullValue
) also decreases.This goes against the protocol's intention (stated in the whitepaper) that the liquidation fee will be fixed at 10% of the debt for underwater positions, breaking core protocol functionality.
Proof of Concept
Code snippet from
V3Vault._calculateLiquidation
: https://github.com/code-423n4/2024-03-revert-lend/blob/435b054f9ad2404173f36f0f74a5096c894b12b7/src/V3Vault.sol#L1112-L1119Recommended Mitigation Steps
Ensure that the liquidation fee is equal to 10% of the debt. Make the following changes in
V3Vault::_calculateLiquidation()
:Assessed type
Error