# Credit Accounts

> Markdown export of the Gearbox Protocol documentation page for agents and retrieval systems.

Canonical page: https://docs.gearbox.finance/developers/gm-concept-accounts
Source file: content/developers/gm-concept-accounts.mdx
Section router: https://docs.gearbox.finance/developers/llms.txt
Section full export: https://docs.gearbox.finance/developers/llms-full.txt

A Credit Account is the core primitive of Gearbox Protocol. It is an isolated smart contract that holds a borrower's collateral and borrowed funds, enabling leveraged interaction with DeFi protocols while maintaining strict solvency guarantees.

## The Credit Suite

Each Credit Account belongs to a **Credit Suite** — a trio of tightly coupled contracts:

```mermaid
flowchart TD
    User[User / Bot]
    Curator[Market Curator]

    subgraph "Credit Suite"
        Facade[Credit Facade]
        Manager[Credit Manager]
        Config[Credit Configurator]
    end

    subgraph "Infrastructure"
        Pool[Pool V3]
        Oracle[Price Oracle]
        Account[Credit Account]
    end

    User -->|"multicall"| Facade
    Curator -->|"configure"| Config

    Config -->|"updates"| Facade
    Config -->|"updates"| Manager

    Facade -->|"validates & routes"| Manager
    Manager -->|"borrows/repays"| Pool
    Manager -->|"deploys/manages"| Account
    Manager -->|"valuation"| Oracle
```

### Credit Facade (Entry Point)

The user-facing contract. Borrowers submit multicall transactions here. The Facade validates requests, routes operations to the Credit Manager, and enforces the final solvency check.

### Credit Manager (Accounting Engine)

The core logic contract. It tracks debt, manages collateral, calculates health factors, and interacts with the Pool for borrowing/repayment. The Credit Manager maintains the registry of all Credit Accounts and their state.

### Credit Configurator (Admin Interface)

The governance contract. Market Curators use it to manage risk parameters — collateral tokens, liquidation thresholds, adapters, fees, and debt limits. All impactful changes pass through timelocks.

## Account Lifecycle

1. **Open** — User deposits collateral and borrows from the Pool. A Credit Account contract is deployed (or reused from a pool of pre-deployed accounts).

2. **Operate** — User executes multicalls: swap collateral, farm yield, adjust leverage. All operations happen *inside* the Credit Account. The user never directly touches Pool liquidity.

3. **Monitor** — The account's Health Factor (collateral value vs. debt) is continuously assessable. If it drops below 1, the account becomes liquidatable.

4. **Close** — User repays all debt + interest + fees. Remaining collateral is returned to the user's wallet. The Credit Account is returned to the reuse pool.

## Key Properties

**Isolation** — Each Credit Account is a separate contract. One account's operations or losses cannot affect another.

**Check-on-Exit** — Any sequence of whitelisted operations is allowed within a multicall, but the account must remain solvent (HF >= 1) when the multicall ends. This enables complex strategies that may be temporarily insolvent mid-execution.

**Non-Custodial** — Neither the protocol nor the Market Curator can access funds inside a Credit Account. Only the account owner (and authorized bots with explicit permissions) can operate on it.

**Composable** — Through Adapters, Credit Accounts can interact with any whitelisted DeFi protocol (Uniswap, Curve, Lido, Aave, etc.) as if they were regular EOA wallets — but with solvency enforcement.

## Configuration Parameters

Market Curators define the risk profile for all Credit Accounts in their suite:

| Parameter | Description |
| --- | --- |
| **Liquidation Threshold (LT)** | Per-token discount factor for solvency calculation. LT of 85% means \$100 of ETH counts as \$85 toward collateralization. |
| **Collateral Tokens** | Allowed tokens in Credit Accounts. Unlisted tokens are valued at zero. |
| **Adapters** | Whitelisted DeFi protocol integrations (Uniswap, Curve, etc.). |
| **Debt Limits** | Minimum and maximum debt per account, preventing dust or concentration risk. |
| **Fees** | Liquidation fee (to protocol) and liquidation premium (to liquidator). |

## Learn More

- **How operations are batched and executed** — [Multicall System](https://docs.gearbox.finance/developers/gm-concept-multicalls)
- **How solvency is measured and enforced** — [Health Factor & Risk](https://docs.gearbox.finance/developers/gm-concept-risk)
- **Working with Credit Accounts in code** — [Credit Accounts (SDK)](https://docs.gearbox.finance/developers/gm-accounts)
