Closed sherlock-admin2 closed 1 year ago
2 comment(s) were left on this issue during the judging contest.
panprog commented:
low, because this is known issue and expected behavior (due to gas optimization) as described in the docs
MohammedRizwan commented:
valid
OxZ00mer
high
The omission of Uniswap position fees from a user's assets can result in a premature liquidation
Summary
Users with inadequate collateral in their Borrower contract to cover their loans will face premature liquidation due to the omission of their accrued Uniswap fees from consideration.
Vulnerability Detail
Users must have sufficient collateral, which can be in the form of token reserves or positions in the Uniswap pool market, to cover their loans when using their Borrower contract.
The problem arises because accrued fees are not considered in the asset calculation of users. Specifically, when assessing assets, only the provided liquidity in the pool is added, while the fees are overlooked. This oversight is reflected in the following code snippet:
Furthermore, when a user is liquidated, their Uniswap positions are burned, and their fees are collected but not considered in the liquidation process. As a result, these fees effectively go to the liquidator, resulting in their misappropriation.
Impact
Users who lack sufficient assets in their Borrower contract but have accumulated ample fees on their Uniswap positions to maintain financial health will face premature liquidation, resulting in the loss of their collateral.
Code Snippet
https://github.com/sherlock-audit/2023-10-aloe/blob/main/aloe-ii/core/src/Borrower.sol#L194
https://github.com/sherlock-audit/2023-10-aloe/blob/main/aloe-ii/core/src/Borrower.sol#L490-L525
https://github.com/sherlock-audit/2023-10-aloe/blob/main/aloe-ii/core/src/Borrower.sol#L515-L517
Tool used
Manual Review
Recommendation
Consider claiming and accounting for the user's fees before evaluating their liquidation eligibility.
Duplicate of #71