Submitted by hash
The borrower will have to pay the interest and fees until the end of the withdrawal cycle.
To repay a lender who has requested for withdrawal, the borrower is supposed to transfer the assets to the market and call the updateState() function. But the _getUpdatedState() function inside the updateState doesnt process the withdrawal batch with the latest available assets unless the batch has been expired. 
https://github.com/code-423n4/2023-10-wildcat/blob/c5df665f0bc2ca5df6f06938d66494b11e7bdada/src/market/WildcatMarketBase.sol#L358-L388
This will lead to the borrower paying the interest and fees, even though the pending withdrawal debt has been repaid to the market.
Add the following file in the test folder and run forge test --mt testBorrowerHasToPayInterestTillTheCycleEndEvenAfterReturningAsset:
Use _applyWithdrawalBatchPayment() in _getUpdatedState() similar to the implementation in queueWithdrawal().
Timing
d1ll0n (Wildcat) acknowledged
