Lending / Yield·Solana
Marinade
Solana liquid-staking protocol issuing mSOL. Stake SOL → receive mSOL (yield-bearing); unstake instantly via the unstake liquidity pool or wait for a delayed (epoch-based) full-value redemption. Marinade Native offers non-custodial direct delegation without mSOL.
- 01minting mSOL from SOL
- 02instant unstake via the unstake pool
- 03epoch-delayed full-value unstake (ticket NFT)
- 04Marinade Native directed staking (no LST)
- 05DeFi composability on mSOL collateral
- pnpm add @marinade.finance/marinade-ts-sdk @solana/web3.js bn.js
| Variable | Scope | Description |
|---|---|---|
| SOLANA_RPC_URL | Server | Solana mainnet RPC URL. |
Use `@marinade.finance/marinade-ts-sdk`. Initialize `const marinade = new Marinade(new MarinadeConfig({ connection, publicKey: walletPubkey }))`. Stake with `await marinade.deposit(MarinadeUtils.solToLamports(amount))` — returns `{ transaction, associatedMSolTokenAccountAddress }`. Instant unstake (small fee, capped by pool liquidity): `await marinade.liquidUnstake(mSolAmount)`. Delayed unstake at full backing-value: `await marinade.orderUnstake(mSolAmount)` returns a ticket account, then after epoch boundary `await marinade.claim(ticketAccount)`. Wrap returned `transaction` in a `VersionedTransaction`, set priority fee, and send.
- ⚑Two unstake paths with different economics: `liquidUnstake` is instant but charges up to 0.3% from the unstake pool and is capped by pool liquidity; `orderUnstake` is full-value but waits 1–2 epochs (2–4 days). Surface both options to users explicitly.
- ⚑mSOL ↔ SOL exchange rate updates once per epoch when the protocol cranks — display rates from `state.msolPrice` not assumed 1:1, and warn users that the rate changes only at epoch boundary.
- ⚑`liquidUnstake` reverts when the unstake pool is drained — handle `Liquidity pool is empty` errors and offer the order/claim path as fallback.
- ⚑Marinade Native is a separate program (directed-stake, no mSOL token) — it requires a different SDK flow (`@marinade.finance/native-staking-sdk`); do not conflate the two products.
- ⚑Set explicit compute unit limit + priority fee — stake/unstake instructions touch many validator stake accounts and can exceed default 200k CU.
- ⚑mSOL collateral in lending markets (Kamino, marginfi) can be liquidated — front-end UX should warn that LST positions still carry liquidation risk.