> For the complete documentation index, see [llms.txt](https://docs.banx.gg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.banx.gg/banx-protocol/how-to-borrow/detailed-borrowing-process.md).

# Detailed borrowing process

<figure><img src="/files/m3JB02c0wHbCGma2SjRL" alt=""><figcaption></figcaption></figure>

### 1. The borrower takes the loan

* Interest starts accruing linearly, every second

### 2. The borrower repays the loan in full

* The borrower repays: the principal, accrued linear interest and the protocol fee
* The borrower recovers full control of their collateral

### 3. The lender sends a refinancing call

* A lender can send a refinancing call to an active loan, at any given time. Reasons why may include:
  * The loan being unhealthy or displaying downward trending health
  * The loan being healthy, and the lender decides to claim the liquidity owed
  * The lender wants to exit this market
* What happens next will be determined by the offers in the order book:

### 4. The order book can auto-refinance the loan

* A healthy loan is more than likely to match an existing offer in the order book
* If so, the loan will be auto-refinanced
* The lender will recover the principal + interest and exit
* The new lender will enter the loan from scratch
* Nothing changes for the borrower, the loan keeps accruing linear interest every second

### 5. The order book cannot auto-refinance the loan

* If the order book contains no better or matching offers, the loan is sent to the refinancing auction

### 6. The 72 hour refinancing auction starts

* The loan will be offered to new lenders on the same terms
* During this time the collateral cannot be liquidated
* The borrower is able to repay if they want to

### 7. New lender refinances via the auction

* Refinancing involves covering the principal of the previous loan and accrued interest, allowing the previous lender to exit in full
* The borrower continues to borrow, and can still repay anytime

### 8. The refinancing auction ends

* The auction ends after 72 hours if no new lender has stepped in to refinance the loan, *and* if the borrower still hasn't repaid
* If this is the case, the lender receives the collateral and the borrower loses it
