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, listing only
usdc-earnUSDCVoltr USDC vaultlive
All four are returned by GET /api/v1/strategies. Each has a detailed view at GET /api/v1/strategies/{key}. sol-leveraged-stake is listing-only: the registry entry and live APY are real, but actions.stake / actions.unstake are null — the rasol-max deposit / burn builders aren’t wired into /api/v1/stake or /api/v1/unstake yet. Route users to the human surface at hubra.app/c/leverage for deposits and burns until those endpoints land.

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 raSOL, 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 inraSOL (HUBsveNpjo5pWqNkH57QzxjQASdTVXcSK7bVKTSZtcSX)
Asset outraSOL Max LP (CJEYakpjmKBvvUzAn3HJSs9vtijnv472T8YJEV3WzToF)
Underlying SOL mintSo11111111111111111111111111111111111111112
Stake actionsunset — listing only
Unstake actionsunset — listing only

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.

Programmatic stake / unstake

Not agent-callable yet. actions.stake and actions.unstake are both null in the registry response. Calls to /api/v1/stake or /api/v1/unstake with strategy: "sol-leveraged-stake" return 400 invalid_request (“doesn’t support staking”). Route users to hubra.app/c/leverage to deposit raSOL → raSOL Max or burn raSOL Max → raSOL through the human surface. To prepare a raSOL balance for the human-surface deposit, an agent can still use sol-liquid-stake (mint SOL → raSOL), then hand off.

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 live in the registry today. sol-leveraged-stake is live but listing-only — the registry entry is real but the stake / unstake builders aren’t wired through the agent endpoints yet (see the section above).

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.