A high-performance, aesthetically driven interface for liquid staking on Solana, built to demonstrate "Startup Grade" design and full-stack dApp architecture.
LSD is a full-stack decentralized application (dApp) that allows users to stake SOL and receive receiving soLSD (Liquid Staking Token) in return. The project focuses on two core pillars:
- Visual Excellence: Delivering a "Series A" ready user experience with advanced animations, glassmorphism, and responsive layouts.
- Full-Stack Architecture: Integrating a custom Solana program (Anchor) with a modern Next.js frontend.
- Frontend: Next.js 14, TypeScript, Tailwind CSS
- Animations: Framer Motion
- Blockchain: Solana, Anchor Framework, Rust
- Integration: Solana Web3.js, Wallet Adapter
The system follows a standard dApp architecture where the client interacts directly with the Solana blockchain via RPC, utilizing Program Derived Addresses (PDAs) for secure asset management.
graph TD
User((User))
Wallet[Phantom/Backpack]
FE[Next.js Client]
RPC[Solana RPC Cluster]
Program[Anchor Program (LSD)]
Vault[(PDA Vault)]
User -->|Connects| Wallet
User -->|Interacts| FE
FE -->|Signs Tx| Wallet
Wallet -->|Submits Tx| RPC
RPC -->|Calls| Program
Program -->|Mints soLSD| User
Program -->|Locks SOL| Vault
To demonstrate the core mechanics of a Liquid Staking Protocol without the overhead of running a live Validation Service during development, this project implements a Mock Validator Vault.
- Real Implementation: In a mainnet environment, the Anchor program would use Cross-Program Invocation (CPI) to delegate deposited SOL to the official Solana System Stake Program.
- This Implementation: The program utilizes a PDA-controlled Vault (
stake_pool) to hold user funds directly. Rewards are simulated by an admindistribute_rewardsinstruction which injects SOL into the vault, increasing thesoLSDexchange rate mathematically.
This approach proves the "Exchange Rate" model (cToken model) used by protocols like Lido or Marinade, where Price = Total_SOL / Total_Shares.
- Dynamic Yield Simulation: Demonstrates how token value increases over time relative to the underlying asset.
- Zero-Friction Staking: "One-tick" staking experience with instant feedback.
- Responsive Design: Fully optimized for Mobile, Tablet, and Desktop.
- Wallet Integration: Robust state management for wallet connections and account data.
- Node.js (v18+)
- Rust & Cargo
- Solana CLI
- Anchor CLI
# Clone the repository
git clone <repo-url>
cd lsd
# Install dependencies
pnpm installRun the local Solana test validator. This will also deploy the program to your local network.
pnpm anchor-localnetpnpm devOpen http://localhost:3000 to view the application.
The project includes a suite of integration tests to verify the staking logic and math safety.
pnpm anchor-testBuilt with ❤️ by [Your Name]
