DocumentationOpen App

Opportunities

An Opportunity is any way to earn yield in Gearbox, presented at the highest level of abstraction. It is the entry point for discovery — before you decide whether to lend or leverage, you search opportunities.

Unified Discovery

sdk.opportunities.search() returns a unified list of all opportunity types across all chains and pools. This single call replaces the need to separately query pools, strategies, and markets.

TypeScript
// Search all opportunities const all = await sdk.opportunities.search(); // Filter by criteria const highYield = await sdk.opportunities.search({ minApy: 5, chainId: 1, assetClass: "stablecoin", });

Opportunity Types

There are two opportunity types available today, with two more planned:

Available Now

TypeDescriptionUser Role
Lender Opportunity (pool)Provide liquidity to a Pool, receive Diesel Tokens, earn passive yieldLender / LP
Strategy Opportunity (strategy)Borrow from a Pool, deploy capital via a Credit Account with leverageBorrower / Strategist

Future Types (Not Yet Implemented)

TypeDescriptionUser Role
Intent Opportunity (intent)Limit-order style LP with custom terms (P2P supply side)Lender
Intent Strategy (intent_strategy)P2P leveraged position with bespoke termsBorrower

Opportunity Fields

Every opportunity shares a common shape regardless of type:

TypeScript
interface Opportunity { id: string; // Unique identifier chainId: number; // Chain where this opportunity exists type: OpportunityKind; // "pool" | "strategy" | "market" headlineApy: number; // Primary APY figure (supply APY or net strategy APY) depositToken: string; // Token you deposit to enter capacity: bigint; // Available liquidity / remaining capacity access: string; // Access control level curator?: string; // Curator managing this opportunity riskScore?: number; // Backend-enriched risk assessment }

Strategy opportunities add fields like targetToken, leverage, and adapters. Pool opportunities add fields like utilizationRate and dieselToken.

Learn More