A Web3 platform that brings African savings circles (chamas) on-chain transparent contributions, micro-lending, and portable credit scores powered by MetaMask and Polygon
# PayLoop 🔗
> **The chama treasurer that can never steal.**
PayLoop is a decentralized group savings and micro-lending platform that digitises African informal savings circles (chamas) using blockchain technology. Built for the **Eldohub Web3 Hackathon 2026**.
---
## 🏗️ Architecture
```
┌─────────────────────────────────────────┐
│ Next.js 16 Web Dashboard │
│ (Tailwind CSS + wagmi v3 + viem) │
└──────────────────┬──────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ 🦊 MetaMask + Polygon Amoy │
│ wagmi v2 + viem + ethers v6 │
└──────────────────┬──────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ ⛓️ Smart Contracts (Solidity) │
│ CircleVault · LendingPool │
│ CreditScore · LoopToken (ERC-20) │
└──────────────────┬──────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ 🐍 Django Backend (Phase 3) │
│ PostgreSQL · M-Pesa · Firebase FCM │
└─────────────────────────────────────────┘
```
---
## ✨ Features
| Feature | Status |
|---------|--------|
| MetaMask wallet connect + network detection | ✅ |
| Dashboard with vault balance + charts | ✅ |
| Circle management + contract display | ✅ |
| Contribute MATIC via MetaMask | ✅ |
| Loan requests + member voting | ✅ |
| CreditLoop Score (0–1000) with QR code | ✅ |
| Member management (add/remove) | ✅ |
| Public transparency page | ✅ |
| Smart contracts (4 contracts deployed to Amoy) | ✅ |
| Django backend API | ✅ |
| M-Pesa Daraja integration | ✅ |
| Firebase FCM notifications | ✅ |
---
## 🚀 Quick Start
### Prerequisites
- Node.js 18+
- MetaMask browser extension
- Test MATIC from faucet.polygon.technology
### Smart Contracts
```bash
cd contracts
cp .env.example .env # add your private key
npm install
npx hardhat compile
npm test # run the Solidity test suite (61 tests)
npx hardhat run scripts/deploy.js --network amoy
```
### Frontend
```bash
cd web
cp .env.loca …