Starosca
Collateralized ROSCA with AI-powered yield optimization on Base — trustless savings circles for 3 billion people, powered by 6 Chainlink products.
What it is
Starosca modernizes ROSCA (Rotating Savings and Credit Association) — known as Arisan (Indonesia), Chit Fund (India), Tontine (West Africa) — a $1 trillion/year informal savings system used by 3+ billion people worldwide.
Traditional ROSCA has three critical flaws: (1) default risk — members who won the pot stop paying, collapsing the pool; (2) idle capital — pooled funds earn 0% yield; (3) unfair selection — winner is hand-picked by organizers.
Starosca solves all three:
• Collateral enforcement: each member deposits N×monthly as collateral upfront. Missed payments auto-deduct from collateral — pool is always 100% solvent.
• AI yield optimization: idle funds (collateral + contributions) are deployed to the highest-yielding DeFi protocol (Aave V3, Compound V3, Moonwell) via a Chainlink CRE Workflow running GPT-4o-mini analysis every 4 hours.
• Provably fair drawing: Chainlink VRF v2.5 selects the monthly winner — tamper-proof, on-chain verifiable.
At the end of all rounds, every participant receives their full collateral back plus accumulated DeFi yield. The protocol is fully deployed on Base Sepolia with a live frontend at starosca.vercel.app.
How it Works
Starosca is a full-stack DeFi protocol built across 4 layers:
Smart Contracts (Solidity 0.8.24, Foundry): StaroscaFactory uses EIP-1167 minimal proxy clones to deploy pools at 97% lower gas cost. StaroscaPool handles the full ROSCA lifecycle (join, pay, draw, finalize, claim). YieldManager is a singleton contract routing all deposits to yield adapters (Aave V3, Compound V3, Moonwell). CrossChainDeposit enables CCIP cross-chain participation.
CRE Workflow (TypeScript, Bun, @chainlink/cre-sdk): A cron-triggered workflow runs every 4 hours on Chainlink DON. It fetches live APY data from DeFiLlama and on-chain adapters, sends it to GPT-4o-mini for AI analysis (evaluating APY, TVL, risk, volatility, gas cost), and automatically executes an on-chain rebalance if improvement exceeds 0.5% APY.
Backend (Fastify, TypeScript, SQLite, viem): Event indexer polls on-chain events and serves pool/yield data via REST API.
Frontend (Next.js 16, wagmi v2, WalletConnect): Full UI for pool browsing, creation, joining, monthly payments, VRF drawing view, dashboard, and yield claiming. Deployed on Vercel.
VRF subscription funded with 25 LINK. All 6 contracts verified on Base Sepolia.
Links
Created by
- Kurniawan Candre
- Achmad Fauzan Ashari