Gradient IMG
LST Solana Demo project screenshot

LST Solana Demo

Personal

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

Next.jsTurborepoExpress jsTypeScriptTanstack QueryHelius WebhookTailwindCSSShadcnSolana Web3.jsSolana SPL Tokenbs58

🌊 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 DemonstrationπŸ”„ Instant Redemption SimulationπŸ” Secure 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 AnalyticsπŸ”— Blockchain IntegrationπŸ“± User-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 TypeScript πŸš€Express.js API for webhook processing 🌐Solana Web3.js for blockchain interactions πŸ”—
TailwindCSS + Shadcn UI 🎨Turborepo for monorepo management βš™οΈSolana SPL Token for token operations πŸ’°
Tanstack Query for data fetching πŸ“ŠHelius Webhook for real-time blockchain events πŸ”„bs58 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#