Smart Contracts
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 -- Core accounting engine. Tracks debt, collateral, and health factors for all Credit Accounts.
- Credit Facade -- User-facing entry point. Handles multicall execution, access control, and debt limit enforcement.
- Credit Configurator -- Administrative gateway. Validates and propagates parameter changes to the Credit Manager and Facade.
The Pool layer manages liquidity and risk parameters:
- Pool (PoolV3) -- ERC-4626 vault that holds underlying assets. Credit Managers borrow from it; LPs deposit into it.
- Quota Keeper -- Manages per-token quota limits and interest rates. Controls collateral exposure at the pool level.
Data aggregation is handled by periphery contracts:
- 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 section.