> ## Documentation Index
> Fetch the complete documentation index at: https://docs-staging.centuari.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto Refinance

> Automatic loan refinancing at maturity for continuous borrowing

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/centuari/assets/gifs/auto-refinance.gif" alt="Animation showing borrower loan automatically refinancing at maturity" />
</Frame>

## Overview

Auto Refinance automatically extends your borrowing position when it matures. Instead of needing to repay your loan and re-borrow, the protocol rolls your position into a new loan, keeping your capital deployed and avoiding liquidation risk at maturity.

<Info>
  **Default Behavior**:

  * Easy Mode: Auto Refinance is **ON** by default
  * Advanced Mode: Auto Refinance is **OFF** by default
</Info>

## Why Auto Refinance Matters

At maturity without auto refinance:

<Warning>
  If your loan matures and you haven't repaid, your position becomes **immediately liquidatable**. Auto refinance prevents this by automatically extending your loan.
</Warning>

| Without Auto Refinance           | With Auto Refinance           |
| -------------------------------- | ----------------------------- |
| Must repay by maturity           | Loan automatically extends    |
| Miss maturity = liquidation risk | Seamless continuation         |
| Manual monitoring required       | Set and forget                |
| Must find new loan manually      | Best rate found automatically |

## How It Works

<Steps>
  <Step title="Original Loan Matures">
    Your borrowing term ends (e.g., USDC loan maturing June 1)
  </Step>

  <Step title="System Checks Auto Refinance">
    Protocol checks if auto refinance is enabled for your position
  </Step>

  <Step title="Interest Settled">
    Accrued interest is settled:

    * Added to loan balance, OR
    * Deducted from collateral value
  </Step>

  <Step title="New Borrow Order Placed">
    Automatically places a new borrow order:

    * Same asset (USDC)
    * Next available maturity date
    * Best available rate
  </Step>

  <Step title="Order Matches">
    New order matches with lenders in the order book
  </Step>

  <Step title="Loan Extended">
    Your loan continues with new terms
  </Step>
</Steps>

## Configuration Options

### In Easy Mode

Auto Refinance is enabled automatically. To modify:

1. Go to your position dashboard
2. Click on the borrowing position
3. Toggle "Auto Refinance" off
4. Confirm the change

<Warning>
  If you disable Auto Refinance, you **must** repay before maturity or risk liquidation.
</Warning>

### In Advanced Mode

When placing your borrow order, you can configure:

| Setting           | Options          | Default   |
| ----------------- | ---------------- | --------- |
| Auto Refinance    | On / Off         | Off       |
| Rate Ceiling      | None / Max rate  | None      |
| Duration          | Same / Custom    | Same      |
| Max Refinances    | 1-99 / Unlimited | Unlimited |
| Collateral Top-up | Auto / Manual    | Manual    |

#### Rate Ceiling

Set a maximum rate you're willing to pay:

<Tabs>
  <Tab title="No Ceiling">
    ```
    Original: 8% APY maturing June 1
    At maturity: Market is 10% APY
    Refinance: New loan at 10% APY maturing July 1
    ```

    **Best for**: Prioritizing continuous borrowing over rate
  </Tab>

  <Tab title="With Ceiling">
    ```
    Original: 8% APY maturing June 1
    Ceiling: Maximum 9.5% APY
    At maturity: Market is 10% APY ✗
    Result: Refinance fails, must repay

    If market were 9%: Refinance at 9% APY maturing July 1 ✓
    ```

    **Best for**: Rate-sensitive borrowers
  </Tab>
</Tabs>

#### Collateral Top-up

If accrued interest reduces your health factor:

* **Auto**: Protocol adds collateral from your wallet (if available)
* **Manual**: You must add collateral yourself before refinance

## Interest Handling

At refinance, accrued interest must be settled:

### Option 1: Add to Loan Balance

```
Original Loan:
  Principal: $10,000
  Rate: 8% APY
  Maturity: June 1
  Interest accrued: ~$197

After Refinance:
  New Principal: $10,197
  New Maturity: July 1
  Collateral: Unchanged
  Health Factor: Slightly lower
```

### Option 2: Deduct from Collateral

```
Original:
  Collateral: $15,000 ETH
  Loan: $10,000
  Interest accrued: $197

After Refinance:
  Collateral: $14,803 ETH (sold $197 to cover interest)
  Loan: $10,000 (unchanged)
  Health Factor: Lower due to reduced collateral
```

<Info>
  The protocol chooses the method that maintains the healthiest position, prioritizing user safety.
</Info>

## Refinance Scenarios

