Trustless rotating savings clubs (ROSCAs) on Stellar Soroban. Members contribute each cycle; the smart contract auto-rotates the pot. Built for Africa
# Chama Chain 🌍
> On-chain rotating savings clubs (ROSCAs) on Stellar Soroban — Built for Africa 🚀
Chama Chain brings the traditional African *chama* (rotating savings club) fully on-chain. Members contribute a fixed amount each cycle; the smart contract automatically rotates the full pot to one member per round — trustless, transparent, unstoppable.
**ROSCAs power a $100B+ informal savings economy across Africa. Chama Chain makes them trustless.**
---
## ✨ Features
- **Create a Chama** — Set member wallets, contribution amount, and cycle duration
- **On-chain Contributions** — Members contribute each cycle via Soroban token transfers
- **Automatic Rotation** — Contract enforces payout order and auto-distributes the pot
- **Cycle Tracking** — Full on-chain history of every cycle, contribution, and payout
- **Trustless** — No admin can steal funds; the contract enforces every rule
## 🏗️ Architecture
```
chama-chain/
├── contracts/
│ └── chama_core/ # ROSCA logic — create, contribute, rotate, withdraw
├── frontend/ # Next.js 14 app
│ └── src/
│ ├── app/ # Pages: home, create, club detail, dashboard
│ ├── components/ # UI components
│ ├── hooks/ # Stellar/Freighter hooks
│ └── lib/ # Contract client, network config
├── .github/workflows/ # CI/CD
└── docker-compose.yml
```
## 🚀 Quick Start
### Prerequisites
- Rust + `wasm32-unknown-unknown` target
- Stellar CLI
- Node.js 20+ and pnpm 9+
### 1. Clone & install
```bash
git clone
github.com
cd chama-chain
cp .env.example .env
```
### 2. Build & deploy contracts
```bash
cd contracts
cargo build --target wasm32-unknown-unknown --release
bash deploy.sh
```
### 3. Run frontend
```bash
cd frontend
pnpm install
pnpm dev
```
Open
localhost.
## 🔧 Environment Variables
| Variable | Description |
|---|---|
| `NEXT_PUBLIC_STELLAR_NETWORK` | `testnet` or `mainnet` |
| `NEXT_PUBLIC_CHAMA …