Developer Documentation

Comprehensive guides and technical references for building with VELYS

Introduction

Understanding VELYS Protocol

VELYS is a modular liquid staking infrastructure built on Solana, designed to maximize capital efficiency while maintaining liquidity.

The protocol allows users to stake SOL and receive vSOL tokens that represent their staked position plus accrued rewards.

Unlike traditional staking, vSOL tokens remain liquid and can be used across the DeFi ecosystem while continuing to earn staking rewards.

Key benefits include: no lockup periods, composability with DeFi protocols, optimized validator selection, and automated reward compounding.

Architecture Overview

Core components and design patterns

VELYS uses a modular architecture with three core components: Staking Pool, Validator Manager, and Reward Distribution.

The Staking Pool manages user deposits and mints vSOL tokens proportional to the user's share of the total staked amount.

The Validator Manager automatically distributes stake across a curated set of high-performance validators to optimize returns.

Reward Distribution tracks and compounds staking rewards, updating the vSOL/SOL exchange rate to reflect earned yields.

All components are deployed as Solana programs with on-chain verification and transparent state management.

Integration Guide

Step-by-step integration workflow

Step 1: Install the VELYS SDK using npm, yarn, or pnpm package manager.

Step 2: Initialize the VelysClient with your Solana connection and wallet adapter.

Step 3: Implement staking functionality by calling the stake() method with the desired amount.

Step 4: Handle vSOL tokens in your application - they're standard SPL tokens with full DeFi compatibility.

Step 5: Implement unstaking with proper handling of cooldown periods and claim flows.

Step 6: Subscribe to protocol events for real-time updates on staking operations and rewards.

Smart Contract Interaction

Technical reference for contract methods

stake(amount: u64): Stakes SOL and mints vSOL tokens. Requires user signature and sufficient SOL balance.

unstake(vsol_amount: u64): Burns vSOL and initiates unstaking. Subject to protocol cooldown period.

claim_unstaked(): Claims SOL from completed unstaking requests after cooldown period.

get_exchange_rate(): Returns current vSOL/SOL exchange rate reflecting accumulated rewards.

get_user_info(pubkey: PublicKey): Returns user's staking position, vSOL balance, and pending rewards.

All methods include proper error handling, account validation, and emit events for off-chain tracking.

vSOL Token

Liquid staking token specification

vSOL is an SPL token representing staked SOL plus accrued rewards in the VELYS protocol.

The vSOL/SOL exchange rate increases over time as staking rewards are earned and compounded.

vSOL tokens are fully composable and can be used in any DeFi protocol that accepts SPL tokens.

Common use cases: liquidity provision, collateral for lending, yield farming, and cross-protocol strategies.

vSOL can be redeemed for SOL through the unstaking process, subject to protocol cooldown period.

Security Model

Non-custodial design and security practices

VELYS is fully non-custodial - users maintain complete control of their assets through their wallet.

All staking operations are executed through on-chain programs with transparent and auditable logic.

Smart contracts have undergone comprehensive security audits by leading blockchain security firms.

Validator selection follows strict criteria including performance history, commission rates, and decentralization.

Emergency pause mechanisms are in place to protect user funds in case of detected vulnerabilities.

Users should always verify contract addresses and use hardware wallets for large amounts.

API Reference

Complete SDK method documentation

VelysClient: Main SDK class for interacting with VELYS protocol.

stake(params): Stake SOL and receive vSOL. Returns transaction signature and vSOL amount.

unstake(params): Burn vSOL and initiate unstaking. Returns transaction signature and cooldown info.

getStakingInfo(pubkey): Fetch user's staking position and rewards. Returns detailed account state.

getExchangeRate(): Get current vSOL/SOL exchange rate. Returns rate and last update timestamp.

onStakeEvent(callback): Subscribe to staking events. Callback receives event data in real-time.

Full TypeScript definitions included for all methods, parameters, and return types.

Code Examples

Practical implementation patterns

Complete examples available in the GitHub repository covering common integration scenarios.

React integration: Hooks for managing staking state and handling wallet connections.

DeFi composability: Examples of using vSOL in DEXs, lending protocols, and yield aggregators.

Transaction handling: Proper patterns for error handling, confirmations, and retry logic.

Event monitoring: Real-time tracking of staking operations and protocol state changes.

All examples include best practices for production applications and user experience.

Questions or feedback?