Skip to content

Commit

Permalink
Reset borrower t0 reserve settle amount if borrower is out of auction…
Browse files Browse the repository at this point in the history
… after any action
  • Loading branch information
prateek105 committed Jan 11, 2024
1 parent a656de8 commit 9c2e377
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ abstract contract UnboundedLiquidationPoolHandler is BaseHandler {
auctionInfo.auctionPrice
);
}

// **A10**: T0 reserve settle amount resets if borrower is out of auction
if (_getAuctionInfo(borrower_).kickTime == 0) borrowerT0ReserveSettleAmount[borrower_] = 0;
} catch (bytes memory err) {
_ensurePoolError(err);
}
Expand Down Expand Up @@ -341,6 +344,9 @@ abstract contract UnboundedLiquidationPoolHandler is BaseHandler {

// assign value to fenwick tree to mitigate rounding error that could be created in a _fenwickRemove call
fenwickDeposits[bucketIndex_] = afterTakeVars.deposit;

// **A10**: T0 reserve settle amount resets if borrower is out of auction
if (_getAuctionInfo(borrower_).kickTime == 0) borrowerT0ReserveSettleAmount[borrower_] = 0;
} catch (bytes memory err) {
// Reset event Logs
vm.getRecordedLogs();
Expand Down Expand Up @@ -468,6 +474,10 @@ abstract contract UnboundedLiquidationPoolHandler is BaseHandler {
buckets.add(7388);
lenderDepositTime[borrower_][7388] = block.timestamp;
}

// **A10**: T0 reserve settle amount resets if borrower is out of auction
if (_getAuctionInfo(borrower_).kickTime == 0) borrowerT0ReserveSettleAmount[borrower_] = 0;

} catch (bytes memory err) {
_ensurePoolError(err);
}
Expand Down

0 comments on commit 9c2e377

Please sign in to comment.