Skip to content

Commit

Permalink
Merge pull request #243 from Ithil-protocol/audit-fix-m1
Browse files Browse the repository at this point in the history
fix m1
  • Loading branch information
lsqrl authored Jan 10, 2024
2 parents b5d2ab0 + bb19833 commit e49eac7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/DebitService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ abstract contract DebitService is Service, BaseRiskModel {
// We instead allow the user to liquidate its own position without vault loss
// Because it is not a vulnerability even if the user manipulated the quoter on purpose to experience a loss
if (
obtained[index] < agreement.loans[index].amount && msg.sender != liquidator && liquidator != address(0)
obtained[index] < agreement.loans[index].amount + dueFees[index] &&
msg.sender != liquidator &&
liquidator != address(0)
) {
revert LossByArbitraryAddress();
}
Expand Down

0 comments on commit e49eac7

Please sign in to comment.