The PredictDotLoan.sol contract contains a vulnerability that allows malicious users to perform a Denial of Service (DoS) attack by preventing essential asset transfers during the loan acceptance process. Specifically, if either the lender or borrower fails to transfer the required assets—such as protocol fees or collateral—the loan acceptance function can be stalled or permanently blocked. This vulnerability disrupts the normal functioning of the protocol, discouraging legitimate users from participating and undermining the platform's reliability.
Root Cause
Dependence on External Asset Transfers:
In the loan acceptance process, the contract executes external asset transfers:
These transfers rely on the lender and borrower to have granted the necessary approvals and possess sufficient balances.
Potential for Malicious Exploitation:
A malicious user can exploit this by creating loan proposals and deliberately withholding asset transfers. This action prevents the contract from progressing, effectively causing a DoS condition.
A malicious user crafts loan proposals while ensuring that the lender or borrower lacks the necessary approvals or sufficient token balances.
Refusal to Transfer Assets:
Upon loan acceptance attempts, the affected party (lender or borrower) deliberately refuses or fails to execute the required safeTransferFrom calls.
Impact
Operational Disruption:
Legitimate loan acceptances are blocked, hindering the functionality of the lending platform.
Financial Losses:
Users may incur unnecessary gas fees on failed transactions and lose opportunities for legitimate lending and borrowing.
PoC
No response
Mitigation
Instead of automatically transferring assets during the loan acceptance, require users to pull their assets by depositing them into the contract via separate functions.
Rough Raisin Guppy
Medium
Denial of Service via Unfulfilled Asset Transfers
Summary
The PredictDotLoan.sol contract contains a vulnerability that allows malicious users to perform a Denial of Service (DoS) attack by preventing essential asset transfers during the loan acceptance process. Specifically, if either the lender or borrower fails to transfer the required assets—such as protocol fees or collateral—the loan acceptance function can be stalled or permanently blocked. This vulnerability disrupts the normal functioning of the protocol, discouraging legitimate users from participating and undermining the platform's reliability.
Root Cause
https://github.com/sherlock-audit/2024-09-predict-fun/blob/main/predict-dot-loan/contracts/PredictDotLoan.sol#L990-L991
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
safeTransferFrom
calls.Impact
PoC
No response
Mitigation
Instead of automatically transferring assets during the loan acceptance, require users to pull their assets by depositing them into the contract via separate functions.