Deposit
Deposit adds collateral to a position. Collateral backs the loan: the more you deposit, the more can be borrowed against it - by you (up to 50% LTV) and by Sonnar on your behalf (up to the target LTV).
What the method does
Section titled “What the method does”On-chain, deposit transfers the collateral from your wallet and supplies it
to the position’s lender:
- The position’s stored lender (Jupiter Lend or Kamino Lend) decides which supply flow runs - callers never pick a market.
- On Kamino the collateral is supplied to the reserve and pledged to your obligation; on Jupiter Lend it’s added to your lending position.
- Depositing never borrows anything by itself. It lowers your LTV and raises your borrowing capacity.
- For SOL, the deposit is made as wSOL - the SDK inserts the wrap instructions automatically.
A deposit is also how Sonnar gets more room to work: on its next poll after your deposit, the engine sees the fresh idle borrowing power and deploys it.
How to call it
Section titled “How to call it”For an existing position, use executeAction with action: "deposit":
import { executeAction, parseCollateral, CBBTC_MINT } from "@hobba-io/core";
const { signature, lender } = await executeAction({ connection, signer, collateralMint: CBBTC_MINT, action: "deposit", amount: parseCollateral("0.005", CBBTC_MINT), // collateral base units apiBaseUrl: "https://app.hobba.io", onStep: (s) => setStatus(s),});For a first-time deposit (no position yet), use
executeDepositBorrow - it bundles the one-time
position initialization; with borrowAmount: new BN(0) it’s a pure deposit.
Bounds
Section titled “Bounds”Fetch them with getLimits rather than hardcoding:
| Limit | Field | Rule |
|---|---|---|
| Minimum deposit | minDeposit | 1 SOL / 0.001 cbBTC first time; 0.1 SOL / 0.0001 cbBTC top-up |
| SOL “Max” reserve | solReserve | lamports held back from a max deposit for rent + fees |
| Rounding buffer | depositBuffer | tiny shave applied on Jupiter Lend deposits |
The wallet must be allowlisted - a one-time, per-wallet step.
After it lands
Section titled “After it lands”- Your LTV drops immediately;
getPosition().collateralreflects the new balance. - Sonnar tops the position back up toward target LTV, so the newly idle borrowing power starts earning within the next rebalance cycle.
- Adding collateral is also the fastest way to de-risk a position that has drifted toward the liquidation line.