Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

53 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฆ Strata: DeFi Yield Vault Platform

๐ŸŽฏ Project Overview

Strata is a decentralized finance (DeFi) platform that allows users to deposit cryptocurrency into automated vaults that generate yield through the Aave protocol. Built on Ethereum Sepolia testnet, Strata provides a secure, transparent, and user-friendly interface for earning passive income on digital assets.

๐ŸŒŸ Key Features

  • ๐Ÿ”’ Secure Vault Contracts: Audited smart contracts with built-in security
  • ๐Ÿ’ฐ Real Yield Generation: Integration with Aave V3 protocol for competitive yields
  • ๐ŸŽ›๏ธ User-Friendly Interface: Modern React frontend with real-time balance tracking
  • ๐Ÿ“Š Portfolio Dashboard: Track deposits, yields, and total portfolio value
  • ๐Ÿ”„ Flexible Withdrawals: Withdraw principal plus accrued yield anytime
  • ๐Ÿงช Testnet Ready: Fully functional on Sepolia testnet with no real money required

๐Ÿ—๏ธ Architecture

  • Backend: Solidity smart contracts with Hardhat development framework
  • Frontend: React + Vite with ethers.js for blockchain interaction
  • Blockchain: Ethereum Sepolia testnet with Aave V3 integration
  • Infrastructure: Alchemy RPC endpoints for reliable blockchain access

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 16+ installed
  • MetaMask browser extension
  • Sepolia ETH for gas fees (get from faucet)

๐Ÿ“‹ Setup Steps

  1. Clone & Install
git clone <repository-url>
cd Strata
  1. Backend Setup
cd Backend
npm install
  1. Frontend Setup
cd Frontend
npm install
  1. Configure Environment

    • Create .env in Backend directory
    • Add your private key and RPC URL
  2. Deploy Contracts

cd Backend
node scripts/deploy-real-aave.js
  1. Start Frontend
cd Frontend
npm run dev
  1. Access Application
    • Open http://localhost:5174
    • Connect wallet and start earning!

๐Ÿ’ฐ Supported Tokens

๐Ÿช™ Current Integration

  • DAI (0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357)
    • โœ… Fully integrated with Aave Sepolia
    • โœ… Available via Aave faucet
    • โœ… Stablecoin with reliable yields

๐Ÿ”ฎ Future Tokens

  • WETH: Wrapped Ethereum for higher yields
  • USDT: Tether for stablecoin diversity
  • WBTC: Wrapped Bitcoin for crypto exposure

๐Ÿ“– Token Guide

See HOW_TO_GET_TOKENS.md for detailed instructions on obtaining test tokens.


๐Ÿฆ Vault Features

๐Ÿ“‹ Core Functionality

  • โœ… Secure Deposits: Non-custodial vault with user-controlled funds
  • โœ… Real Yield: Automatic supply to Aave V3 protocol
  • โœ… Interest Tracking: Real-time yield calculation and display
  • โœ… Flexible Withdrawals: Withdraw principal + accrued yield anytime
  • โœ… Transparent: All transactions visible on blockchain
  • โœ… Gas Optimized: Efficient contract interactions

๐Ÿ›ก๏ธ Security Features

  • โœ… Reentrancy Protection: Prevents recursive attacks
  • โœ… Access Control: Proper ownership and permission management
  • โœ… Input Validation: Comprehensive error handling
  • โœ… Emergency Controls: Safe withdrawal mechanisms

๐Ÿ“Š User Experience

๐ŸŽฏ Deposit Flow

  1. Connect Wallet: Secure MetaMask integration
  2. Select Token: Choose from supported assets
  3. Enter Amount: Specify deposit amount
  4. Approve Token: Grant vault spending permission
  5. Confirm Deposit: Execute transaction
  6. Track Yield: Monitor real-time earnings

๐Ÿ“ˆ Dashboard Features

  • Portfolio Overview: Total value and earnings
  • Transaction History: Complete deposit/withdrawal record
  • Yield Analytics: Real-time APY and earnings breakdown
  • Wallet Management: Multi-token balance display

๐Ÿ› ๏ธ Technical Details

