LST Solana Demo

Stake SOL, get lSOL. Simple liquid staking with instant redemption.

Next.jsTurborepoExpress jsTypeScriptTanstack QueryHelius WebhookTailwindCSS+4 more
LST Solana Demo project screenshot

LST Solana Demo - Liquid Staking Solution


LST Solana Demo is a seamless liquid staking platform that displays SOL and liquid staking tokens (lSOL) balances. This platform demonstrates how a staking process could work while allowing users to maintain liquidity through tokenized staking positions.


Demo


Features

Liquid Staking DemonstrationInstant Redemption SimulationSecure Architecture
Visualize how SOL staking creates lSOL tokens that represent staked positionsSee how redemption works without waiting for unbonding periodsBuilt on Solana's secure infrastructure with robust transaction handling
Real-time AnalyticsBlockchain IntegrationUser-Friendly Interface
Track platform wallet balances, token circulation, and total value in real-timeFully integrated with Solana blockchain for transparent operationsIntuitive UI designed for both beginners and experienced users

Project Note

This is a demo project built on Solana's Devnet to showcase a simple Liquid Staking Token (LST) platform. The platform allows you to stake your SOL and receive lSOL tokens in return at a 1:1 ratio. Behind the scenes, I'm using Helius webhooks to track transfers, with a backend that handles the transfer of SOL and tokens from my wallet.


Tech Stack

FrontendBackendBlockchain Integration
Next.js with TypeScriptExpress.js API for webhook processingSolana Web3.js for blockchain interactions
TailwindCSS + Shadcn UITurborepo for monorepo managementSolana SPL Token for token operations
Tanstack Query for data fetchingHelius Webhook for real-time blockchain eventsbs58 for encoding/decoding

How It Works

For Users:

  1. View Platform Details: See the platform wallet address and lSOL token mint address
  2. View Balances: Instantly see the platform's SOL balance and lSOL token circulation
  3. Simulated Staking: Visualize how sending SOL to the platform wallet would receive lSOL tokens
  4. Monitor Performance: Track the platform's token values in real-time
  5. Simulated Redemption: Understand how returning lSOL to the platform would receive SOL back

Technical Flow:

  1. Platform displays wallet address and token mint information for demonstration
  2. Helius webhooks detect SOL transfer transactions to the platform wallet in real-time
  3. Express backend validates incoming transactions and processes the request
  4. Backend mints equivalent lSOL tokens based on current exchange rate
  5. For redemption simulation, Helius detects incoming lSOL tokens
  6. Backend burns the lSOL and returns SOL (plus rewards) to the sender's wallet

Platform Screenshots

LST Solana Demo Platform


Benefits of Liquid Staking

  • Maintain Liquidity: Use lSOL in DeFi protocols while earning staking rewards
  • No Lockup Period: Avoid traditional staking lockup periods with instant redemption
  • Compound Returns: Benefit from staking rewards and potential lSOL appreciation
  • Simplified Staking: No need to manage validators or worry about slashing risks
  • Transparent Operations: All transactions are recorded on-chain for verification

Backend Architecture

The platform runs on a robust Express.js backend that:

  • Processes Helius Webhooks: Listens for on-chain events like token transfers and SOL movements
  • Validates Transactions: Ensures all incoming transactions meet security requirements
  • Automates Token Operations: Handles minting of lSOL when SOL is received and burning when lSOL is returned
  • Maintains Exchange Rate: Calculates and updates the SOL/lSOL exchange rate based on staking rewards
  • Provides Real-time Data: Exposes API endpoints for frontend to display current wallet balances and token information

Resources