Skip to main content

What is RebelFi SDK?

The RebelFi SDK is a TypeScript library that enables platforms to generate yield on stablecoin balances. It provides a simple interface for:
  • Discovering yield venues and strategies
  • Planning supply and unwind operations
  • Tracking allocations and earnings
  • Managing transaction submission
Full custody is maintained throughout the entire process — funds never leave your wallets.

Key Concepts

Venues

A venue represents a DeFi protocol that offers yield opportunities. Examples include AAVE and Morpho (Ethereum/Polygon/Base), Kamino and Drift (Solana), and other lending/yield protocols.

Strategies

A strategy is a specific yield opportunity within a venue. Each strategy has:
  • A supported token (e.g., USDC)
  • Current APY
  • Minimum/maximum deposit limits

Allocations

An allocation represents a user’s position in a strategy. It tracks:
  • Principal (original amount deposited)
  • Current value (including accrued yield)
  • Total yield earned

Operations

An operation is a business action like supplying funds to a strategy or unwinding a position. Operations contain one or more transactions that need to be signed.

Transactions

A transaction is a blockchain transaction within an operation. Transactions go through these states:
  • unsigned: Transaction built, waiting for user signature
  • pending: Signed and broadcast, waiting for confirmation
  • confirmed: Successfully confirmed on-chain
  • failed: Transaction failed (reverted, timeout, etc.)

SDK vs Direct API

The SDK is a thin wrapper around the REST API with added benefits: Use the SDK for TypeScript/JavaScript applications. Use the API directly for other languages or when you need maximum control.

Wallet Identifiers

The SDK accepts multiple wallet identifiers interchangeably:
  • walletAddress — the on-chain address (recommended)
  • walletId — RebelFi’s internal numeric ID (returned from wallet registration)
  • userId — your application’s user identifier (if set during registration)
All examples in this documentation use walletAddress. You can substitute walletId or userId anywhere a wallet identifier is accepted.

Supported Blockchains

Next Steps

Quickstart

Install the SDK and make your first supply

Integration Tutorial

Complete walkthrough with wallet integration