{"id":50745520,"url":"https://github.com/edycutjong/ledgerloop","last_synced_at":"2026-06-10T20:30:40.619Z","repository":{"id":360111010,"uuid":"1248737847","full_name":"edycutjong/ledgerloop","owner":"edycutjong","description":"🔄 AI-Orchestrated Trustless Rotating Savings Circles (Tandas) with GNN credit-risk scoring.","archived":false,"fork":false,"pushed_at":"2026-05-25T04:24:22.000Z","size":5388,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T04:26:29.031Z","etag":null,"topics":["arbitrum","fintech","gnn","nextjs","react","solidity","tailwind"],"latest_commit_sha":null,"homepage":"https://ledgerloop.edycu.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edycutjong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-25T02:17:29.000Z","updated_at":"2026-05-25T04:24:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/edycutjong/ledgerloop","commit_stats":null,"previous_names":["edycutjong/ledgerloop"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/edycutjong/ledgerloop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fledgerloop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fledgerloop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fledgerloop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fledgerloop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edycutjong","download_url":"https://codeload.github.com/edycutjong/ledgerloop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fledgerloop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34170162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arbitrum","fintech","gnn","nextjs","react","solidity","tailwind"],"created_at":"2026-06-10T20:30:34.962Z","updated_at":"2026-06-10T20:30:35.618Z","avatar_url":"https://github.com/edycutjong.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"public/icon.svg\" alt=\"LedgerLoop icon\" width=\"120\" height=\"120\"\u003e\n  \u003ch1\u003eLedgerLoop 🔄\u003c/h1\u003e\n  \u003cp\u003e\u003cem\u003eAI-orchestrated trustless rotating savings circles backed by on-chain escrow and Graph Neural Network credit-risk scoring\u003c/em\u003e\u003c/p\u003e\n  \u003cimg src=\"docs/readme-hero.png\" alt=\"LedgerLoop\" width=\"100%\"\u003e\n\n  \u003cbr/\u003e\n\n  [![Live Demo](https://img.shields.io/badge/🚀_Live-Demo-06b6d4?style=for-the-badge)](https://ledgerloop.edycu.dev)\n  [![Pitch Deck](https://img.shields.io/badge/📊_Pitch-Deck-10b981?style=for-the-badge)](https://ledgerloop.edycu.dev/pitch.html)\n  [![YouTube Demo](https://img.shields.io/badge/▶_YouTube-Demo-FF0000?style=for-the-badge\u0026logo=youtube\u0026logoColor=white)](https://youtu.be/CNT1kNOkOio)\n  [![Tests](https://img.shields.io/badge/✅_Tests-54_passing-22c55e?style=for-the-badge)](#-testing--ci)\n  [![Built for UOE](https://img.shields.io/badge/UOE-Summer_of_Code_2026-8b5cf6?style=for-the-badge)](https://uoe-summer-of-code.devpost.com/)\n\n  \u003cbr/\u003e\n\n  ![Next.js](https://img.shields.io/badge/Next.js_16-black?style=flat\u0026logo=next.js)\n  ![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?style=flat\u0026logo=typescript\u0026logoColor=white)\n  ![React](https://img.shields.io/badge/React_19-61DAFB?style=flat\u0026logo=react\u0026logoColor=black)\n  ![Tailwind](https://img.shields.io/badge/Tailwind_v4-38B2AC?style=flat\u0026logo=tailwindcss\u0026logoColor=white)\n  [![CI](https://github.com/edycutjong/ledgerloop/actions/workflows/ci.yml/badge.svg)](https://github.com/edycutjong/ledgerloop/actions/workflows/ci.yml)\n\n\u003c/div\u003e\n\n---\n\n## 💡 The Problem \u0026 Solution\n\nOver **1 billion unbanked people** globally rely on rotating savings circles (*tandas*, *cundinas*, *ROSCAs*) as their primary source of capital. These systems suffer from two fatal failures: **organizer fraud** and **participant default**.\n\n**LedgerLoop** eliminates both by replacing human organizers with Solidity smart contract escrows and using a Graph Neural Network to dynamically score trust, scheduling higher-risk members for later payouts.\n\n**Key Features:**\n- ⛓️ **Trustless Escrow**: Deposits held in auditable Solidity contracts on Arbitrum Sepolia (~$0.014/tx)\n- 🧠 **GNN Trust Scoring**: Graph Neural Network evaluates wallet transaction patterns to detect sybil clusters and wash-trading loops\n- 🔄 **Dynamic Rotation**: Trust scores automatically determine payout order — riskier members get later turns or require collateral\n- 📊 **On-Chain Credit History**: Completed cycles build portable, verifiable credit for unbanked users\n\n## 📸 Screenshots\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eClick to expand all dashboard screenshots\u003c/strong\u003e\u003c/summary\u003e\n\n### Nairobi Builders — SETTLED ✅\n\u003e Completed 10/10 rounds with 2 members and a $20,000 pool. All contributions paid. The GNN Trust Scanner flagged wallet `0x71C2.9c22` as **WASH SYNDICATE / HIGH RISK** (trust score: 22, cyclic loop: 94%) — this member was automatically pushed to last rotation + 50% collateral.\n\n\u003cimg src=\"docs/screenshots/nairobi-builders.png\" alt=\"Nairobi Builders — settled circle, 10/10 rounds complete\" width=\"100%\"\u003e\n\n---\n\n### Lagos Traders Pool — ACTIVE 🟢\n\u003e 10-member circle at round 4/10 with $10,000 pool. Members sorted by trust score — Turn 10 is held by the flagged `0x71C2.9c22` wallet (trust: 22). Members with scores below 70 show red/amber trust bars. 3 members PAID, 7 UNPAID.\n\n\u003cimg src=\"docs/screenshots/lagos-traders-pool.png\" alt=\"Lagos Traders Pool — active circle showing trust-sorted rotation\" width=\"100%\"\u003e\n\n---\n\n### Medellín Micro-Fund — ACTIVE 🟢\n\u003e 5-member micro-savings circle at round 7/10. All 5 members have contributed ($350 each). Trust scores range from 71 to 96. Smart contract holds $5,000 escrow on Arbitrum Sepolia.\n\n\u003cimg src=\"docs/screenshots/medellin-micro-fund.png\" alt=\"Medellín Micro-Fund — active circle, all members paid\" width=\"100%\"\u003e\n\n---\n\n### Pending Circle — PENDING ⏳\n\u003e New circle with 1 member awaiting more participants. $1,000 pool target, $10/round. The pending member has a trust score of 70. Smart contract deployed but not yet active.\n\n\u003cimg src=\"docs/screenshots/pending-circle.png\" alt=\"Pending Circle — awaiting members\" width=\"100%\"\u003e\n\n\u003c/details\u003e\n\n## 🏗️ Architecture \u0026 Tech Stack\n\n```mermaid\ngraph TD\n    User([User Client]) \u003c--\u003e|Web3 via Wagmi/Viem| UI[Next.js 16 / React 19 Frontend]\n    UI \u003c--\u003e|Escrow Interactions| Contracts[Solidity Smart Contracts \u003cbr/\u003e Arbitrum Sepolia]\n    UI \u003c--\u003e|API Calls / Realtime| Supabase[Supabase Database]\n    Contracts --\u003e|Event Listeners| GNN[GNN AI Risk Engine \u003cbr/\u003e Python / PyTorch / DGL]\n    GNN --\u003e|Transaction Graphs| Explorer[Block Explorer / RPC]\n    GNN --\u003e|Store Trust Scores| Supabase\n    Supabase -.-\u003e|GNN Scores| UI\n```\n\n| Layer | Technology |\n|---|---|\n| **Frontend** | Next.js 16 (App Router), React 19, Tailwind CSS v4 |\n| **Smart Contracts** | Solidity (Hardhat), deployed on Arbitrum Sepolia |\n| **AI Risk Engine** | Python 3.12, FastAPI, PyTorch + DGL (Graph Neural Network) |\n| **Database** | Supabase (PostgreSQL) |\n| **Web3** | viem, wagmi |\n\n## 🗄️ Database Schema\n\nData is persisted in **Supabase (PostgreSQL)** with Row-Level Security enabled. All tables use the `ll_` prefix to namespace within the shared Supabase instance.\n\n```mermaid\nerDiagram\n    ll_circles ||--o{ ll_members : \"has\"\n    ll_circles {\n        text id PK\n        text name\n        varchar contract_address\n        varchar creator_address\n        numeric pool_size\n        numeric contribution_amount\n        int total_rounds\n        int current_round\n        varchar status\n        timestamptz created_at\n    }\n    ll_members {\n        text id PK\n        text circle_id FK\n        varchar address\n        text label\n        int trust_score\n        int rotation_turn\n        varchar status\n        numeric total_contributed\n    }\n    ll_trust_analyses {\n        serial id PK\n        varchar wallet_address\n        int trust_score\n        text classification\n        varchar risk_level\n        int transaction_count\n        int unique_counterparties\n        numeric cyclic_loop_score\n        text recommendation\n    }\n```\n\n| Table | Purpose | Rows |\n|---|---|---|\n| `ll_circles` | Savings circle configuration — pool size, round progress, contract address | 4 |\n| `ll_members` | Circle participants — wallet, trust score, rotation slot, contribution status | 18 |\n| `ll_trust_analyses` | GNN trust analysis results — risk classification, cyclic loop detection | 3 |\n\n\u003e **RLS Policy**: Anonymous read access enabled on all tables. Write operations require `service_role` key.\n\n## 🚀 Getting Started\n\n### Prerequisites\n- Node.js ≥ 20\n- npm\n\n### Installation\n```bash\ngit clone https://github.com/edycutjong/ledgerloop.git\ncd ledgerloop\nnpm install\ncp .env.example .env.local\nnpm run dev\n```\n\n## 🧪 Testing \u0026 CI\n\n**54 passing tests** across 5 test suites — covering mock data integrity, component rendering, interactive state transitions, trust analysis branching, and data cross-validation.\n\n```bash\nnpm test              # Run all 54 tests\nnpm run test:coverage # Coverage report\nnpm run lint          # ESLint\nnpm run typecheck     # TypeScript check\nnpm run build         # Production build\nnpm run ci            # Full CI pipeline (lint + typecheck + test + build)\n```\n\nCI runs on Node.js 20, 22, and 24 via GitHub Actions on every push.\n\n## 📁 Project Structure\n```\nledgerloop/\n├── docs/              # README assets\n├── src/\n│   ├── app/           # Next.js pages + __tests__/\n│   └── lib/           # Mock data \u0026 utilities + __tests__/\n├── .github/           # CI workflows\n├── .env.example       # Environment template\n├── LICENSE            # MIT\n└── README.md          # You are here\n```\n\n## Acknowledged Limitation\n**Cold-Start Trust**: Brand-new wallets with zero on-chain transaction history cannot receive a GNN trust score and are excluded from circle membership until they accumulate a minimum transaction graph.\n\n## 🔨 Built With\n\n- [Next.js 16](https://nextjs.org/) — App Router, React Server Components\n- [React 19](https://react.dev/) — UI framework\n- [TypeScript](https://www.typescriptlang.org/) — Type-safe JavaScript\n- [Tailwind CSS v4](https://tailwindcss.com/) — Utility-first styling\n- [Supabase](https://supabase.com/) — PostgreSQL database with Realtime + RLS\n- [Solidity](https://soliditylang.org/) — Smart contract escrow (Arbitrum Sepolia)\n- [Hardhat](https://hardhat.org/) — Smart contract development framework\n- [PyTorch](https://pytorch.org/) + [DGL](https://www.dgl.ai/) — Graph Neural Network trust scoring\n- [FastAPI](https://fastapi.tiangolo.com/) — Python backend for GNN inference\n- [viem](https://viem.sh/) + [wagmi](https://wagmi.sh/) — Web3 client libraries\n- [Jest](https://jestjs.io/) — Testing framework (54 passing tests)\n- [GitHub Actions](https://github.com/features/actions) — CI/CD pipeline\n- [Vercel](https://vercel.com/) — Frontend deployment\n\n## 📄 License\n[MIT](LICENSE) © 2026 Edy Cu\n\n## 🙏 Acknowledgments\nBuilt for **UOE Summer of Code 2026**. Thank you to the organizers and judges for the opportunity.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedycutjong%2Fledgerloop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedycutjong%2Fledgerloop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedycutjong%2Fledgerloop/lists"}