Skip to content

NairSreya/VaultVerse

Repository files navigation

VaultVerse

Live Demo

Your digital crypto bank where you can deposit ERC20 tokens, earn rewards like interest, and withdraw anytime—all on a secure and transparent blockchain platform.

◆ Overview

VaultVerse is a decentralized finance (DeFi) platform that functions as a digital crypto bank. Users can securely deposit their ERC20 tokens into smart contract vaults, earn interest rewards over time, and withdraw their funds whenever needed. Built with transparency and security at its core, VaultVerse leverages blockchain technology to provide a trustless banking alternative.

◆ Features

  • ERC20 Token Deposits — Support for multiple ERC20 tokens
  • Interest Rewards — Earn passive income on deposited tokens
  • Flexible Withdrawals — Access your funds anytime without lock-in periods
  • Multi-Vault System — Create and manage multiple vaults for different tokens
  • Real-Time Analytics — Track your earnings and portfolio performance
  • Secure Smart Contracts — Audited and tested for maximum security
  • Gas Optimization — Efficient contract design to minimize transaction costs

◆ Tech Stack

Frontend

  • JavaScript (77.0%) — Core application logic
  • HTML (8.9%) — Structure and markup
  • CSS (0.7%) — Styling and design

Smart Contracts

  • Solidity (13.4%) — ERC20 vault contracts and reward distribution logic

Backend & Infrastructure

  • Firebase — Hosting and real-time database
  • Truffle — Smart contract development and deployment
  • Web3.js — Blockchain interaction layer

Development Tools

  • Node.js — Runtime environment
  • npm — Package management
  • Truffle/Hardhat — Testing and deployment framework

◆ Usage

Depositing Tokens

  1. Connect your wallet to the platform
  2. Select the ERC20 token you want to deposit
  3. Enter the amount and approve the transaction
  4. Confirm the deposit in your wallet
  5. Start earning rewards immediately

Withdrawing Funds

  1. Navigate to your vault dashboard
  2. Select the vault you want to withdraw from
  3. Enter the withdrawal amount
  4. Confirm the transaction
  5. Receive your tokens plus earned interest

◆ Project Structure

VaultVerse/
├── .firebase/              # Firebase configuration
├── build/                  # Compiled smart contracts
├── migrations/             # Truffle migration scripts
├── public/                 # Static assets
├── scripts/                # Utility scripts
├── src/                    # Frontend source code
│   ├── components/         # React/JS components
│   ├── contracts/          # Contract ABIs
│   ├── utils/              # Helper functions
│   └── App.js              # Main application
├── test/                   # Smart contract tests
├── truffle-config.js       # Truffle configuration
├── firebase.json           # Firebase settings
└── package.json            # Dependencies

◆ Smart Contract Architecture

Core Contracts

  • VaultFactory.sol — Creates and manages vault instances
  • TokenVault.sol — Handles deposits, withdrawals, and reward calculations
  • RewardDistributor.sol — Manages interest distribution logic
  • ERC20Handler.sol — Safe ERC20 token interactions

Key Functions

// Deposit tokens into vault
function deposit(address token, uint256 amount) external

// Withdraw tokens with earned interest
function withdraw(uint256 amount) external

// Claim accumulated rewards
function claimRewards() external

// Get vault balance and earnings
function getVaultInfo(address user) external view returns (VaultInfo memory)

◆ Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/NewFeature)
  3. Write tests for new functionality
  4. Commit your changes (git commit -m 'Add NewFeature')
  5. Push to the branch (git push origin feature/NewFeature)
  6. Open a Pull Request

Please ensure all tests pass and code follows the project's style guide.

◆ License

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

◆ Acknowledgments

  • Built with OpenZeppelin contracts
  • Inspired by leading DeFi protocols like Aave and Compound
  • Community feedback and contributions

◆ Contact

Sreya Nair@NairSreya

Project Link: https://github.com/NairSreya/VaultVerse


Banking on the blockchain, secured by code

About

VaultVerse is your digital crypto bank, where you can deposit ERC20 tokens, earn rewards like interest, and withdraw anytime—all on a secure and transparent blockchain platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors