Logo
DeFi

Stervault - Traditional Finance on Solana

Built traditional financing experiences on Solana chain - interest accrued deposits, collateral backed borrowing and liquidating under-collateralised positions.

Client: RippnerLabsJuly 26, 20253 min read

Key Outcomes

Share-Based

Interest Model

Pyth Network

Oracle Integration

Multi-Asset

Supported Tokens

LTV-Based

Collateral System

Project Overview

Stervault is a decentralized finance (DeFi) lending platform built on the Solana blockchain that brings traditional financing experiences to Web3. The platform enables users to deposit assets to earn interest and borrow against collateral, all with the speed and low cost of Solana.

We designed and built a complete lending protocol that mirrors the familiar experience of traditional banking while leveraging the transparency and composability of blockchain technology.

The Challenge

Our client needed a DeFi lending platform that could:

  • Replicate Traditional Finance UX: Users should feel at home with familiar deposit, withdrawal, and borrowing flows
  • Real-Time Price Feeds: Accurate collateral valuation for safe lending operations
  • Scalable Architecture: Handle multiple token markets with independent parameters
  • Liquidation Protection: Automated under-collateralization detection and handling

Technical Implementation

Core Lending Program

The heart of Stervault is a Solana program deployed using the Anchor framework. The program implements a share-based lending and borrowing system with these key features:

SolanaAnchorRustNext.jsReactTypeScriptPyth Network

Program Instructions:

  • initUser - Initializes global user state for new platform users
  • initBank - Creates new token banks with configurable parameters
  • deposit - Allows users to deposit tokens and receive interest-bearing shares
  • withdraw - Enables withdrawal of deposited tokens plus accrued interest
  • borrow - Facilitates borrowing against collateral with LTV checks
  • repay - Processes loan repayments and collateral releases
  • initBorrowPosition - Creates new borrowing positions for users

Account Structure

The program maintains several key account types for state management:

  • Bank: Stores token-specific lending parameters and aggregate statistics
  • UserGlobalState: Tracks user's overall platform activity and positions
  • UserTokenState: Manages user balances for specific tokens
  • BorrowPosition: Represents individual borrowing positions with collateral
  • PythNetworkFeedId: Maps token symbols to Pyth price feed identifiers

Price Oracle Integration

The platform integrates with Pyth Network for real-time price feeds, essential for accurate collateral valuation and risk management. The program validates price feed freshness and integrates price data into borrowing and liquidation calculations.

Pyth Network provides sub-second price updates, enabling Stervault to offer competitive rates while maintaining protocol safety.

Frontend Application

The frontend is built as a modern React application using Next.js, providing users with an intuitive interface for interacting with the lending protocol:

  • Market Interface: Displays available lending markets and current rates
  • Deposit/Withdrawal Forms: Transaction interfaces for depositing and withdrawing assets
  • Borrowing Interface: Tools for managing collateralized borrowing positions
  • Transaction History: Comprehensive activity tracking and reporting
  • Wallet Integration: Seamless connection to Solana wallets via Wallet Adapter

Results & Impact

Stervault demonstrates how traditional finance concepts can be implemented on Solana with improved transparency and efficiency:

  • Sub-second Transactions: Leveraging Solana's speed for instant deposits and withdrawals
  • Real-Time Interest: Share-based accounting enables continuous interest accrual
  • Transparent Operations: All lending parameters and positions are on-chain and verifiable
  • Cost Effective: Minimal transaction fees compared to Ethereum-based alternatives

The platform supports multiple deployment environments including local development with token faucets, Solana devnet for testing, and production deployment on mainnet.

See More Projects Like This

Got a project in mind?

Let us help build the technologies around your needs.

Contact us
7BlockLabs

Full-stack blockchain product studio: DeFi, dApps, audits, integrations.

7Block Labs is a trading name of JAYANTH TECHNOLOGIES LIMITED.

Registered in England and Wales (Company No. 16589283).

Registered Office address: Office 13536, 182-184 High Street North, East Ham, London, E6 2JA.

© 2025 7BlockLabs. All rights reserved.