https://github.com/bruh-codes/yieldedu
A decentralized fixed-yield protocol built on EDU Chain that enables users to earn guaranteed yields on their EDU tokens while contributing to the educational ecosystem.
https://github.com/bruh-codes/yieldedu
edu next15 solidity solidity-dapps
Last synced: 7 months ago
JSON representation
A decentralized fixed-yield protocol built on EDU Chain that enables users to earn guaranteed yields on their EDU tokens while contributing to the educational ecosystem.
- Host: GitHub
- URL: https://github.com/bruh-codes/yieldedu
- Owner: Bruh-Codes
- License: mit
- Created: 2024-12-18T04:43:49.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-13T23:03:36.000Z (7 months ago)
- Last Synced: 2025-03-13T23:28:39.722Z (7 months ago)
- Topics: edu, next15, solidity, solidity-dapps
- Language: TypeScript
- Homepage: https://edu-chain-hackathon.vercel.app
- Size: 1.23 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# 🌟 EDU Fixed Yield Protocol
A decentralized fixed-yield protocol built on EDU Chain that enables users to earn guaranteed yields through staking and participating in educational activities. Stack your knowledge with your tokens - learn, earn, and earn FYT tokens on your EDU holdings through staking rewards and educational achievements.

## 🔧 Prerequisites
- Node.js v18+
- pnpm
- Git
- EDU testnet wallet
- IDE (VS Code recommended)## 🚀 Quick Start
1. **Clone the repository**
```bash
git clone https://github.com/Bruh-Codes/EDU-chain-hackathon.git
cd EDU-chain-hackathon
```1. **Install dependencies for hardhat**
```bash
# Install root dependencies
pnpm install# Install frontend dependencies
cd frontend
pnpm install
```1. **Set up environment variables**
```bash
cd .. # // from frontend# In the root directory
npx hardhat vars set ACCOUNT_PRIVATE_KEY
# Enter your wallet's private key when prompted
```1. **Compile Smart Contracts**
```bash
# In the root directory
npx hardhat compile# //it has already been deploy so there is no need. you can skip this step
npx hardhat deploy
```1. **Run Tests**
```bash
npx hardhat test
``````bash
# Run all tests with gas reportingREPORT_GAS=true npx hardhat test
# Run coverage to see test coverages
npx hardhat coverage
```1. **Start Frontend Development Server**
```bash
# In the frontend directory
cd frontend
pnpm install
pnpm run dev
```1. **Access the Application**
Open `http://localhost:3000` in your browser## 📝 Contract Addresses (EDU Testnet)
YieldToken: `0x235a61846Cc52410948E37B1d426Cb82F41f940e`
YieldPool: `0xCbe4C05520F526FEFd0e0FC133bfA24a033546B8`## 📝 Verified Contract URL
[YieldToken](https://edu-chain-testnet.blockscout.com/address/0x235a61846Cc52410948E37B1d426Cb82F41f940e#code)
[YieldPool](https://edu-chain-testnet.blockscout.com/address/0xCbe4C05520F526FEFd0e0FC133bfA24a033546B8#code)## 🔍 Features
- **Fixed Yield Generation**
- 10% APY on all deposits
- Automatic yield calculation
- No impermanent loss risk- **Flexible Staking Options**
- Lock periods from 1 to 365 days
- Early unstaking with 10% penalty
- Multiple active positions per wallet- **Learn & Earn System**
- Answer educational questions
- Earn rewards for correct answers
- Progressive difficulty levels
- Track learning progress- **Security & Transparency**
- Non-custodial protocol
- Fully audited smart contracts
- Real-time position tracking- **User Experience**
- Interactive analytics dashboard
- Position management interface
- Faucet for testnet tokens
- Mobile-responsive design## 🛠 Tech Stack
- **Frontend**: Next.js, TailwindCSS, shadcn/ui
- **Web3**: Reown AppKit, wagmi, viem
- **Smart Contracts**: Solidity, Hardhat
- **Testing**: Hardhat, Chai## 📈 Local Development
1. **Start Local Hardhat Node**
```bash
npx hardhat node
```1. **Deploy Contracts Locally**
```bash
npx hardhat ignition deploy ./ignition/modules/YieldPool.ts --['your network']
```1. **Configure Frontend**
- Update contract addresses in `frontend/lib/utils.ts`
- Ensure your wallet is connected to localhost network or your preferred network.1. **Handling Metamask Errors**
Metamask currently has a bug so sometimes transactions will fail in cases like minting and switching addresses. This is because metamask tracks blocks which is not in sync with the local network and will sometimes throw errors like Internal JSON-RPC Error. to fix these errors1. **Handling Connection Errors**
sometimes connections to your metamask will not be detected. This is a reown library problem. to resolve this issue,- Click on your metamask
- Click on the green dot on the top-right beside your options menu
- Disconnect and try again connecting on th site.- Click on Metamask and go to settings
- Click on Advanced
- Click on Clear Activity Tab Data
- Click on ClearNOTE: to switch your account address you must do that in you metamask wallet.
## 🤝 Contributing
1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Open a Pull Request## 📄 License
MIT License - see the [LICENSE](LICENSE) file for details.
---
Built by [Kamasah Dickson](https://kamasahdickson.vercel.app)