A decentralized, multi-chain Community Savings Circle (Susu/ROSCA) protocol built on Celo and Stacks.
SusuChain modernizes traditional community savings by bringing transparency, security, and automation to rotating savings circles. Users can pool funds together with friends or community members and rotate payouts every cycle, completely trustlessly.
- Multi-Chain Support: Native support for both Celo (optimized for mobile/MiniPay) and Stacks (Bitcoin L2).
- Celo MiniPay Integration: Engineered specifically to run flawlessly inside the Opera MiniPay wallet, allowing users to save using ultra-fast, low-fee Celo transactions. Includes robust handling for MiniPay's fee-abstraction mechanisms.
- Stacks / Leather Wallet Integration: Deep integration with the Stacks ecosystem for users who prefer Bitcoin-secured smart contracts via the Leather wallet.
- Automated Payouts (Celo): Smart contracts on Celo automatically trigger and route payouts the exact moment the final round contribution is received.
- Trustless & Decentralized: No central authority holds the funds. Smart contracts strictly enforce contribution tracking, round management, and payout distribution.
SusuChain is a monorepo managed by Turborepo containing:
apps/web: The unified Next.js 14 frontend application that serves both the Celo MiniPay mobile experience and the Stacks desktop experience.apps/contracts: Hardhat environment containing the Celo EVM Solidity smart contracts.apps/stacks: Clarinet environment containing the Stacks Clarity smart contracts.
- Node.js (v18+)
- pnpm
- Leather Wallet (for Stacks)
- Opera MiniPay (for Celo mobile testing)
-
Install all monorepo dependencies:
pnpm install
-
Configure environment variables: Ensure your
.env.localinsideapps/webis configured with the correct contract addresses:NEXT_PUBLIC_SUSUCHAIN_CELO_ADDRESS=0x... NEXT_PUBLIC_STACKS_CONTRACT_ADDRESS=SP... NEXT_PUBLIC_STACKS_CONTRACT_NAME=susuchain
-
Start the development server:
pnpm dev
-
Open http://localhost:3000 in your browser. (Note: For the Celo experience, tunnel this URL via ngrok and open it inside the MiniPay browser).
The Celo smart contracts are located in apps/contracts.
- Compile contracts:
pnpm contracts:compile - Deploy to Celo Mainnet:
npx hardhat ignition deploy ignition/modules/SusuChain.ts --network celo
The Stacks smart contracts are located in apps/stacks.
- Check syntax & types:
cd apps/stacks && clarinet check - Run test suites:
cd apps/stacks && clarinet test
- Frontend: Next.js 14 (App Router), React, TypeScript, Tailwind CSS
- Celo Web3: Viem, Wagmi
- Stacks Web3:
@stacks/connect,@stacks/network,@stacks/transactions - Smart Contracts: Solidity (Hardhat), Clarity (Clarinet)
- Tooling: Turborepo, PNPM
This project is open-source and available under the MIT License.