Automated, verifiable payments for open-source contributions
Grainzy is a comprehensive grant execution layer that converts ecosystem funding into automated, verifiable payments for open-source contributions. Built on Stellar Soroban, it ensures transparent, escrow-backed payouts based on real GitHub activity.
Open-source ecosystems face critical challenges:
- ❌ Grant money managed off-chain with no transparency
- ❌ Manual distribution of rewards by maintainers
- ❌ Delayed or subjective contributor payments
- ❌ No verifiable proof of how grants convert to real work
- ❌ Contributors must trust platforms or maintainers for fair payouts
Grainzy bridges ecosystems and contributors with an automated, on-chain execution layer:
- ✅ Escrow-first: Funds locked in smart contracts before work begins
- ✅ Automated payouts: Triggered by verified GitHub activity
- ✅ Transparent impact: Every payment is verifiable on-chain
- ✅ GitHub-native: Works with existing workflows
- ✅ Privacy-safe: KYC handled off-chain
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Ecosystem │────▶│ Program Escrow │────▶│ Project │
│ (Stellar) │ │ (Contract) │ │ Maintainer │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
│ Fund (XLM/tokens) │ Allocate funds │ Create issues
│──────────────────────▶│──────────────────────▶│──────────────
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ Grainzy Backend │
│ • GitHub webhook integration • Scoring engine │
│ • Off-chain verification • KYC management │
│ • Payout orchestration • Auditing │
└─────────────────────────────────────────────────────────────────┘
│
│ Auto-trigger
▼
┌─────────────────────────────────────────────────────────────────┐
│ Bounty Escrow (Contract) │
│ • Hold individual bounty funds │
│ • Enforce max claimants │
│ • Platform fee collection │
└─────────────────────────────────────────────────────────────────┘
│
│ Release
▼
┌─────────────────────────────────────────────────────────────────┐
│ Contributor Wallet │
└─────────────────────────────────────────────────────────────────┘
grainzy/
├── packages/
│ ├── contracts/ # Soroban smart contracts (Rust)
│ │ ├── src/
│ │ │ ├── lib.rs # Main exports
│ │ │ ├── grainzy_core.rs # Upgradeable contract
│ │ │ ├── program_escrow.rs # Program-level escrow
│ │ │ └── bounty_escrow.rs # Individual bounty escrow
│ │ ├── manifests/ # Machine-readable manifests
│ │ │ ├── grainlify-core-manifest.json
│ │ │ ├── program-escrow-manifest.json
│ │ │ └── bounty-escrow-manifest.json
│ │ ├── Cargo.toml
│ │ └── scripts/validate-manifests.sh
│ └── ui/ # Shared UI components
├── apps/
│ ├── backend/ # Express.js + TypeScript API
│ │ ├── src/
│ │ │ ├── models/ # Database models (Prisma)
│ │ │ ├── routes/ # API endpoints
│ │ │ ├── services/ # Business logic
│ │ │ │ ├── github.ts # GitHub webhook handler
│ │ │ │ ├── scoring.ts # Points calculation
│ │ │ │ ├── kyc.ts # KYC orchestration
│ │ │ │ └── payout.ts # Payout execution
│ │ │ ├── middleware/
│ │ │ └── utils/
│ │ └── package.json
│ └── webapp/ # Next.js frontend
│ ├── src/
│ │ ├── app/ # App Router pages
│ │ ├── components/ # React components
│ │ │ ├── HeroSection.tsx
│ │ │ ├── ProgramList.tsx
│ │ │ ├── HowItWorks.tsx
│ │ │ └── Navbar.tsx
│ │ ├── lib/ # Utilities
│ │ └── types/ # TypeScript definitions
│ └── package.json
├── package.json
├── turbo.json # Turborepo configuration
└── tsconfig.json
- Node.js 18+
- Rust 1.75+ (for contracts)
- PostgreSQL 14+
- Stellar CLI (for deployment)
# Install all workspaces
npm install
# Or install individually
npm --workspace=@grainzy/backend install
npm --workspace=@grainzy/webapp install# Backend
cd apps/backend
cp .env.example .env
# Fill in your values# Start all services (requires Turborepo)
npm run dev
# Or individually:
npm --workspace=@grainzy/backend run dev # Backend on :3001
npm --workspace=@grainzy/webapp run dev # Frontend on :3000cd packages/contracts
cargo build --target wasm32-unknown-unknown --releasecd packages/contracts
./scripts/validate-manifests.sh- Time-delayed upgrades (default 24h)
- Multisig governance (configurable threshold)
- Immutable upgrade history
- WASM hash verification
- Locks program funds in escrow
- Allocates to projects
- Processes contributor payouts
- Emergency pause functionality
- Per-bounty escrow
- Multi-token support
- Platform fee collection
- Claim approval workflow
- No on-chain identities: Only wallet addresses stored
- Off-chain KYC: Compliance handled separately
- Circuit breakers: Pause contracts during incidents
- Reentrancy protection: All state changes before external calls
- Time-locked upgrades: Prevent rapid malicious updates
Points awarded based on:
- Base points (assigned by maintainer)
- Complexity multiplier (PR size)
- Reputation bonus (contributor history)
- Capped maximum per PR
Formula: FinalPoints = min(Base × Complexity × Reputation, MAX_PER_PR)
Webhooks received for:
- Issues → Sync bounty point assignments
- Pull Requests → Link to issues, track status
- Reviews → Auto-approval logic
- Pushes → Trigger merge detection
# Deploy upgrade contract first
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/grainzy_contracts.wasm \
--source <admin-keypair> \
--network testnet
# Then deploy Program Escrow
# Then deploy Bounty Escrowcd apps/backend
npm run build
npm startcd apps/webapp
npm run build
# Deploy output folder# Run backend tests
npm --workspace=@grainzy/backend run test
# Run contract tests
npm run contracts:test
# End-to-end simulation (TODO)
npm run test:e2e- Architecture Guide - System design
- API Reference - Backend endpoints
- Contract Interface - Smart contract API
- Deployment Guide - Go-live checklist
- Contributing - Development workflow
We welcome contributions! Please see our Contributing Guide.
- Fork the repository
- Create feature branch:
git checkout -b feat/my-feature - Commit changes:
git commit -am 'Add feature' - Push branch:
git push origin feat/my-feature - Open a Pull Request
MIT License - see LICENSE for details.
- Stellar Development Foundation - Soroban platform
- OnlyDust - Grant coordination inspiration
- Open Source Community - The reason we do this
- Twitter: @grainzy
- Discord: Join our community
- Email: hello@grainzy.org
Built with ❤️ for open source maintainers and contributors worldwide.