kiel997/esustellar

EsuStellar is an open-source platform that brings informal savings groups (Esusu / Ajo / Rotating Savings) to the Stellar blockchain.

โ˜… 0Forks 0GitHub โ†—Compare

Project website โ†—

README

EsuStellar ๐ŸŒโœจ

alt text

codecov

Esustellar is an open-source platform that brings informal savings groups (Esusu / Ajo / Rotating Savings) to the Stellar blockchain.

It helps communities save money together transparently, securely, and without relying on a single trusted organizer..


๐Ÿšจ Problem

Millions of people use informal savings groups, but these systems rely entirely on trust:

  • Organizers can disappear with funds
  • No transparency into contributions
  • No verifiable payout history
  • Disputes are hard to resolve.

๐Ÿ’ก Solution

EsuStellar uses the Stellar network to:

  • Provide transparent, on-chain record-keeping for savings groups
  • Automate payout rotation based on deterministic join order
  • Enable peer accountability through public contribution tracking
  • Reduce reliance on a single trusted organizer via smart contract logic

Note: Real token custody (locked escrow), dispute resolution, and configurable admin controls are planned for future releases. The current MVP records contributions and payouts on-chain but does not yet escrow funds within the contract.


๐Ÿงฉ Core Features

  • Create a savings group
  • Join a group
  • Fixed contribution amount
  • Monthly contributions
  • Rotating payout to members
  • Transparent on-chain records

๐Ÿ— Tech Stack

  • Blockchain: Stellar (Testnet)
  • Smart Contracts: Soroban
  • Frontend: React / Next.js
  • Wallet: Stellar Wallets (Freighter/lobster/lumen)
  • Monorepo: npm / Turborepo

๐Ÿ”„ Contract Architecture

EsuStellar uses two Soroban smart contracts that work together:

Savings Contract (contracts/savings/)

The core contract that manages savings group lifecycle:

  1. create_group โ€” Admin creates a new group with contribution amount, member count, frequency, and start date
  2. join_group โ€” Members join an open group. When the group is full, it transitions to Active and round 1 begins
  3. contribute โ€” Members contribute their fixed amount each round. When all members have contributed, payout is triggered automatically
  4. distribute_payout (internal) โ€” Rotates payout to the next eligible member based on join order. Advances to the next round

Registry Contract (contracts/registry/)

A discovery/index layer for on-chain group metadata:

  1. register_group โ€” After creating a savings group, the admin registers it in the registry for frontend discovery
  2. add_member โ€” Tracks which users belong to which groups
  3. update_group_info โ€” Re-syncs metadata when group state changes

Expected Call Sequence

1. Admin โ†’ savings::create_group(group_id, ...)
2. Members โ†’ savings::join_group(group_id) [repeat until full]
3. Admin โ†’ registry::register_group(contract_address, group_id, ...)
4. Members โ†’ savings::contribute(group_id) [each round]
5. Auto   โ†’ savings::distribute_payout (triggered when all paid)
6. Repeat steps 4-5 for each round

Note: Registration is optional but recommended for frontend discovery. The savings contract operates independently of the registry.


๐Ÿ“‚ Repository Structure

esustellar/
โ”œโ”€โ”€ apps/
โ”‚ โ””โ”€โ”€ web/ # Frontend application
โ”œโ”€โ”€ contracts/
โ”‚ โ”œโ”€โ”€ savings/ # Soroban savings contract
โ”‚ โ””โ”€โ”€ registry/ # Soroban registry contract
โ”œโ”€โ”€ environments/
โ”‚ โ””โ”€โ”€ testnet/ # Testnet deployment workspace
โ”œโ”€โ”€ packages/
โ”‚ โ””โ”€โ”€ shared/ # Shared types & utils
โ”œโ”€โ”€ docs/ # Architecture & specs
โ”œโ”€โ”€ .github/
โ”‚ โ””โ”€โ”€ ISSUE_TEMPLATE/
โ”œโ”€โ”€ CHANGELOG.md # Contract & platform interface changelog
โ””โ”€โ”€ README.md

๐Ÿ›  Development & Operations

Monitoring & Log Aggregation

  • Loki & Grafana: Centralised log aggregation is pre-configured via Docker Compose (docker-compose.yml) and Kubernetes (k8s/monitoring/).
  • Validation: Run npm run validate-monitoring to verify log aggregation configurations.
  • Documentation: See docs/logging.md.

Utility Scripts

  • Post-Deploy Smoke Tests: npm run smoke-test (automatically invoked after ./deploy.sh).
  • Export & Archive Contract Event Logs: npm run export-events (exports events to logs/contract-events.jsonl).
  • Deployment Guide: See docs/deployment.md.

๐Ÿค Contributing Guide

EsuStellar is open-source and beginner-friendly.

  • Look for issues tagged good first issue
  • Follow the contribution guide (coming soon)
  • Open discussions for ideas and improvements

๐Ÿ“œ License

MIT License

Contributors

phertyameenA6dulmalikdependabot[bot]abdoolyarolimxiyTyler7xUmmi-001IbinolaQoder-UndefinedYaronZakiBigBen-7kike-altDev-ZullyNo-bodyqayshadogoummarigMaryermarhLynndabelportableDDwumibalsohamamarachi474-delmijinummideedee-codeahmadogoa-malik-ghmfteeKaylahrayTinna23PeterOcheObiajulu-gif

Issues