<AccordionGroup>
  <Accordion title="Successful Refinance" icon="check">
    **Situation**: Market has liquidity at acceptable rates

    **Outcome**:

    1. Interest settled
    2. New borrow order placed
    3. Order matches
    4. Loan extended

    **User experience**: Seamless, no action needed
  </Accordion>

  <Accordion title="Refinance with Collateral Top-up" icon="plus">
    **Situation**: Health factor too low after interest settlement

    **Outcome (Auto top-up enabled)**:

    1. Interest settled
    2. Protocol adds collateral from wallet
    3. New borrow order placed
    4. Loan extended

    **Outcome (Manual top-up)**:

    1. Refinance paused
    2. User notified to add collateral
    3. Must act within grace period or face liquidation
  </Accordion>

  <Accordion title="Failed Refinance (Rate)" icon="xmark">
    **Situation**: Rate ceiling exceeded

    **Outcome**:

    1. Refinance not attempted
    2. User notified immediately
    3. Grace period to repay or adjust ceiling
    4. Liquidation if no action taken

    **User experience**: Must intervene or be liquidated
  </Accordion>

  <Accordion title="Failed Refinance (Liquidity)" icon="xmark">
    **Situation**: No matching lenders available

    **Outcome**:

    1. Refinance attempted, no match
    2. User notified immediately
    3. Grace period to repay
    4. Liquidation if no action taken

    **User experience**: Must intervene or be liquidated
  </Accordion>
</AccordionGroup>

## Health Factor Considerations

Refinancing affects your health factor. Each refinance either increases your loan balance or decreases your collateral, lowering the health factor either way. [See the liquidation guide](/user-guides/borrowers/liquidation) for the full formula and safety zones.

### Maintaining Healthy Positions

<CardGroup cols={2}>
  <Card title="Monitor Health Factor" icon="heart-pulse">
    Keep health factor above 1.5 for safety margin
  </Card>

  <Card title="Add Collateral Proactively" icon="plus">
    Top up collateral before maturity if needed
  </Card>

  <Card title="Enable Auto Top-up" icon="arrows-rotate">
    Let protocol manage collateral automatically
  </Card>

  <Card title="Set Rate Ceiling" icon="arrow-up">
    Avoid refinancing at unexpectedly high rates
  </Card>
</CardGroup>

## Notifications

| Event                 | Notification                                        |
| --------------------- | --------------------------------------------------- |
| Successful refinance  | "Loan refinanced: Maturing July 1 at 8.2% APY"      |
| Refinance with top-up | "Refinanced with \$500 collateral added"            |
| Refinance failed      | "⚠️ Refinance failed: Action required"              |
| Upcoming maturity     | "Loan maturing in 24h, auto refinance enabled"      |
| Health factor warning | "⚠️ Health factor 1.2 - consider adding collateral" |

## Gas & Fees

<Info>
  **Gasless**: Auto refinance transactions are gasless, the protocol covers gas costs.
</Info>

| Fee Type     | Amount                                |
| ------------ | ------------------------------------- |
| Gas          | \$0 (protocol subsidized)             |
| Protocol fee | 0.1% of interest (same as new borrow) |

## Managing Auto Refinance

### Enabling/Disabling

Change auto refinance status at any time before maturity:

1. Navigate to position dashboard
2. Select the borrowing position
3. Toggle Auto Refinance
4. Confirm change

<Warning>
  If you disable auto refinance, set a reminder to repay before maturity!
</Warning>

### Viewing Status

Position dashboard shows:

* Auto refinance status
* Rate ceiling (if set)
* Duration setting
* Current health factor
* Projected post-refinance health factor

## Comparison: Auto vs Manual

| Aspect           | Auto Refinance   | Manual Refinance       |
| ---------------- | ---------------- | ---------------------- |
| Liquidation risk | Minimized        | High if you forget     |
| Effort           | None             | Must monitor and act   |
| Rate control     | Ceiling option   | Full control           |
| Gas              | Free             | Free (gasless)         |
| Flexibility      | Fixed parameters | Choose fresh each time |

## Best Practices

<CardGroup cols={2}>
  <Card title="Keep Buffer Collateral" icon="shield">
    Maintain 20%+ buffer above liquidation threshold
  </Card>

  <Card title="Set Reasonable Ceiling" icon="gauge">
    Rate ceiling should be 2-3% above current to allow for market movement
  </Card>

  <Card title="Enable Notifications" icon="bell">
    Always know when refinance events occur
  </Card>

  <Card title="Plan for Interest" icon="calculator">
    Remember each refinance compounds interest into principal
  </Card>
</CardGroup>

## FAQs

<AccordionGroup>
  <Accordion title="What if I want to repay instead of refinance?">
    Disable auto refinance before maturity, then repay your loan. Or repay anytime, early repayment is always allowed.
  </Accordion>

  <Accordion title="Can rates spike and trap me in a bad loan?">
    Use rate ceiling to prevent refinancing above your acceptable rate. If ceiling exceeded, you'll need to repay or adjust.
  </Accordion>

  <Accordion title="What happens to my collateral if I don't repay?">
    If refinance fails and you don't repay within the grace period, your collateral is liquidated to cover the loan.
  </Accordion>

  <Accordion title="How does interest compounding work over multiple refinances?">
    Each refinance adds accrued interest to your principal. Over multiple cycles, this compounds. Plan accordingly for long-term borrowing.
  </Accordion>

  <Accordion title="Can I partially repay and refinance the rest?">
    Yes. Repay any amount before maturity. The remaining balance (if any) will refinance according to your settings.
  </Accordion>
</AccordionGroup>

<Card title="Manage Your Loans" icon="gear" href="https://app-staging.centuari.finance">
  Configure auto refinance for your borrowing positions
</Card>
