Goals, Architecture & Roadmap — Clean Reference
Goals and Principles
Core Goal: Ensure donations reach those most in need as directly as possible with minimal friction and intermediary costs, while providing verifiable transparency and abuse prevention.
Design Principles
- Replace manual processes with algorithmic automation
- Privacy first (data minimization + optional anonymity)
- Auditable transparency (on-chain records)
- Compliance & sustainability (modular KYC/AML)
- Flexible payment rails (on-chain / off-chain)
- Scalable & secure upgradability
Roles and Typical Use Cases
Roles: Donor, Beneficiary, Witness/Validator, Platform Operations, External Data Providers (Oracles).
Key Scenarios
- Donor sets up “$100 monthly donation, preference for medical expenses.”
- Beneficiary submits a request (medical bills, utility bills, tuition, etc.).
- AI risk/needs model scores the case in real time; qualified cases trigger a
smart contract
disbursement or direct bill payment. - All flows and receipts use zero-knowledge proofs + on-chain hashes for public auditability.
System Overview — High-Level Architecture
[Web/APP Client]
│
▼
[API Gateway] ──▶ [Identity/KYC Module] ──▶ [Private Key Custody / Wallet]
│ │
│ └─▶ [Encrypted Beneficiary Data Vault]
▼
[AI Orchestrator Layer]
├─▶ [Needs Recognition Model] (documents/images/OCR/NLP)
├─▶ [Risk Control Model] (fraud detection/multi-accounts/geo/graph)
├─▶ [Matching & Allocation Engine] (priority/theme/fairness)
└─▶ [Compliance Engine] (sanctions/AML/regional restrictions)
│
▼
[Payment Layer]
├─▶ Smart Contracts (stablecoins/token routing)
├─▶ On-chain / Off-chain payments (CBDC/bank/pay utility directly)
└─▶ Oracles (FX rates, goods verification, bill validation)
│
▼
[Transparency & Audit]
├─▶ Public Dashboard (anonymized aggregates)
├─▶ On-chain proofs (transaction & receipt hashes)
└─▶ ZK Privacy Reports (verifiable without exposing PII)
Module Design
1) Identity & Eligibility Verification (Phased)
- L0 (lightweight): Email/phone + device fingerprint + basic geo checks.
- L1 (standard): eKYC (ID/passport OCR + liveness), redacted bill uploads, AI authenticity checks.
- L2 (high-risk): Video verification, gov/hospital/school APIs, social reputation graph.
Output: KYCStatus = {level: L0/L1/L2, riskScore: 0..1, expiry}
2) Proof of Need & Document Verification
- OCR → extract amount, date, merchant, invoice/bill ID
- Authenticity checks against utility/school/hospital/telecom APIs or scrapers
- Generate zero-knowledge proofs (e.g., “this person owes ¥X” without revealing sensitive details)
3) Anti-Abuse / Anti-Sybil
- Multi-account detection: device graphs, IP/geo jumps, behavioral sequences, wallet clustering
- Graph risk: shared wallets, validator links, duplicate doc hashes
- Small initial disbursements + credit growth
4) Matching & Allocation Engine
Inputs: needScore, urgency, riskScore, theme, geo & fairness weights.
Outputs:
- Direct P2P disbursement
- Direct bill payment (hospital/school/utility)
- Split disbursement (one donation spread across multiple cases)
5) Payment Flows & Smart Contracts
interface AidRouter {
function pledge(bytes32 theme, uint256 amount, address asset) external; // donation escrow
function route(bytes32 caseId) external; // triggered allocation
function payDirect(bytes32 caseId, bytes merchant) external; // direct bill pay
event Routed(bytes32 caseId, address to, uint256 amount, address asset, bytes32 receiptHash);
}
Routing: stablecoins (USDC/USDT), local transfers (bank/ECPay), optional CBDC, mobile wallets. Policy: lowest fee → success rate → speed.
6) Transparency, Privacy & Audit
- Encrypted beneficiary data; minimal anonymized fields on-chain (amount, time, theme, geohash)
- Public dashboard: daily/weekly allocations, theme shares, geo heatmap, median times & fees
- Anonymous story cards via AI de-identification
- Third-party auditors access non-repudiable hashes; ZK reports prove compliance without exposing PII
Data Model (Simplified)
Beneficiary {
id, kycLevel, riskScore, geoHash, deviceHash, trustScore, wallet, preferFiat
}
Case {
id, beneficiaryId, theme, amount, urgency, docs:[hash], verified:true/false, zkProof
}
Pledge {
id, donorId, theme, amount, asset, recurring:true/false, preferences, caps
}
Disbursement {
id, caseId, amount, route:[onchain|bank|merchant], txHash|bankRef, receiptHash
}
RiskEvent { id, actorId, type, scoreDelta, evidence:[hash] }
Core Algorithms (Illustrative)
EligibilityScore:
score = w1*need + w2*urgency + w3*(1-risk) + w4*impact + w5*fairness
// fairness: extra weight for undercovered regions or long-unassisted applicants
DisbursementPolicy:
if risk > τ1 → reject
else if τ0 < risk ≤ τ1 → small disbursement first + bill-pay priority
else → normal amount + direct or bill-pay depending on case type
Governance & Community Participation
- Witness/Volunteer: upload on-site photos/interviews (auto redacted), earn token rewards (Proof-of-Visit)
- Reputation & penalties: false evidence → deduction/ban
- Dispute resolution: small arbitration jury (random + reputation), AI summary, final vote on-chain
- Open API: media/corporate CSR widgets for theme-specific donations
Compliance & Localization
- AML/KYC: sanctions checks, STR reporting, geo whitelists/blacklists
- Tax: auto receipts (on-chain hash + PDF), local tax formats
- Localization: merchant whitelist (hospitals/schools/utilities), multi-language & FX auto-conversion
Monitoring & SLOs
- SLOs: median disbursement ≤ 5 min (on-chain) / ≤ 1 day (bank); mispayment rate < 10⁻⁵
- Monitoring: latency, failure rates, automatic route switching
- Risk model drift detection (data/concept drift)
Security Threat Model (Highlights)
- Smart contracts: reentrancy/overflow/auth errors → formal verification + multisig
- Payments: phishing/address swap → whitelist + human confirmation
- Data: forged docs/deepfakes → multi-source cross-validation + forensic ML
- Abuse: Sybil farms → behavior graph + incremental limits + manual arbitration fallback
Cost Structure & Fees
- Platform fee: 0% base; sustained by optional tips or corporate sponsorships
- Payment fees: choose lowest-cost route; show real take-home %; favor direct bill-pay
- Ops costs: cloud, audits, compliance, model training; covered via open-source + audit funds
MVP → Roadmap
Phase 0 (8 weeks)
- Utility/tuition bill-pay MVP: upload bill → AI verify → small trial → pay directly
- Dashboard + on-chain hash proofs only
Phase 1
- Recurring donations + thematic preferences + split disbursements
- Anti-Sybil v1 (device/behavior) + credit curve
Phase 2
- Witness Proof-of-Visit, ZK reports v1, corporate CSR API
- Cross-border stablecoin routing
Phase 3
- Multi-country expansion, optional CBDC integration
- DAO governance trials
UI Flow Sketches (Sample Copy)
Donor: “I want to donate $100 monthly, medical only, risk preference: conservative (bill-pay first).” → Generates contract commitment + dashboard card.
Beneficiary: “Upload hospital bill” → Real-time verification progress bar → Estimated disbursement time + visualized payment path.
Deliverables
- API specification (OpenAPI/GraphQL)
- Smart contract prototype (Solidity/Move examples)
- Risk/matching model draft notebooks
- Low-fidelity dashboard mockups (Figma wireframes)