Skip to content

Xoulomon/Stellar-Save

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

346 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Stellar-Save β€” Rotational Savings on Stellar

A decentralized rotational savings and credit association (ROSCA) built on Stellar Soroban smart contracts.

Stellar Save is a traditional community-based savings system where members contribute a fixed amount regularly, and each member receives the total pool on a rotating basis. This project brings this time-tested financial mechanism to the blockchain, making it transparent, trustless, and accessible globally.

🎯 What is Stellar-Save?

Stellar-Save is a rotating savings and credit association (ROSCA) common in Nigeria and across Africa. Members:

  • Form a group with a fixed contribution amount
  • Contribute the same amount each cycle (e.g., weekly or monthly)
  • Take turns receiving the full pool of contributions
  • Build trust and financial discipline within communities

This Soroban implementation makes Stellar-Save:

  • βœ… Trustless (no central coordinator needed)
  • βœ… Transparent (all transactions on-chain)
  • βœ… Accessible (anyone with a Stellar wallet can join)
  • βœ… Programmable (automated payouts, no manual coordination)

πŸš€ Features

  • Create Groups: Set contribution amount, cycle duration, and max members
  • Join & Participate: Members join and contribute each cycle
  • Automatic Payouts: When all members contribute, payout executes automatically to the next recipient
  • Native XLM Support: Built-in support for Stellar Lumens (XLM)
  • Token Ready: Architecture supports custom Stellar tokens (roadmap item)
  • Transparent: All contributions and payouts are verifiable on-chain

πŸ› οΈ Quick Start

Prerequisites

Build

./scripts/build.sh

Test

./scripts/test.sh

Setup Environment

  1. Copy the example environment file:
cp .env.example .env
  1. Configure your environment variables in .env:
# Network configuration
STELLAR_NETWORK=testnet
STELLAR_RPC_URL=https://soroban-testnet.stellar.org

# Contract addresses (after deployment)
CONTRACT_GUESS_THE_NUMBER=<your-contract-id>
CONTRACT_FUNGIBLE_ALLOWLIST=<your-contract-id>
CONTRACT_NFT_ENUMERABLE=<your-contract-id>

# Frontend configuration
VITE_STELLAR_NETWORK=testnet
VITE_STELLAR_RPC_URL=https://soroban-testnet.stellar.org
  1. Network configurations are defined in environments.toml:
    • testnet - Stellar testnet
    • mainnet - Stellar mainnet
    • futurenet - Stellar futurenet
    • standalone - Local development

Deploy to Testnet

# Configure your testnet identity first
stellar keys generate deployer --network testnet

# Deploy
./scripts/deploy_testnet.sh

Run Demo

Follow the step-by-step guide in demo/demo-script.md

πŸ“– Documentation

πŸŽ“ Smart Contract API

Group Management

create_group(contribution_amount, cycle_duration, max_members) -> u64
get_group(group_id) -> Group
list_members(group_id) -> Vec<Address>

Membership

join_group(group_id)
is_member(group_id, address) -> bool

Contributions

contribute(group_id)
get_contribution_status(group_id, cycle_number) -> Vec<(Address, bool)>

Payouts

execute_payout(group_id)
is_complete(group_id) -> bool

πŸ§ͺ Testing

Comprehensive test suite covering:

  • βœ… Group creation and configuration
  • βœ… Member joining and validation
  • βœ… Contribution flow and tracking
  • βœ… Payout rotation and distribution
  • βœ… Group completion lifecycle
  • βœ… Error handling and edge cases

Run tests:

cargo test

🌍 Why This Matters

Financial Inclusion: Over 1.7 billion adults globally are unbanked. Ajo/Esusu has served African communities for generations as a trusted savings mechanism.

Blockchain Benefits:

  • No need for a trusted coordinator
  • Transparent contribution and payout history
  • Programmable rules enforced by smart contracts
  • Accessible to anyone with a Stellar wallet

Target Users:

  • African diaspora communities
  • Unbanked/underbanked populations
  • Small business owners needing working capital
  • Communities building financial discipline

πŸ—ΊοΈ Roadmap

  • v1.0 (Current): XLM-only groups, basic functionality
  • v1.1: Custom token support (USDC, EURC, etc.)
  • v2.0: Flexible payout schedules, penalty mechanisms
  • v3.0: Frontend UI with wallet integration
  • v4.0: Mobile app, fiat on/off-ramps

See docs/roadmap.md for details.

🀝 Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

See our Code of Conduct and Contributing Guidelines.

🌊 Drips Wave Contributors

This project participates in Drips Wave - a contributor funding program! Check out:

Issues are categorized as:

  • trivial (100 points) - Documentation, simple tests, minor fixes
  • medium (150 points) - Helper functions, validation logic, moderate features
  • high (200 points) - Core features, complex integrations, security enhancements

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Stellar Development Foundation for Soroban
  • African communities that have practiced Ajo/Esusu for centuries
  • Drips Wave for supporting public goods funding

πŸ“ž Contact


Built with ❀️ for financial inclusion on Stellar

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 36