Skip to main content
The Hubra Agent API exposes four canonical strategies. Adding a new strategy is one entry in the server-side registry; the agent surface picks it up automatically.

Strategy keys

KeyAssetRouteStatus
sol-native-stakeSOLNative delegation to Hubra’s validatorlive
sol-liquid-stakeSOLMint raSOL via Sanctumlive
sol-leveraged-stakeSOLAuto-managed leveraged raSOL (raSOL Max)live
usdc-earnUSDCVoltr USDC vaultlive
All four are returned by GET /api/v1/strategies. Each has a detailed view at GET /api/v1/strategies/{key}. All four are fully agent-callable: actions.stake and actions.unstake are populated for each, and /api/v1/stake, /api/v1/unstake, and /api/v1/quote build transactions for them.

sol-native-stake

Direct delegation to Hubra’s Solana validator. The agent’s wallet creates a stake account, delegates voting rights to Hubra’s vote account, and retains both stake authority and withdraw authority.
Asset inSOL
Asset outNone (you keep the stake account)
Validator vote account7K8DVxtNJGnMtUY1CQJT5jcs8sFGSZTDiG7kowvFpECh
Stake actionsdelegate
Unstake actionsdeactivate, instant

Stake mechanics

POST /api/v1/stake returns a partially-signed transaction. The server generates a fresh stake-account keypair and pre-signs that signature slot. The agent only signs as the wallet. The new stake-account pubkey is returned in the response under stakeAccountsave it, you need it for future deactivate / withdraw / instant unstake.

Unstake mechanics

  • kind: "deactivate" triggers StakeProgram.deactivate. After the deactivation epoch (~2 to 3 days), call POST /api/v1/withdraw to close the stake account and pull SOL back.
  • kind: "instant" routes the active stake account through Sanctum’s depositStake for immediate SOL.
Both kinds require the stakeAccount pubkey returned by the original /stake call.

sol-liquid-stake

Mint raSOL by depositing SOL into Sanctum. raSOL is a non-rebasing receipt token for SOL staked with Hubra’s validator.
Asset inSOL
Asset outraSOL (HUBsveNpjo5pWqNkH57QzxjQASdTVXcSK7bVKTSZtcSX)
Stake actionsmint
Unstake actionsinstant, slow

Stake mechanics

POST /api/v1/stake returns an unsigned Sanctum-routed transaction. The response carries route: "sanctum", sanctumKind: "token", and a sanctum_order object. Forward all three (plus hubra_token) to /broadcast if you want Sanctum’s MEV-protected broadcaster.

Unstake mechanics

  • kind: "instant" swaps raSOL → SOL via Sanctum’s pooled LST liquidity.
  • kind: "slow" runs Sanctum withdrawStake to convert raSOL into a native stake account, then standard epoch deactivation.
Both pass through Sanctum and require the Sanctum-specific fields at broadcast time.

sol-leveraged-stake

Hubra’s auto-managed leveraged raSOL strategy (raSOL Max). Deposit SOL, receive a raSOL Max LP receipt whose redemption rate drifts up each epoch as the leveraged position earns amplified staking yield. The strategy levers up when conditions are favorable and unwinds when borrow costs rise; you don’t manage anything.
Asset in (API)SOL (So11111111111111111111111111111111111111112)
ReceiptraSOL Max LP (CJEYakpjmKBvvUzAn3HJSs9vtijnv472T8YJEV3WzToF)
Vault deposit mintraSOL (HUBsveNpjo5pWqNkH57QzxjQASdTVXcSK7bVKTSZtcSX)
Stake actionsdeposit
Unstake actionsinstant

Live data

GET /api/v1/strategies/sol-leveraged-stake returns the live block:
  • live.apy — latest captured leveraged APY in percent, from the daily-cron loadRasolMaxApySnapshot source the leverage page also reads.
  • live.exchangeRate — NAV-per-LP (1 raSOL Max → N raSOL), the redemption rate at the latest captured epoch.
GET /api/v1/apy/history?strategy=sol-leveraged-stake returns the per-epoch bar-chart series (~12 points). Since the upstream is a single snapshot stream, the same series is returned under each range key.

Stake mechanics

POST /api/v1/stake takes amount in SOL and returns a single unsigned transaction that does the whole conversion: create the raSOL ATA (idempotent) → SPL stake-pool DepositSol (SOL → raSOL) → Voltr depositVault (raSOL → raSOL Max LP). One signature, atomic. Broadcast via route: "rpc". The vault ingests raSOL internally, but the agent endpoint deposits SOL only — there is no “deposit raSOL directly” variant.

Unstake mechanics

POST /api/v1/unstake with kind: "instant" burns raSOL Max LP (amount = LP to burn) and pays out raSOL, via the rasol-max SDK’s vault-idle (1 ix) or flash-bracket (8–10 ixs + ALT) path — the response path field tells you which. The first redemption per wallet lazily initialises a MarginFi account (~0.005 SOL one-shot rent). Broadcast via route: "rpc". The leveraged exit stops at raSOL. To finish to SOL, pass outputAsset: "SOL" — the response keeps the same single LP → raSOL transaction and adds a next step that converts the resulting raSOL → SOL via a sol-liquid-stake instant unstake (a separate, non-atomic second tx). See POST /api/v1/unstake.

Quote

POST /api/v1/quote previews the raSOL payout for burning a given LP amount and the redemption path. There is no deposit-side quote — the SOL → raSOL mint is a deterministic floor-division from the live pool snapshot.

usdc-earn

Deposit USDC into the Voltr-routed Hubra Earn vault.
Asset inUSDC
Asset outraUSDC (53fZaJGDMHcfku8pzZak5obVFUUjVxwqRTF63M3SQiSS)
Vault3maCuTJVPteZ2dFA8dADxz2EbpJHfoAG5txYhXDs6gNQ
Stake actionsdeposit
Unstake actionsinstant

Stake mechanics

POST /api/v1/stake returns an unsigned Voltr deposit transaction. Broadcast via route: "rpc". There is no sanctum_order to forward.

Unstake mechanics

  • kind: "instant" runs a Voltr direct withdraw. No cooldown, no fee.
  • Pass isWithdrawAll: true to drain the position fully without specifying an amount.
Both broadcast via plain RPC.

Live data

Every strategy entry includes a live block with the latest APY and (where applicable) the receipt-rate-to-asset exchange rate.
{
  "key":    "sol-liquid-stake",
  "asset":  "SOL",
  "title":  "Liquid",
  "blurb":  "Mint raSOL via Sanctum.",
  "status": "live",
  "live":   { "apy": 6.4, "exchangeRate": 1.0723 }
}
apy is a percentage (6.4 = 6.4%). exchangeRate is the current asset-per-receipt rate; null where it does not apply (native staking does not have a receipt token). For time-series APY, see GET /api/v1/apy/history.

Coming soon strategies

The strategy registry can flag a key as coming_soon (announced but not live). When that flag is set:
  • GET /api/v1/strategies returns the entry with status: "coming_soon".
  • GET /api/v1/strategies/{key} returns 503 service_unavailable with a Retry-After hint.
  • Stake / unstake / quote calls against the key return 503 until launch.
This keeps the manifest stable: agents can plan around an upcoming strategy without it being a hard failure surface. There are no coming_soon strategies in the registry today — all four keys are live and fully agent-callable.

What’s next

GET /strategies

List all strategies.

GET /strategies/:key

Per-strategy detail.

POST /stake

Build an unsigned stake tx.

POST /unstake

Build an unsigned unstake tx.