auction function does not check if collateral amount > debt + protocol fee
Summary
The auction function does not verify that the collateralization ratio is at least 100%, after calculating the new loan amount. This oversight can cause an undercollateralization vulnerability.
Root Cause
The PredictDotLoan::auction function transfers a loan to a new lender, the is calculated and the protocol takes a fee from this amount, resulting with a loan amount higher than the original one.
The issue is that the function does not recalculate or verify the collateral amount with this new loan amount. This oversight allows for the creation of new loans without ensuring the collateral-to-loan ratio is maintained, potentially resulting in undercollateralized positions.
Note that the collateral amount is checked in _refinance function but not in auction function.
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
The new lender may be exposed to a higher risk if the collateral does not sufficiently cover the new loan amount.
The collateralization ratio of at least 100% is not met.
The new loaner from the auction could potentially not be eligible to refinance feature, since it checks that the new collateralAmountRequired is greater than the loaner's collateralAmount
yaioxy
High
auction
function does not check if collateral amount > debt + protocol feeSummary
The
auction
function does not verify that the collateralization ratio is at least 100%, after calculating the new loan amount. This oversight can cause an undercollateralization vulnerability.Root Cause
The
PredictDotLoan::auction
function transfers a loan to a new lender, the is calculated and the protocol takes a fee from this amount, resulting with a loan amount higher than the original one.and the new amount is now debt + protocolFee
The issue is that the function does not recalculate or verify the collateral amount with this new loan amount. This oversight allows for the creation of new loans without ensuring the collateral-to-loan ratio is maintained, potentially resulting in undercollateralized positions.
Note that the collateral amount is checked in
_refinance
function but not inauction
function.Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
And since
loan.collateralAmount
is too low. this condition will always revert.PoC
No response
Mitigation
Add a check