From bb19833b3307e2cf809628e724eab565d676f451 Mon Sep 17 00:00:00 2001 From: lsqrl Date: Wed, 10 Jan 2024 12:49:33 +0100 Subject: [PATCH] fix m1 --- src/services/DebitService.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/DebitService.sol b/src/services/DebitService.sol index 84d5572..c63aaa3 100644 --- a/src/services/DebitService.sol +++ b/src/services/DebitService.sol @@ -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(); }