Use Cases
The SDK guide shows you how to use individual methods. This section shows you how to combine them to build real applications.
Choose Your Path
Web dashboard, portfolio UI
Data fetching patterns, display mapping, real-time updates
Indexer, analytics, data pipeline
Historical snapshots, event indexing, state tracking
Quick Decision Guide
Need to display data to users in real-time? Start with Frontend Applications. You'll use marketRegister for cached data and compressors for fresh queries.
Need to collect and analyze historical data? Start with Backend Services. You'll index events and snapshot state at specific blocks.
Need to monitor accounts and execute on-chain actions? Start with Liquidation Bots. You'll filter accounts by health factor and use the Router for execution.
Prerequisites
Before diving into use-case guides, complete:
Setup - Install the SDK and initialize
GearboxSDKReading Data - Understand
marketRegisterand basic queries
Common Foundation: Compressors
All use cases rely on compressors for efficient data fetching. Compressors aggregate on-chain data into single calls, reducing RPC overhead.
MarketCompressor
Pool state, credit manager config, token data
CreditAccountCompressor
Account queries with filtering and pagination
PriceFeedCompressor
Oracle status and update requirements
See Compressors Reference for the complete API.
Relationship to Other Guides
The multicalls/ directory documents individual operations (add collateral, manage debt, etc.). The use-cases/ directory shows how to combine those operations with data fetching to build complete applications.
Last updated
