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

# How It Works

> Protocol mechanics and user flows

## Protocol Overview

```mermaid theme={null}
flowchart TD
    subgraph Users
        B[Borrower]
        S[Supplier]
        L[Liquidator]
    end

    subgraph Protocol
        LP[LendingPool]
        IRM[InterestRateModel]
        PF[Pricefeed]
    end

    B -->|Deposit NFT| LP
    B -->|Borrow Tokens| LP
    S -->|Supply Liquidity| LP
    S -->|Earn Interest| LP
    L -->|Liquidate| LP
    LP --> IRM
    LP --> PF
```

## Supplying Liquidity

1. Connect wallet to the Pulend app
2. Navigate to **Earn** page
3. Select amount to supply
4. Approve and confirm transaction
5. Start earning interest immediately

Your share of the pool is tracked via internal accounting. Interest accrues continuously based on borrower activity.

## Borrowing

1. Navigate to **Borrow** page
2. Select an NFT to use as collateral
3. Deposit the NFT into the protocol
4. Choose borrow amount (up to max LTV)
5. Confirm transaction and receive tokens

<Warning>
  Monitor your health factor. If it drops below 1.0, your position can be
  liquidated.
</Warning>

## Repaying

1. Go to **My Position** page
2. Enter repayment amount
3. Approve token spending
4. Confirm repayment transaction
5. Withdraw collateral after full repayment

## Liquidation Process

When a position's health factor falls below 1.0:

1. Liquidator identifies unhealthy position
2. Liquidator repays portion of debt
3. Protocol transfers equivalent collateral + bonus
4. Borrower's debt is reduced

<Note>
  Liquidation bonus incentivizes liquidators to maintain protocol health.
</Note>
