Collateral can be deposited in a finished pool
The depositCollateral function does not check the pool's status, so collateral can be deposited into a finished loan. This can happen by mistake and all funds will be lost.
Submitted by pedroais
Proof of Concept
The depositCollateral function doesn’t check the status of the pool so collateral can be deposited in a finished loan. This can happen by mistake and all funds will be lost.
Recommended Mitigation Steps
Require loan status to be collection or active in the depositCollateral function.
ritik99 (Sublime) disagreed with severity:
We will add a check for this. The issue however stems from user error. Sending assets to an address without proper checks does not constitute an attack path imo. We would suggest a rating of (1) Low or (0) non-critical given the low likelihood and the impact of the attack (only the user making the incorrect transaction is affected)
2 — Med: Assets not at direct risk, but the function of the protocol or its availability could be impacted, or leak value with a hypothetical attack path with stated assumptions, but external requirements.This definitely qualifies as “external requirements” and a simple check would assist in avoid it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the depositCollateral function lacks a check that the pool status is active or collection.
Impact
A user could lose funds by mistakenly depositing collateral into a finished loan; the program argued this is user error, but the judge rated it medium severity.
What the attacker needed
User mistakenly deposits into finished loan
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract function that lets users add collateral does not verify whether the loan is still active. If someone accidentally sends funds to a loan that has already ended, those funds are stuck and lost.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.