๐Ÿ”ง Smart Contracts

  • VaultV2RealAave.sol: Main vault contract with Aave integration
  • IPool Interface: Aave V3 pool interaction
  • ERC20 Integration: Standard token compatibility
  • Hardhat Framework: Development and deployment

๐ŸŒ Frontend Technology

  • React 18: Modern component-based UI
  • Vite: Fast development and build tool
  • ethers.js: Ethereum blockchain interaction
  • Tailwind CSS: Responsive design system
  • MetaMask Integration: Wallet connectivity

๐Ÿ”— Blockchain Integration

  • Network: Ethereum Sepolia Testnet
  • Protocol: Aave V3 Lending Protocol
  • RPC: Alchemy Infrastructure
  • Gas: Optimized transaction costs

๐Ÿ“‹ Deployment Guide

๐Ÿ—๏ธ Backend (Smart Contracts)

1. Environment Setup

Create .env file in Backend directory:

SEPOLIA_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR_ALCHEMY_KEY
PRIVATE_KEY=your_private_key_here

2. Deploy Vault Contract

cd Backend
node scripts/deploy-real-aave.js

3. Update Frontend Configuration

After deployment, update VAULT_V2_ADDRESS in Frontend/blockchain/contracts.js with the deployed vault address.

๐ŸŽจ Frontend

1. Install Dependencies

cd Frontend
npm install

2. Start Development Server

npm run dev

3. Access Application

Open http://localhost:5174 in your browser.


๐Ÿงช Testing & Development

๐Ÿ“ Test Coverage

  • Unit Tests: Smart contract functions
  • Integration Tests: Frontend-backend interaction
  • E2E Tests: Complete user flows
  • Security Tests: Vulnerability scanning

๐Ÿ” Debugging Tools

  • Hardhat Console: Contract interaction testing
  • Etherscan: Transaction verification
  • MetaMask: Wallet debugging
  • Browser DevTools: Frontend inspection

๐Ÿ“š Documentation

๐Ÿ“– Available Guides

  • HOW_TO_GET_TOKENS.md: Complete token acquisition guide
  • CONTRACTS.md: Smart contract documentation
  • API.md: Frontend API reference

๐Ÿ”— Useful Links


๐Ÿšจ Important Notes

โš ๏ธ Testnet Only

  • No Real Money: All transactions use testnet tokens
  • Free Testing: Tokens available from faucets
  • Educational Purpose: Learn DeFi concepts safely

๐Ÿ” Security Considerations

  • Never Share Private Keys: Keep your keys secure
  • Verify Transactions: Always check MetaMask prompts
  • Use Testnet: Never use mainnet without proper testing

๐Ÿ’ก Gas Fees

  • Sepolia ETH Required: Need test ETH for transactions
  • Gas Optimization: Contracts designed for efficiency
  • Fee Estimation: Built-in gas calculation

๐Ÿค Contributing

๐Ÿ“‹ Development Workflow

  1. Fork the repository
  2. Create feature branch
  3. Make changes and test
  4. Submit pull request
  5. Code review and merge

๐Ÿ› Bug Reports

  • Use GitHub Issues for bug reports
  • Include steps to reproduce
  • Provide environment details

๐Ÿ“ž Support & Contact

๐Ÿ†˜ Getting Help

  • Documentation: Check all .md files first
  • Issues: Search existing GitHub issues
  • Community: Join our Discord/Telegram
  • Direct: Contact development team

๐Ÿ“ง Contact Information

  • GitHub Issues: For technical problems
  • Discord: For community support
  • Email: For business inquiries

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐ŸŽ‰ Acknowledgments

  • Aave Protocol: For the lending infrastructure
  • Ethereum Foundation: For Sepolia testnet
  • OpenZeppelin: For secure contract libraries
  • Hardhat Team: For development framework
  • React Community: For frontend tools

Last updated: February 2026 Version: 2.0 - Real Aave Integration Status: Production Ready (Testnet)

About

Strata is a full-stack DeFi vault that lets users deposit stablecoins, allocate capital across lending protocols via smart contracts, and earn yield transparently. It includes vault logic, deposit and withdrawal flows, transaction history, and a user interface that exposes balances, protocol allocation, and risk-relevant information.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages