The ancient savings circle, perfected on-chain. Members pool tokens each round — one collects the full pot. Smart-contract enforced, yield-bearing, trustless community finance.
"The poor man's bank, where money is not idle for long" — now on Cairo/StarkNet with VESU yield
Deploy a SavingBox contract. Set the save_amount per round, number_of_payments (total rounds), payment_interval, withdraw_fee, and link a token + VESU yield address.
Members call pay() during the first round to register. Each round, every member contributes save_amount. Late payments are tracked separately from on-time ones.
Every deposit is automatically forwarded to the VESU lending protocol to earn interest while sitting in the pot. Idle money is never idle — it compounds for all members.
At cycle end, call withdraw() to receive your savings plus a proportional share of all fees. More on-time payments = bigger share. Early exit costs a fee.
Unlike traditional ROSCAs where pooled money sits idle, ROSCO automatically deposits every contribution into the VESU lending protocol. The pot generates yield in real-time. When the cycle ends, members split not just their savings — but the accumulated interest and fees from early withdrawals. The disciplined savers are rewarded most.
// Deploy a ROSCO savings circle on StarkNet const savingBox = await deploy("SavingBox", { save_amount: 30_000000000000000000, // 30 Qi (18 decimals) number_of_payments: 8, // 8 rounds payment_interval: 604800, // 7 days in seconds withdraw_fee: 10, // 10% early exit fee token_address: QI_TOKEN_ADDRESS, // ERC-20 Qi token vesu_address: VESU_POOL_ADDRESS, // VESU lending pool }); // Member joins by paying first round await savingBox.pay(); // Registers + deposits 30 Qi → VESU // ... after all rounds complete ... await savingBox.withdraw(); // Receives savings + fee share + yield
// What happens inside pay(): 1. advance_payment() // Sync current_round to block timestamp 2. if !registered → register // First-time callers join (round 1 only) 3. assert total_paid < max // Can't overpay 4. token.transfer_from(user) // Pull save_amount from member 5. update savings map // Track cumulative deposits 6. if on_time → valid++ // On-time? Increment valid_payments else → late++ // Late? Increment late_payments 7. token.approve(vesu) // Approve VESU to spend 8. vesu.deposit(amount) // Deposit to earn yield