# Smart Contracts

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

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

The Gearbox V3 protocol is composed of several interconnected Solidity contracts. This section provides a contract-level reference organized by **Write Methods**, **View Methods**, and **Events** for each core contract.

## Contract Architecture

The Credit Suite handles leveraged positions through three tightly coupled contracts:

- **[Credit Manager](https://docs.gearbox.finance/developers/gm-ref-cm)** -- Core accounting engine. Tracks debt, collateral, and health factors for all Credit Accounts.
- **[Credit Facade](https://docs.gearbox.finance/developers/gm-ref-cf)** -- User-facing entry point. Handles multicall execution, access control, and debt limit enforcement.
- **[Credit Configurator](https://docs.gearbox.finance/developers/gm-ref-cc)** -- Administrative gateway. Validates and propagates parameter changes to the Credit Manager and Facade.

The Pool layer manages liquidity and risk parameters:

- **[Pool (PoolV3)](https://docs.gearbox.finance/developers/gm-ref-pool)** -- ERC-4626 vault that holds underlying assets. Credit Managers borrow from it; LPs deposit into it.
- **[Quota Keeper](https://docs.gearbox.finance/developers/gm-ref-qk)** -- Manages per-token quota limits and interest rates. Controls collateral exposure at the pool level.

Data aggregation is handled by periphery contracts:

- **[Compressors](https://docs.gearbox.finance/developers/gm-ref-compressors)** -- Read-only contracts that aggregate on-chain state into single calls. Used by the SDK, bots, and on-chain integrations.

## How to Use This Reference

Each contract page lists method signatures, parameter tables, return values, and emitted events. Methods are grouped into:

| Section | Description |
| --- | --- |
| **Write Methods** | State-changing functions (transactions) |
| **View Methods** | Read-only functions (free calls) |
| **Events** | Emitted log entries for indexing and monitoring |

For conceptual guides and tutorials, see the main [Developers](/developers) section.
