Jupiter SOL Staking

Stake SOL tokens to receive jupSOL through Jupiter Protocol

Stake SOL tokens to receive jupSOL through Jupiter’s liquid staking protocol. Earn staking rewards while maintaining liquidity through the jupSOL token.

  1. Staking Operations

    • SOL to jupSOL conversion

    • Liquid staking rewards

    • Transaction verification

    • Automatic rewards

  2. Key Benefits

    • Liquid staking

    • Automatic compounding

    • No unbonding period

    • Protocol security

Copy

// Stake SOL and receive jupSOL
const signature = await agent.methods.stake(
  1.5  // Amount of SOL to stake
);

Parameter
Type
Required
Description

amount

number

Yes

Amount of SOL to stake

Copy

"Stake 1 SOL for jupSOL"

"Convert my SOL to jupSOL"

"Stake 2.5 SOL with Jupiter"

"Get jupSOL by staking 0.5 SOL"

Copy

// Basic staking
{
  "amount": 1.5
}

// Minimum stake
{
  "amount": 0.1
}

Copy

interface StakeParams {
  amount: number;     // SOL amount
  account: string;    // Wallet address
}

// Features
- Versioned transactions
- Blockhash handling
- Confirmation tracking
- Retry logic

Copy

// Success response
{
  status: "success",
  signature: "5KtPn3...",
  message: "Successfully staked 1.5 SOL for jupSOL"
}

// Error response
{
  status: "error",
  message: "jupSOL staking failed: insufficient funds"
}

Copy

try {
  const signature = await agent.methods.stake(amount);
} catch (error) {
  if (error.message.includes("insufficient funds")) {
    // Handle insufficient balance
  } else if (error.message.includes("transaction")) {
    // Handle transaction issues
  }
}

  1. Staking Management

    • Verify SOL balance

    • Consider fees

    • Monitor transactions

    • Track rewards

  2. Transaction Handling

    • Monitor confirmations

    • Implement retries

    • Handle timeouts

    • Verify success

  3. Balance Management

    • Track SOL/jupSOL ratio

    • Monitor rewards

    • Consider fees

    • Plan exits

  4. Security

    • Verify transactions

    • Check approvals

    • Monitor positions

    • Track changes

  1. Staking

    • Insufficient SOL

    • Network congestion

    • Transaction failures

    • Price impact

  2. Transaction

    • Failed confirmations

    • Timeout issues

    • Network errors

    • Version conflicts

  3. Balance

    • Sync delays

    • Fee calculation

    • Reward tracking

    • Rate updates

Copy

const SOL_MINT = "So11111111111111111111111111111111111111112";
const JUPSOL_MINT = "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v";

  1. Preparation

Copy

const txn = VersionedTransaction.deserialize(
  Buffer.from(data.transaction, "base64")
);
  1. Signing

Copy

txn.message.recentBlockhash = blockhash;
txn.sign([agent.methods.wallet]);
  1. Confirmation

Copy

await connection.confirmTransaction({
  signature,
  blockhash,
  lastValidBlockHeight
});

  1. Liquid Staking

    • Immediate liquidity

    • No lockup period

    • Tradeable token

    • Compound rewards

  2. Security

    • Audited protocol

    • Multi-validator system

    • Emergency withdrawals

    • Risk management

  3. Rewards

    • Automatic compounding

    • Real-time accrual

    • No claim required

    • Performance tracking

  • getBalance: Check SOL balance

  • getJupSolBalance: Check jupSOL balance

  • trade: Trade jupSOL

  • unstake: Convert back to SOL

  1. Minimum Stake

    • Consider network fees

    • Account for slippage

    • Monitor minimums

    • Track changes

  2. Performance

    • Monitor APY

    • Track rewards

    • Compare rates

    • Assess fees

  3. Exit Strategy

    • No unbonding period

    • Instant liquidity

    • Market impact

    • Fee consideration

Last updated