Credit Accounts Deep Dive

A Credit Account is your isolated smart contract on Gearbox - holding your collateral, the borrowed capital, and all your live DeFi positions simultaneously. Unlike a lending pool balance, you control every move. The Credit Manager just watches the health.

Live

Credit Accounts

Isolated leveraged positions users control - how CAs work, fund, and interact with the Gearbox pool

Live

Liquidation Mechanics

Health factors, liquidation thresholds, and how keepers clear underwater credit accounts

Live

Connected Protocols

Curve LP, Uniswap v3, Yearn strategies - the DeFi primitives Gearbox routes capital through

Live

GEAR Governance

How GEAR holders vote on protocol upgrades, fee parameters, and risk parameters

How a Credit Account is Created

Opening a Credit Account is a one-time deployment. Gearbox deploys a fresh smart contract controlled exclusively by your EOA - no multisig, no intermediary. From that moment on, every action routes through the Credit Manager for validation.

1. User Calls openCreditAccount
Deposits initial collateral (ETH, wBTC, USDC, etc.) in one transaction
->
2. Credit Manager Validates
Checks collateral value, computes initial health factor, records the account in the registry
->
3. CA Contract Deployed
A fresh smart contract is created, owned by your EOA, with zero balance initially
->
4. Borrow from Pool
Credit Account draws funds from the Gearbox pool up to the collateral factor limit
->
5. Deploy Strategy
Route capital to Curve, Uniswap v3, Yearn - through whitelisted integrations only
Key point: The Credit Account contract is not upgradeable and has no admin key held by Gearbox. If Gearbox were fully compromised, the attacker still could not redirect funds from existing Credit Accounts - only new openings would be affected. This is the isolation guarantee."

? Credit Account Simulator

Choose your collateral type, set your deposit, and dial in the leverage. See how much you can borrow, what your health factor starts at, and what strategies open up at each leverage level.

Your Deposit
$10,000
Borrowed Amount
$40,000
Total Position
$50,000
Effective Collateral ( CF)
$9,000
Initial Health Factor
1.13
? Thin buffer - volatile collateral needs attention
Strategy Fit
Viable
Delta-neutral strategies can hold at this leverage

? The Credit Manager: Gearbox's Gatekeeper

The Credit Manager is the central contract mediating every action on a Credit Account. It validates actions, tracks health, and can trigger liquidations. It has no custody - only judgment.

Action Validation
Every Credit Account call passes through the CM. Invalid calls (e.g., calling non-whitelisted protocols) revert before execution.
Health Tracking
The CM recomputes the health factor on every state change - collateral value updates, borrows, position opens/closes.
?
Liquidation Trigger
When HF < 1.0, the CM flags the account as liquidatable and allows keepers to seize and close positions.
Whitelist Registry
CM maintains the whitelist of approved protocols and function signatures - constrainable by GEAR governance.
function openCreditAccount(address token)
// Validate collateral > minimum
// Compute initial health factor
// Deploy new CA contract
// Register in CreditManager registry
function addCollateral(address token, uint256 amount)
// Increases collateral balance
// Recomputes HF - may move account from at-risk to healthy
function borrow(address token, uint256 amount)
// Checks: post-borrow HF must be >= 1.0
// Adds borrowed amount to debt balance

Multi-Position Credit Account

A single Credit Account can hold multiple DeFi positions simultaneously. The Credit Manager aggregates all of them into one health factor. This enables sophisticated strategies that would be impossible on a single-protocol platform.

Curve LP Position
stETH/wETH pool - $20,000 notional
+$320 P&L this week
Uniswap v3 USDC/ETH Range
0.3% fee tier, tick range 1800-2200 - $15,000 notional
+$180 fees earned
Yearn yUSDT Vault
$10,000 deposited - auto-compounding yield
+2.4% APY
Total Collateral
$45,000
Total Borrows
$36,000
Aggregate Health Factor
1.29
Why aggregate? A delta-neutral position ( Uniswap range + ETH short via Curve) can reduce your net directional exposure while still earning fees. The Credit Manager sums all collateral and all debt - a winning Uniswap position offsets a losing Curve position in the aggregate health computation.

How a Credit Account actually works

A Credit Account is a dedicated smart contract deployed by the Gearbox factory when you call openCreditAccount. The contract is bare-bones - it has no logic of its own except to proxy calls through the Credit Manager. When you "use" the Credit Account, you're calling the Credit Manager which then calls the CA, which in turn calls the approved DeFi protocol. This triple-proxy design is what makes Gearbox's isolation possible: the CA can only interact with what the CM has whitelisted.

