> ## 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.

# How It Works

> Understanding Centuari's fixed-rate lending mechanics

## Overview

Centuari matches lenders and borrowers at agreed-upon fixed rates through an order book mechanism. Liquidity flows from multiple chains to Arbitrum, where all matching and execution occurs.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/centuari/assets/gifs/how-it-works-overview.gif" alt="Animated diagram showing cross-chain liquidity flowing to Arbitrum order book" />
</Frame>

## The Hybrid Order Book Model

Unlike pool-based protocols (Aave, Compound) where rates are algorithmically determined, Centuari uses a **hybrid order book** where users explicitly state their desired rates.

<CardGroup cols={2}>
  <Card title="Lenders Post Orders" icon="plus">
    "I want to lend 10,000 USDC at 8% APY maturing June 1"
  </Card>

  <Card title="Borrowers Post Orders" icon="minus">
    "I want to borrow 10,000 USDC at 8% APY maturing June 1"
  </Card>
</CardGroup>

When a lender's ask matches a borrower's bid, the order executes and both parties lock in their fixed rate.

### Hybrid Architecture

<Info>
  **Off-chain Orders, On-chain Settlement**: Orders are stored and matched off-chain for speed and zero gas costs. Settlement happens on Arbitrum smart contracts for security and trustlessness.
</Info>

| Component           | Location            | Purpose                               |
| ------------------- | ------------------- | ------------------------------------- |
| Order Storage       | Off-chain           | Fast order placement & cancellation   |
| Order Matching      | Off-chain           | Instant matching engine               |
| Settlement          | On-chain (Arbitrum) | Trustless execution of matched orders |
| Position Management | On-chain            | CBT tokens, collateral, redemptions   |

## Cross-Chain Architecture

<Info>
  **Arbitrum is the home chain.** All core protocol activity and capital execution happens on Arbitrum, with liquidity aggregated from multiple source chains.
</Info>

### Supported Chains

| Chain    | Status | Role                   |
| -------- | ------ | ---------------------- |
| Arbitrum | ✅ Live | Home chain (execution) |
| Ethereum | ✅ Live | Liquidity source       |
| Polygon  | ✅ Live | Liquidity source       |
| Optimism | ✅ Live | Liquidity source       |
| Base     | ✅ Live | Liquidity source       |

### How Cross-Chain Works

<Steps>
  <Step title="Deposit on Any Chain">
    Users deposit assets on their preferred chain
  </Step>

  <Step title="Bridge to Arbitrum">
    Assets are securely bridged to Arbitrum
  </Step>

  <Step title="Match on Order Book">
    Orders are matched on Arbitrum's order book
  </Step>

  <Step title="Execute Position">
    Positions are created and managed on Arbitrum
  </Step>
</Steps>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/centuari/assets/gifs/cross-chain-flow.gif" alt="Animation showing liquidity flowing from Ethereum, Polygon, and Optimism to Arbitrum order book" />
</Frame>

## Gas Fees Explained

Centuari minimizes gas costs through its hybrid architecture:

### What's Gasless

| Action           | Gas Cost | Notes                     |
| ---------------- | -------- | ------------------------- |
| Placing orders   | **\$0**  | Off-chain, no gas         |
| Canceling orders | **\$0**  | Off-chain, no gas         |
| Modifying orders | **\$0**  | Off-chain, no gas         |
| Order matching   | **\$0**  | Off-chain matching engine |

### What Requires Gas

| Action            | Gas Cost | Notes                      |
| ----------------- | -------- | -------------------------- |
| Depositing funds  | Very low | On-chain (Arbitrum)        |
| Withdrawing funds | Very low | On-chain (Arbitrum)        |
| Settlement        | Very low | On-chain after order match |

<Info>
  **Why Arbitrum?** Arbitrum's L2 scaling means gas costs for deposits/withdrawals are typically under \$0.10, a fraction of Ethereum mainnet costs.
</Info>

### Cross-Chain Bridging

When depositing from other chains (Ethereum, Polygon, etc.), bridging fees apply. Fast bridging is used for quick settlement, typically completing within minutes.

## Position Lifecycle

### For Lenders

```mermaid theme={null}
graph LR
    A[Deposit Capital] --> B[Place Lend Order]
    B --> C{Order Matched?}
    C -->|Yes| D[Receive CBT]
    C -->|No| E[Wait in Order Book]
    D --> F{At Maturity}
    F -->|Auto Rollover ON| G[New Position Created]
    F -->|Auto Rollover OFF| H[Receive Principal + Interest]
    D --> I[Early Exit: Sell CBT]
```

### For Borrowers

```mermaid theme={null}
graph LR
    A[Deposit Collateral] --> B[Place Borrow Order]
    B --> C{Order Matched?}
    C -->|Yes| D[Receive Loan]
    C -->|No| E[Wait in Order Book]
    D --> F{At Maturity}
    F -->|Auto Refinance ON| G[Position Refinanced]
    F -->|Auto Refinance OFF| H[Repay Loan]
```

## The Centuari Bond Token (CBT)

When lenders' orders are matched, they receive CBT representing their position. CBT works like a Zero Coupon Bond -- you receive more CBT than your deposit at a discount, and each is worth \$1 at maturity. The extra CBT represents your fixed interest.

[Learn more about CBT](/products/fixed-rate/cbt)

## Matching Mechanism

Orders are matched using a price-time priority algorithm:

1. **Best price first**: Orders offering better rates match first
2. **Time priority**: Among equal rates, earlier orders match first
3. **Partial fills**: Large orders can be filled across multiple counterparties

<Info>
  Liquidity providers can earn the spread by posting both lend and borrow orders, similar to market makers on traditional exchanges.
</Info>

## Key Protocol Parameters

| Parameter          | Value        | Description                       |
| ------------------ | ------------ | --------------------------------- |
| Maturity dates     | 1st of month | Predetermined dates, max 3 active |
| Minimum order size | 1 USDC       | Smallest order allowed            |
| Collateral ratio   | 110-150%     | Varies by asset type              |

### Predetermined Maturity System

Centuari uses a rolling system of predetermined maturity dates:

* All positions mature on the **1st of each month**
* Maximum **3 maturity dates** active at any time
* Auto-rotates when nearest maturity passes

## What Happens at Maturity

<CardGroup cols={2}>
  <Card title="Lenders" icon="piggy-bank">
    * **Auto rollover ON**: Position automatically extends at current market rate
    * **Auto rollover OFF**: Receive principal + interest in your wallet
  </Card>

  <Card title="Borrowers" icon="hand-holding-dollar">
    * **Auto refinance ON**: Loan automatically rolls to best available rate
    * **Auto refinance OFF**: Must repay loan or face liquidation
  </Card>
</CardGroup>

## Security Model

<AccordionGroup>
  <Accordion title="Smart Contract Security">
    All contracts are audited by multiple firms and covered by bug bounty.
  </Accordion>

  <Accordion title="Collateral Management">
    Borrower collateral is held in secure vaults with automated liquidation.
  </Accordion>

  <Accordion title="Cross-Chain Bridges">
    Only battle-tested bridge infrastructure is used for cross-chain transfers.
  </Accordion>
</AccordionGroup>

<Card title="Dive deeper" icon="arrow-right" href="/products/fixed-rate/overview">
  Explore the Fixed Rate product in detail
</Card>
