Solayer SOL Restaking

Restake SOL to receive sSOL through Solayer Protocol

Restake SOL tokens to receive sSOL (Solayer SOL) through Solayer’s restaking protocol. Earn enhanced yields through restaking while maintaining liquidity through the sSOL token.

  1. Restaking Operations

    • SOL to sSOL conversion

    • Enhanced staking yields

    • Liquid staking token (LST)

    • Automatic compounding

  2. Key Benefits

    • Higher APY through restaking

    • Liquid token representation

    • Double-yield potential

    • Protocol security

Copy

// Restake SOL to receive sSOL
const signature = await agent.methods.restake(
  1.0  // Amount of SOL to restake
);

Parameter
Type
Required
Description

amount

number

Yes

Amount of SOL to restake

Copy

"Restake 1 SOL on Solayer"

"Convert SOL to sSOL for better yields"

"Stake 2.5 SOL with Solayer restaking"

"Get sSOL by staking 0.5 SOL"

Copy

// Basic restaking
{
  "amount": 1.0
}

// Minimum stake
{
  "amount": 0.1
}

// Direct amount input
"1.5"

Copy

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

// Features
- Versioned transactions
- Blockhash handling
- Multiple retries
- Confirmation tracking

Copy

// Success response
{
  status: "success",
  message: "Staked successfully",
  transaction: "3FgHn9...",
  amount: 1.0
}

// Error response
{
  status: "error",
  message: "Solayer sSOL staking failed: insufficient funds",
  code: "UNKNOWN_ERROR"
}

Copy

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

  1. Restaking Management

    • Verify SOL balance

    • Consider gas fees

    • Monitor yields

    • Track restaking rewards

  2. Transaction Handling

    • Implement retries

    • Check confirmations

    • Handle timeouts

    • Monitor failures

  3. Balance Management

    • Track SOL/sSOL ratio

    • Monitor yield rates

    • Consider unlock periods

    • Plan exit strategy

  4. Security

    • Verify transactions

    • Check approvals

    • Monitor positions

    • Review permissions

  1. Restaking

    • Insufficient SOL

    • Network congestion

    • API timeouts

    • Rate limits

  2. Transaction

    • Failed confirmations

    • Version mismatches

    • Blockhash issues

    • Signature errors

  3. Balance

    • Sync delays

    • Fee calculations

    • Reward tracking

    • Rate updates

Copy

// Token addresses and information
const SSOL_MINT = "..."; // Solayer SOL mint address
const RESTAKING_PROGRAM = "..."; // Solayer program ID

  1. Initialize

Copy

// Prepare restaking request
const response = await fetch(
  `https://app.solayer.org/api/action/restake/ssol?amount=${amount}`
);
  1. Process

Copy

// Deserialize and sign transaction
const txn = VersionedTransaction.deserialize(buffer);
txn.message.recentBlockhash = blockhash;
txn.sign([wallet]);
  1. Confirm

Copy

// Wait for confirmation
await connection.confirmTransaction({
  signature,
  blockhash,
  lastValidBlockHeight
});

  1. Restaking Mechanism

    • Enhanced yield generation

    • Automatic compounding

    • Multiple validator support

    • Risk distribution

  2. Security

    • Audited contracts

    • Distributed validation

    • Emergency procedures

    • Risk management

  3. Rewards

    • Double-yield potential

    • Automatic processing

    • Real-time tracking

    • Compound interest

  • getBalance: Check SOL balance

  • getSsolBalance: Check sSOL balance

  • unrestake: Convert back to SOL

  • checkYield: View current APY

  1. Minimum Stake

    • Network fees consideration

    • Slippage tolerance

    • Minimum amounts

    • Protocol limits

  2. Performance

    • Monitor APY changes

    • Track restaking rewards

    • Compare rates

    • Review fees

  3. Risk Management

    • Diversification strategy

    • Exit planning

    • Market monitoring

    • Protocol updates

Last updated