When you deposit collateral, it enters the Credit Account contract - not the pool. The pool never has access to individual CA collateral. When you borrow, the pool sends funds to your CA, and your CA's debt balance increases. The pool tracks aggregate debt, not individual positions. This is the key structural difference from Aave: on Aave your deposit is in the pool's custody; on Gearbox your collateral stays in your own contract, with the pool having a debt claim against it.

Every time you open a new DeFi position through the CA (e.g., add liquidity to a Curve pool), the CM records that position in the CA's internal list. The CM knows the current value of each position by querying the connected protocol's state (via price oracles and protocol read functions). The health factor is recomputed as: (sum of position values collateral factors) / total borrows.

The whitelist mechanism

The Credit Manager maintains a whitelist: a list of (protocol address, function signature) pairs that Credit Accounts are allowed to call. This is a stark security constraint - it means that even if your EOA is compromised, the attacker cannot transfer funds to an arbitrary address; they can only interact with approved DeFi protocols in approved ways.

The whitelist is parameterized by GEAR governance. New connected protocols (like a new Curve pool or a new Yearn vault) can be added via a governance vote. This means Gearbox can expand its strategy offerings over time without compromising the security model for existing accounts.

Functionally, the whitelist means the CM checks each incoming call from a Credit Account against the allowed list before executing. Invalid calls revert. This is similar to how EOA permissions work in hardware wallet firmware - allowlist by default, anything not explicitly permitted is blocked.

Frequently asked questions

How is a Credit Account created on Gearbox?
A Credit Account is created by calling the openCreditAccount function on the Credit Manager, depositing collateral (ETH, wBTC, USDC, or other approved assets) in the process. The protocol deploys a dedicated smart contract for you - no keys are held by Gearbox, and you control all subsequent actions through that contract. The account is tied to your address but isolated from other users' positions.
What is the Credit Manager's whitelist and why does it exist?
The Credit Manager maintains a whitelist of approved DeFi protocols and function signatures that Credit Accounts may call. This constrains the attack surface: even if an attacker compromises your EOA, they cannot drain funds to arbitrary addresses - only pre-approved protocol interactions are valid. The whitelist is managed by GEAR governance and can be extended to new integrations over time.
What collateral types does Gearbox accept?
Gearbox accepts a curated set of assets: ETH, wBTC, USDC, USDT, DAI, and in some versions LINK and other approved tokens. Each asset has its own collateral factor (the percentage of value that can be borrowed against it). ETH and wBTC have lower collateral factors due to price volatility; stablecoins typically have 95-100% collateral factors.
What is the maximum leverage available on Gearbox?
Maximum leverage is determined by the collateral factor. With a 90% collateral factor (e.g., ETH on mainnet), you can borrow 9x your deposit - giving you up to 10x total position (1 deposit + 9 borrowed). Some asset pairs allow 95% collateral factors, pushing max leverage slightly higher. The effective leverage also depends on what strategy you run; some strategies require maintaining a buffer above 1.0 health factor in practice.
How does borrowing work - is it at a fixed or variable rate?
Borrow rates on Gearbox are variable, set by the interest rate model that GEAR governance controls. The rate typically has a slope that increases with utilization (how much of the pool is lent out). As a Credit Account holder, you pay interest on your full borrowed balance. Interest accrues per block and is settled when you repay or when the account is liquidated.
Can a Credit Account have multiple open positions simultaneously?
Yes - this is one of Gearbox's key differentiators. A single Credit Account can hold positions in Curve LP pools, Uniswap v3 concentrated liquidity ranges, and Yearn vaults all at once. The Credit Manager aggregates all positions and computes a single health factor for the account. This means your ETH LP position and your ETH short volatility position can offset each other, creating delta-neutral or complex multi-legged strategies.
What happens when you close a Credit Account?
To close a Credit Account you must repay your borrowed balance plus accrued interest. The protocol then releases your remaining collateral back to you. If you have open DeFi positions (e.g., Uniswap v3 liquidity), you must first exit those positions - the Credit Manager will not allow you to close with active positions. This means closing a leveraged position requires careful sequencing: close DeFi positions first, repay debt, then withdraw residual collateral.
Can you add more collateral after opening a Credit Account?
Yes. You can call addCollateral on the Credit Manager at any time to deposit additional collateral into an open Credit Account. This improves your health factor without taking on more debt - useful if your positions have moved against you or if you want to borrow additional funds without increasing your effective leverage ratio.