A quest-based earning platform that turns work into achievements on the Stellar blockchain
StellarEarn is a quest-based earning platform where teams define tasks ("quests"), contributors complete them, and rewards are distributed on-chain via Stellar smart contracts (Soroban). Users level up by completing quests, building an on-chain reputation trail and unlocking higher-value opportunities.
- Create & manage quests with criteria, rewards, deadlines, and proof requirements
- Complete & verify quests with off-chain signals (API, GitHub webhooks, form attestations) and on-chain validation
- Distribute rewards programmatically to contributors via Stellar assets
- Track reputation and progress with XP and badges captured through contract state
- Provide a trust-minimized, low-fee, and fast-settlement reward system
- Align incentives for open-source projects, DAOs, and distributed teams
- Leverage Stellar's strengths in payments, asset issuance, and on/off-ramps
Payments-first chain: Stellar was designed for fast, low-cost asset transfers and global remittances, making it ideal for frequent micro-reward payouts.
Asset issuance & compliance-friendly design: Projects can issue reward tokens or use existing assets with built-in trustlines and anchors to access real-world on/off-ramps.
Soroban smart contracts: Modern, Rust-based contracts bring programmability to Stellar, enabling verifiable task completion, escrow, and conditional payouts with deterministic execution and safety-focused tooling.
Learn more: Stellar Developers | Soroban Documentation
- Open-source communities & maintainers who want to reward contributors transparently
- DAOs & Web3 communities running bounty boards or seasonal quests
- Startups & product teams incentivizing internal milestones or growth tasks
- Education & talent platforms that issue credentials and micro-grants for verifiable learning
- π§ Quest management - Create, assign, and track task progress
- π§© Flexible verification - Off-chain attestations, API checks, or multi-sig approvals
- πΈ On-chain payouts - Automatic rewards via Stellar assets (stablecoins or project tokens)
- π‘οΈ Escrow & conditions - Release rewards only when criteria are met
- β Reputation & levels - XP, badges, and a provable on-chain record
- π Multi-network support - Local sandbox, testnet, or mainnet-ready configs
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Stellar/ β
β Next.js βββββββΊβ NestJS βββββββΊβ Soroban β
β β β β β β
β β’ User Dashboardβ β β’ REST/GraphQL β β β’ Quest Contractβ
β β’ Quest Browser β β β’ Auth & RBAC β β β’ Reputation β
β β’ Submissions β β β’ Quest Service β β β’ Asset/Reward β
β β’ Wallet Connectβ β β’ Payout Logic β β β
βββββββββββββββββββ β β’ Webhooks β βββββββββββββββββββ
β β’ DB (Postgres) β
ββββββββββββββββββββ
- Admin creates a quest (API persists off-chain metadata; contract registers reward logic)
- Contributor submits proof; API verifies (webhooks/API checks) and calls the contract
- Contract releases/stores state; payouts executed in Stellar assets
- UI reflects on-chain state + off-chain metadata; users level up
EarnQuestOnestellar_Earn/
βββ apps/
β βββ web/ # Next.js frontend (App Router)
β β βββ app/ # routes
β β βββ components/
β β βββ lib/ # wallet utils, API client
β β βββ public/
β β βββ tests/
β βββ api/ # NestJS backend
β βββ src/
β β βββ main.ts
β β βββ app.module.ts
β β βββ modules/
β β βββ quests/
β β βββ users/
β β βββ payouts/
β β βββ webhooks/
β βββ prisma/
β βββ test/
βββ contracts/
β βββ earn-quest/ # Soroban/Rust contract
β βββ src/
β β βββ lib.rs
β βββ Cargo.toml
β βββ tests/
βββ infra/
β βββ docker-compose.yml
β βββ migrations/
βββ scripts/
βββ .env.example
βββ package.json
βββ README.md
βββ LICENSE
- Node.js β₯ 18.x and npm or pnpm
- Rust & Cargo (stable)
- Soroban CLI (for building/deploying contracts)
- Docker (optional; for Postgres and local services)
- Git
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shSoroban CLI & Stellar tooling: See official docs
# Clone the repository
git clone https://github.com/<your-org>/EarnQuestOnestellar_Earn.git
cd EarnQuestOnestellar_Earn
# Install dependencies
cd apps/web && pnpm install
cd ../api && pnpm install
cd ../../
# Build contract
cd contracts/earn-quest && cargo build
cd ../../Create .env files based on .env.example:
Root .env:
# Network
STELLAR_NETWORK=testnet
SOROBAN_RPC_URL=https://<testnet-rpc>
CONTRACT_ID=<set-after-deployment>
# Wallet/Signing
SOROBAN_SECRET_KEY=<server-key>
ISSUER_PUBLIC_KEY=<reward-asset-issuer>
# Database
DATABASE_URL=postgres://user:pass@localhost:5432/earnquestFrontend (apps/web/.env.local):
NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_SOROBAN_RPC_URL=
NEXT_PUBLIC_CONTRACT_ID=
API_BASE_URL=http://localhost:3001Backend (apps/api/.env):
PORT=3001
DATABASE_URL=postgres://user:pass@localhost:5432/earnquest
STELLAR_NETWORK=testnet
SOROBAN_RPC_URL=
CONTRACT_ID=
SOROBAN_SECRET_KEY=
JWT_SECRET=your_jwt_secret1. Start Postgres:
docker compose -f infra/docker-compose.yml up -d2. Run database migrations:
cd apps/api
pnpm prisma migrate dev3. Start backend:
cd apps/api
pnpm start:dev4. Start frontend:
cd apps/web
pnpm dev
# Access at http://localhost:3000The Soroban smart contract includes these conceptual modules:
- QuestRegistry - Create/update quests (reward asset, amount, verifier)
- Submission - Submit proof; store status; emit event
- Verifier - Check conditions (role-based, multi-sig, or data-driven)
- Payout - Transfer asset to recipient upon approval
- Reputation - Track XP/badges per address
register_task(id, reward_asset, amount, verifier)
submit_proof(id, proof_ref)
approve(id, address, amount)
claim_reward(id)
get_user_stats(address)
get_task(id)cd contracts/earn-quest
# Build
cargo build --release
# Run tests
cargo testexport STELLAR_NETWORK=testnet
export SOROBAN_RPC_URL=<your-testnet-rpc>
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/earn_quest.wasm \
--network $STELLAR_NETWORK \
--secret-key $SOROBAN_SECRET_KEY \
--rpc-url $SOROBAN_RPC_URL
# Save the CONTRACT_ID output to your .env files# Register a quest
soroban contract invoke \
--id $CONTRACT_ID \
--fn register_task \
--arg id=Q-001 --arg reward_asset=... --arg amount=100
# Get user stats
soroban contract invoke \
--id $CONTRACT_ID \
--fn get_user_stats \
--arg address=<stellar-address>Frontend:
cd apps/web
pnpm test
pnpm test:watch
pnpm lint
pnpm typecheckBackend:
cd apps/api
pnpm test
pnpm test:e2e
pnpm lintContracts:
cd contracts/earn-quest
cargo test- Local - Fastest iteration; use sandbox RPC and fake keys
- Testnet - Public test environment; faucet for test funds
- Mainnet - Real assets and fees; ensure audits and monitoring
Update STELLAR_NETWORK and SOROBAN_RPC_URL in:
- Contract deployment scripts
- Backend
.env - Frontend
.env.local
Important: Ensure reward assets exist and users have trustlines set before payouts.
POST /quests- Create questGET /quests- List questsPOST /quests/:id/submit- Submit proofPOST /quests/:id/approve- Approve submission
POST /payouts/claim- Claim rewards
GET /users/:address/stats- Get reputation & earnings
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feat/your-feature - Set up your environment using the installation steps
- Write tests and ensure they pass
- Lint and typecheck your code
- Open a pull request with a clear description
Use Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changeschore:- Maintenance tasksrefactor:- Code refactoringtest:- Test updates
- Do not include secrets in pull requests
- Report vulnerabilities privately (contact TBD)
FIGMAlink
MIT (or specify your chosen license)
Questions or feedback? Open an issue or reach out to the maintainers.