Adapters & Integrations
A Credit Account is a secure "Container." By default, it cannot interact with the outside world because the protocol cannot guarantee the safety of external smart contracts.
Adapters are the solution. They are specialized "Translation Contracts" that allow Credit Accounts to interact with specific DeFi protocols (like Uniswap, Curve, or Lido) while maintaining the strict solvency checks required by Gearbox.
Modular Execution: Purpose-Optimized UX
Gearbox’s modular architecture unifies credit and execution.
The Core Layer: Provides the capital and enforces solvency (Health Factor).
The Adapter Layer: Extends this base with purpose-specific execution rules.
This allows Curators to design Financial Products tailored for specific use cases. One product might be optimized for Prediction Markets (interacting with order books), while another is optimized for Yield Farming (interacting with vaults).

The Security Problem: Unrestricted Execution
A Credit Account holds leveraged funds. If users could interact directly with any smart contract, they could exploit complex DeFi mechanics to bypass solvency checks.
How Adapters Fix This: Adapters act as a Sanitized Interface. They restrict interactions to a specific, pre-defined set of functions that have been audited for safety.
Function Whitelisting: Users cannot call
anyfunction on Uniswap; they can only call the specificswapfunctions defined in the Adapter.Result Verification: The Adapter ensures that the outcome of the trade (the tokens received) matches the protocol's expectations, preventing complex state manipulation attacks.
By forcing all interactions through these "Safe Tunnels," Gearbox ensures that the Credit Account's state remains predictable at all times.
The Router: Intelligent Execution
While Adapters provide the connection, the Router provides the path.
DeFi strategies are rarely simple. A user might want to "Zap" from USDC directly into a Convex Curve-stETH position. This requires multiple steps:
Swap USDC -> WETH (Uniswap)
Deposit WETH -> stETH (Lido)
Deposit stETH + WETH -> steCRV (Curve)
Stake steCRV -> Convex
The Gearbox Router calculates the optimal path across all enabled Adapters and bundles these steps into a single Multicall.

Curator Responsibilities
As a Curator, the choice of Adapters defines the Utility of the market.
Enable Liquidity: If a market accepts
wstETHas collateral, the Curator should enable DEX Adapters (e.g., Uniswap or Curve) that supportwstETHtrading. Without it, users cannot swap into the Debt token. Limited allowed adapters will result in high slippage losses.Enable Yield: To offer a "Farming Strategy," the Curator must enable the specific Adapter for that farm (e.g., the Convex Adapter or Midas vault adapter).
Risk Management: If a specific external protocol is hacked or becomes risky, the Curator can Disable that specific Adapter instantly via the Emergency Admin, protecting the pool from further exposure.
Learn More
Solvency checks: How accounts are kept overcollateralized after each operation?
Unique usecases: How Credit Accounts and adapters unlock new credit interactions.
Last updated