
Circles
DeFi savings circles with cross-chain automation
About
The problem it solves Across Africa and many emerging markets, **savings circles** (known as tandas in Latin America, chamas in Kenya or tontines in West Africa) are a cornerstone of financial life. These rotating credit associations help millions of people save, invest and access credit. However, traditional savings circles face significant challenges: 1. **Manual Coordination Nightmare**: Members rely on WhatsApp groups, Excel spreadsheets and manual reminders. Disputes arise when someone misses a payment or questions the payout order. There's no transparent, neutral mechanism to enforce rules or determine winners. 2. **Lost Earning Potential**: Pooled money sits idle in bank accounts earning minimal interest. Members miss out on DeFi yields that could 10x their returns, with no way to earn while waiting for their payout turn. 3. **Trust and Transparency Issues**: Traditional circles usually rely on a treasurer who manages all funds manually. These treasurers sometimes misplace or lose funds, creating disputes and eroding trust. With blockchain technology, everyone maintains individual ownership and all funds are viewable onchain, eliminating the single point of failure and ensuring complete transparency. 4. **DeFi Complexity Barrier**: Accessing yield requires navigating multiple chains, bridges, and protocols. High gas fees and technical knowledge exclude most potential users. Fragmented liquidity means missing better opportunities on other chains. Circles transforms traditional savings circles into automated, yield-generating, cross-chain financial instruments powered by Chainlink's oracle infrastructure. Members' USDC automatically deploys to highest-yielding protocols across multiple chains, earning 5-15% APY while waiting for their payout turn (vs 0% in traditional circles). Chainlink VRF provides unbiased recipient selection, while CCIP enables seamless cross-chain fund deployment without complex bridging.
How it's made
Challenges we ran into 1. **Cross-Chain Withdrawal Zero Token Error**: We encountered a critical bug during the implementation of our cross-chain withdrawal flow. When users requested withdrawals, we first send a withdrawal message from Fuji to our YieldExecutor on Sepolia, which withdraws funds from yield protocols and sends them back cross-chain to the user's destination. However, we kept getting the custom error 0x5cf04449 when sending the initial withdrawal signal from Fuji to Sepolia. After extensive debugging and digging through Chainlink's GitHub documentation, we discovered this error translates to "Thrown when attempting to send a token with amount zero." The issue was that we were sending a pure message without any token transfer since we're requesting a withdrawal, not depositing. We solved this by including a negligible amount of 1 wei in the CCIP message to satisfy the non-zero token requirement while maintaining the withdrawal logic. 2. **Cross-Chain State Synchronization Bug**: We ran into a critical issue where member balances and yield earnings were getting out of sync across chains during high-frequency operations. The problem occurred when CCIP messages arrived out of order, causing the Avalanche hub to show different balances than what was actually deployed on Ethereum. We solved this by implementing a hub-and-spoke model with sequence numbers and message acknowledgments, ensuring Avalanche remains the authoritative state layer while using CCIP for reliable cross-chain messaging with proper ordering guarantees. 3. **VRF Randomness Integration Hurdle**: Initially, we struggled with integrating Chainlink VRF V2 Plus for fair recipient selection. The callback function wasn't properly handling the randomness fulfillment, causing payout selections to fail silently. After debugging, we discovered we needed to properly implement the subscription model and handle both native and LINK payment methods. We fixed this by restructuring our VRF integration with proper error handling and implementing a robust callback mechanism that stores the random words and triggers recipient selection only after successful fulfillment.