Stake SOL tokens to receive jupSOL through Jupiter’s liquid staking protocol. Earn staking rewards while maintaining liquidity through the jupSOL token.
Core Features
-
Staking Operations
- SOL to jupSOL conversion
- Liquid staking rewards
- Transaction verification
- Automatic rewards
-
Key Benefits
- Liquid staking
- Automatic compounding
- No unbonding period
- Protocol security
Usage
// Stake SOL and receive jupSOL
const signature = await agent.methods.stake(
1.5 // Amount of SOL to stake
);
Parameters
Parameter | Type | Required | Description |
---|
amount | number | Yes | Amount of SOL to stake |
Example Prompts
Natural Language Prompts
"Stake 1 SOL for jupSOL"
"Convert my SOL to jupSOL"
"Stake 2.5 SOL with Jupiter"
"Get jupSOL by staking 0.5 SOL"
// Basic staking
{
"amount": 1.5
}
// Minimum stake
{
"amount": 0.1
}
Implementation Details
Staking Process
interface StakeParams {
amount: number; // SOL amount
account: string; // Wallet address
}
// Features
- Versioned transactions
- Blockhash handling
- Confirmation tracking
- Retry logic
// Success response
{
status: "success",
signature: "5KtPn3...",
message: "Successfully staked 1.5 SOL for jupSOL"
}
// Error response
{
status: "error",
message: "jupSOL staking failed: insufficient funds"
}
Error Handling
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
}
}
Best Practices
-
Staking Management
- Verify SOL balance
- Consider fees
- Monitor transactions
- Track rewards
-
Transaction Handling
- Monitor confirmations
- Implement retries
- Handle timeouts
- Verify success
-
Balance Management
- Track SOL/jupSOL ratio
- Monitor rewards
- Consider fees
- Plan exits
-
Security
- Verify transactions
- Check approvals
- Monitor positions
- Track changes
Common Issues
-
Staking
- Insufficient SOL
- Network congestion
- Transaction failures
- Price impact
-
Transaction
- Failed confirmations
- Timeout issues
- Network errors
- Version conflicts
-
Balance
- Sync delays
- Fee calculation
- Reward tracking
- Rate updates
Technical Details
Token Addresses
const SOL_MINT = "So11111111111111111111111111111111111111112";
const JUPSOL_MINT = "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v";
Transaction Flow
- Preparation
const txn = VersionedTransaction.deserialize(
Buffer.from(data.transaction, "base64")
);
- Signing
txn.message.recentBlockhash = blockhash;
txn.sign([agent.methods.wallet]);
- Confirmation
await connection.confirmTransaction({
signature,
blockhash,
lastValidBlockHeight
});
Protocol Features
-
Liquid Staking
- Immediate liquidity
- No lockup period
- Tradeable token
- Compound rewards
-
Security
- Audited protocol
- Multi-validator system
- Emergency withdrawals
- Risk management
-
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
Notes
-
Minimum Stake
- Consider network fees
- Account for slippage
- Monitor minimums
- Track changes
-
Performance
- Monitor APY
- Track rewards
- Compare rates
- Assess fees
-
Exit Strategy
- No unbonding period
- Instant liquidity
- Market impact
- Fee consideration
Responses are generated using AI and may contain mistakes.