Repository navigation
0xbepresent - Malicious borrower can block liquidations causing the lender to receive neither the settlement amount nor the collateral #228
Description
Activity
- addedMediumA valid Medium severity issueA valid Medium severity issueDuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelA valid issue that is a duplicate of an issue with `Has Duplicates` label
on May 1, 2023 - addedNon-RewardThis issue will not receive a payoutThis issue will not receive a payoutand removedMediumA valid Medium severity issueA valid Medium severity issueDuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelA valid issue that is a duplicate of an issue with `Has Duplicates` label
on May 20, 2023 Escalate for 15 USDC
I consider my issue is still valid because my test demonstrates that the once the loan is defaulted, the borrower can not be liquidated. The liquidations are reverted by "Withdraw amount cannot be zero" error.
Additionally the issue #170 mentions that the commitment needs to be accepted by the lender. Quote: TellerV2#lenderAcceptBid only allows the lender input the bidId of the bid they wish to accept, not allowing them to specify the expected collateral. This allows lenders to be honeypot and front-run causing massive loss of funds:
The issue that I reported impacts the loans that are in process or loans that need to be liquidated. Totally different from the issue #170 where the lender needs to accept the loan then the malicious actor to front-run it.
Since the issue I reported can make the lender to lost their loan and the borrow‘s collateral (unable to liquidate) I still consider my issue as a High.
Thanks for your time and patience.
Reacted by sherlock-adminEscalate for 15 USDC
I consider my issue is still valid because my test demonstrates that the once the loan is defaulted, the borrower can not be liquidated. The liquidations are reverted by "Withdraw amount cannot be zero" error.
Additionally the issue #170 mentions that the commitment needs to be accepted by the lender. Quote: TellerV2#lenderAcceptBid only allows the lender input the bidId of the bid they wish to accept, not allowing them to specify the expected collateral. This allows lenders to be honeypot and front-run causing massive loss of funds:
The issue that I reported impacts the loans that are in process or loans that need to be liquidated. Totally different from the issue #170 where the lender needs to accept the loan then the malicious actor to front-run it.
Since the issue I reported can make the lender to lost their loan and the borrow‘s collateral (unable to liquidate) I still consider my issue as a High.
Thanks for your time and patience.
You've created an escalation for 15 USDC, however, the escalation amount is fixed at 10 USDC.
To update the escalation with the correct amount, please edit this comment. (do not create a new comment)To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
- addedEscalatedThis issue contains a pending escalationThis issue contains a pending escalation
on May 20, 2023 - addedRewardA payout will be made for this issueA payout will be made for this issueand removedNon-RewardThis issue will not receive a payoutThis issue will not receive a payout
on Jun 8, 2023 Escalation accepted
Valid duplicate of #168
- addedEscalation ResolvedThis issue's escalations have been approved/rejectedThis issue's escalations have been approved/rejectedand removedEscalatedThis issue contains a pending escalationThis issue contains a pending escalation
on Jun 8, 2023 Escalation accepted
Valid duplicate of #168
This issue's escalations have been accepted! Contestants' payouts and scores will be updated according to the changes made on this issue.- addedDuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelA valid issue that is a duplicate of an issue with `Has Duplicates` label
on Jun 8, 2023
0xbepresent
high
Malicious borrower can block liquidations causing the lender to receive neither the settlement amount nor the collateral
Summary
Once the loan has started the borrower can modify the _bidCollaterals using the commitCollateral() function which causes that if the loan goes into default, the loan can not be liquidated and the lender can not receive neither the settlement amount nor the collateral.
Vulnerability Detail
Once the loan has started the commitCollateral() is available to be called by anyone, allowing to modify the
_bidCollaterals. Then, if the loan goes into default, the _withdraw() will be reverted by "Withdraw amount cannot be zero" error.Please see the next attack scenario:
Impact
The malicious borrower can block the liquidations and the lender collateral withdrawals causing the lender to receive neither the settlement amount nor the collateral. Additionally the borrower can gain time to repay his loan.
I created a test where the malicious borrower deny the liquidations and the collateral withdrawals. Test steps:
Code Snippet
The commitCollateral() allows anyone to modify the collateral available.
In the attack scenario, the collateral is set to zero causing the liquidations or collateral withdrawals transactions will be reverted by amount zero error.
Tool used
Manual review
Recommendation
Don't allow collateral modifications once the loan has started.
Duplicate of #168