> ## Documentation Index
> Fetch the complete documentation index at: https://docs.starkfi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Yield Aggregator overview

> Earn yield on Solana through Jupiter Lend and Kamino — build unsigned transactions and broadcast on your RPC or via StarkFi.

The Yield Aggregator lets you move user funds into DeFi lending strategies on Solana, track on-chain balances, and rebalance between protocols. Build endpoints return **unsigned Solana transactions** (base64 wire). You sign them in your app, then either broadcast with your own RPC or use StarkFi's optional yield broadcast.

<Info>
  The Yield Aggregator requires the `yield` product flag. Check [`GET /config/products`](/products) (authenticated) before integrating.
</Info>

## Supported providers

| Provider     | ID             | Description                |
| ------------ | -------------- | -------------------------- |
| Jupiter Lend | `jupiter_lend` | Lending markets on Jupiter |
| Kamino       | `kamino`       | Kamino vault lending       |

Both providers run on **Solana**. Use [`GET /yield/strategies`](/Get-available-routes) to list live strategies, APY, TVL, and token metadata. Cache this response for up to 10 hours.

## Typical flow

<Steps>
  <Step title="Discover strategies">
    [`GET /yield/strategies`](/Get-available-routes) — all strategies.

    [`GET /yield/strategies/:symbol`](/get-strategy) — filter by token symbol (e.g. `USDC`).
  </Step>

  <Step title="Build an operation">
    * **Deposit:** [`POST /yield/deposit`](/build-deposit-operation)
    * **Withdraw:** [`POST /yield/withdraw`](/build-withdraw-operation)
    * **Rebalance:** [`PATCH /yield/rebalance`](/build-rebalance-operation)
  </Step>

  <Step title="Sign the transaction">
    Sign the base64 wire returned in `data.transaction` (or `data.details.transaction` for rebalance) with the user's wallet.
  </Step>

  <Step title="Broadcast (your choice)">
    **Option A — Your RPC:** send the signed transaction with your own Solana RPC (public or private).

    **Option B — StarkFi yield broadcast:** submit via [`POST /yield/broadcast`](/broadcast-your-operations) if you prefer not to operate a private RPC. StarkFi relays and confirms the transaction for you.
  </Step>

  <Step title="Track earnings">
    [`GET /yield/earnings`](/get-user-earns) — live protocol balance for a wallet, asset, and provider.
  </Step>
</Steps>

<Warning>
  **StarkPay broadcast is still required.** [`POST /payment/execute/on-chain`](/broadcast-transactions) must be used for all StarkPay on-chain payments. The optional broadcast described here applies **only** to Yield Aggregator operations.
</Warning>

## Deposit fees

Deposit builds may include StarkFi and whitelabel fees embedded in the transaction. The response includes:

* `charged_starkfi_fee_amount`
* `charged_whitelabel_fee_amount`
* `starkfi_fee_percentage_applied`
* `used_yield_starkfi_custom_fee`

## Rebalance modes

Cross-protocol rebalance sends `provider_out` (withdraw leg) and `provider_in` (deposit leg):

```json theme={null}
{
  "chain_name": "solana",
  "wallet": "<pubkey>",
  "asset": "USDC",
  "amount": "10.0",
  "provider_out": "kamino",
  "provider_in": "jupiter_lend"
}
```

When both legs use the same protocol, send a single `provider` field instead. The response returns an unsigned transaction in `details.transaction` with `mode: single_transaction` when instructions fit in one packet.

## Rebalance opportunities

[`GET /yield/rebalance-opportunities`](/get-rebalance-oportunities) compares APY across providers for a token.

## Related guides

* [Get available routes](/Get-available-routes)
* [Build deposit operation](/build-deposit-operation)
* [Build withdraw operation](/build-withdraw-operation)
* [Build rebalance operation](/build-rebalance-operation)
* [Broadcast yield operations](/broadcast-your-operations) (optional)
