the wennotpause modifier in borrow function isshould also be on the call function cause the borrowers might plan to extend loan liquidation and avoid it.
but if the borrow is pause then you should also pause the call to avoid loss for borrower
Proof of Concept
function _call(
address caller,
bytes32 loanId,
address _auctionHouse
) internal {
Loan storage loan = loans[loanId];
// check that the loan exists
uint256 borrowTime = loan.borrowTime;
require(loan.borrowTime != 0, "LendingTerm: loan not found");
// check that the loan is not already closed
require(loan.closeTime == 0, "LendingTerm: loan closed");
// check that the loan is not already called
require(loan.callTime == 0, "LendingTerm: loan called");
// check that the loan can be called
require(
GuildToken(refs.guildToken).isDeprecatedGauge(address(this)) ||
partialRepayDelayPassed(loanId),
"LendingTerm: cannot call"
);
// check that the loan has been running for at least 1 block
require(
borrowTime < block.timestamp,
"LendingTerm: loan opened in same block"
);
// update loan in state
uint256 loanDebt = getLoanDebt(loanId);
loans[loanId].callTime = block.timestamp;
loans[loanId].callDebt = loanDebt;
loans[loanId].caller = caller;
// auction the loan collateral
AuctionHouse(_auctionHouse).startAuction(loanId, loanDebt);
// emit event
emit LoanCall(block.timestamp, loanId);
}
Tools Used
vs-code
Recommended Mitigation Steps
consider adding pause modifier in the call function too so avoid unjustlly liquidation
Lines of code
https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/2376d9af792584e3d15ec9c32578daa33bb56b43/src/loan/LendingTerm.sol#L628
Vulnerability details
Impact
the wennotpause modifier in borrow function isshould also be on the call function cause the borrowers might plan to extend loan liquidation and avoid it.
but if the borrow is pause then you should also pause the call to avoid loss for borrower
Proof of Concept
Tools Used
vs-code
Recommended Mitigation Steps
consider adding pause modifier in the call function too so avoid unjustlly liquidation
Assessed type
Other