-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UNI-1017 Loan can be written off by anybody before overdue delay expires #64
UNI-1017 Loan can be written off by anybody before overdue delay expires #64
Conversation
contracts/market/UToken.sol
Outdated
accountBorrows[borrower].lastRepay = 0; | ||
} else { | ||
// Still tracking the exisiting loan. | ||
accountBorrows[borrower].lastRepay = getBlockNumber(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think accountBorrows[borrower].lastRepay = getBlockNumber() should be set without liquidation being complete. Because the borrower still has debts and he has not made repayments, his behavior is still a bad borrower. This will cause other guarantors to be unable to liquidate, because the test is no longer in default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the staker could write off a small amount to re-validate the borrower's loan. If that's not the case, I don't know why anyone would want to just write off part of the loan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean when there are multiple stakers and one of them liquidates their vouch, other stakers can no longer liquidate their vouch because lastRepay is updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that makes sense. I've updated it.
…/uni-1017-115-loan-can-be-written-off-by-anybody
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok, although delete accountBorrows[borrower]
in L678 can be a safer take.
No description provided.