Skip to content

Latest commit

 

History

History
176 lines (117 loc) · 3.27 KB

File metadata and controls

176 lines (117 loc) · 3.27 KB

🚀 StabiliFund

📌 Overview

StabiliFund is a decentralized fund management platform built on blockchain technology that enables users to securely pool funds, receive tokenized ownership, and withdraw their assets transparently without relying on centralized intermediaries. The project demonstrates real-world DeFi fund pooling, ERC20-based share representation, and on-chain security best practices.

StabiliFund is designed as a v0 infrastructure layer for stable fund management and future yield strategies.


🎯 Problem Statement

Traditional fund management systems:

  • Are centralized and opaque
  • Require trust in third parties
  • Lack real-time transparency
  • Restrict user control over funds

💡 Solution

StabiliFund solves this by providing:

  • Fully decentralized fund pooling
  • Smart contract–controlled deposits and withdrawals
  • Tokenized fund shares (ERC20)
  • Transparent, immutable on-chain accounting
  • Secure, permissioned admin controls for emergencies

🧱 Architecture

User Wallet (MetaMask)
        ↓
Frontend (React / Next.js)
        ↓
Ethers.js / Web3.js
        ↓
Smart Contracts (Polygon Mumbai)

🔗 Smart Contracts

1️⃣ FundPool Contract

  • Accepts user deposits
  • Handles withdrawals
  • Manages fund balance
  • Mints/Burns share tokens
  • Protected against reentrancy attacks

2️⃣ StabiliToken (ERC20)

  • Represents user ownership in the fund
  • Minted on deposit
  • Burned on withdrawal
  • Uses OpenZeppelin ERC20 standard

3️⃣ Admin Controls

  • Emergency withdrawal
  • Ownership-based access control
  • Extendable to DAO governance

🖥️ Frontend Features

  • Wallet connection via MetaMask
  • Deposit and withdrawal interface
  • Real-time balance display
  • Transaction feedback
  • Clean and simple UI for demos

🧪 Testing

  • Unit tests written using Hardhat

  • Covers:

    • Deposits
    • Withdrawals
    • Token minting & burning
    • Admin permissions

🔐 Security Measures

  • Reentrancy protection
  • Solidity ^0.8.x overflow checks
  • OpenZeppelin libraries
  • Restricted admin access

🚀 Deployment

Smart Contracts

  • Network: Polygon Mumbai Testnet
  • Deployed using Hardhat

Frontend

  • Hosted using Vercel
  • Connected to deployed smart contracts

⚙️ Tech Stack

  • Blockchain: Polygon (Mumbai)
  • Smart Contracts: Solidity, Hardhat
  • Frontend: React / Next.js
  • Web3: Ethers.js
  • Wallet: MetaMask
  • Libraries: OpenZeppelin

📦 Installation & Setup

# Clone the repository
git clone <repo-url>
cd StabiliFund

# Install dependencies
npm install

# Compile contracts
npx hardhat compile

# Deploy locally
npx hardhat node
npx hardhat run scripts/deploy.js --network localhost

🌱 Future Scope

  • Integration with DeFi protocols (Aave, Compound)
  • DAO-based governance
  • Yield strategies for stable returns
  • Price oracle integration
  • Multi-chain support

🏆 Hackathon Value

  • Demonstrates real on-chain deployment
  • Implements DeFi primitives correctly
  • Shows security awareness
  • Production-style architecture

📄 License

MIT License


👨‍💻 Author

Built with ❤️ as a Web3 & DeFi project for learning, experimentation, and hackathons.