EscrowCrowd is a decentralized, trustless crowdfunding and escrow platform built on the Stellar network using Soroban smart contracts. It guarantees that backer funds are held in transparent, automated escrow and only released to campaign creators when target funding goals are achieved before deadlines. If a campaign fails to reach its goal, backers are guaranteed refunds without intermediaries.
| Feature | Screenshot |
|---|---|
| Dashboard Interface | ![]() |
| Wallet Selection Options | ![]() |
| Connecting Wallet | ![]() |
| Transaction Signature Request | ![]() |
| Transaction Successful | ![]() |
- Smart Contract Escrow: Absolute trust. Backers' XLM is locked securely by Soroban until funding goals and deadlines are validated on-chain.
-
Inter-Contract Reputation Badges: Autonomous on-chain invocation awarding "Top Supporter" badges for contributions
$\ge 100\text{ XLM}$ . - Real-Time Blockchain Sync: Live activity feeds powered by Soroban RPC polling and ledger cursor tracking.
- Automated Refund Protection: Guaranteed refunds for unmet funding goals.
- Stellar Speed: Near-instant settlement and low transaction fees on Stellar Testnet.
- Modern Responsive UI: Glassmorphism, dynamic animations, mobile-first responsive stacking, and accessible touch targets down to 320px.
The system is built on two distinct, interlocking Soroban smart contracts operating on the Stellar Testnet:
-
CrowdfundContract (
CANOYAM53...7AYA): The core escrow vault. It securely locks contributed XLM, tracks deadline timestamps and goal thresholds, manages donor contribution ledgers, and enables creator withdrawals or automated refunds. -
RewardBadge Contract (
CAA3IZ7SV...WISD): An auxiliary on-chain badge/reputation contract. When a backer contributes$\ge 100\text{ XLM}$ , theCrowdfundContractdirectly performs an inter-contract invocation toaward_badge()in the donor's account.
ββββββββββββββββββββββββββββββββββββββββββ
β Backer / Donor β
ββββββββββββββββββββ¬ββββββββββββββββββββββ
β 1. donate(100 XLM)
βΌ
ββββββββββββββββββββββββββββββββββββββββββ
β CrowdfundContract β
β - Verifies active deadline β
β - Holds XLM in trustless escrow β
β - Updates contribution state β
ββββββββββββββββββββ¬ββββββββββββββββββββββ
β 2. Cross-contract call:
β award_badge(donor, tier=1)
βΌ
ββββββββββββββββββββββββββββββββββββββββββ
β RewardBadge Contract β
β - Mints "Top Supporter" Badge β
β - Emits badge awarded event β
ββββββββββββββββββββββββββββββββββββββββββ
Tradeoff Rationale: In
CrowdfundContract::donate(), the cross-contract call toRewardBadgeis wrapped usingenv.try_invoke_contract(). If the badge contract runs out of gas, is upgraded, or fails, the core donation does not roll back.Financial integrity is prioritized over ancillary gamification: a donor's financial pledge must succeed reliably even if non-critical reward metadata encounters transient issues.
This crowdfunding dApp serves as a concrete, production-ready implementation of the core trust-and-transparency escrow pattern designed for our larger Freelancer Escrow Network architecture. By enforcing decentralized escrow custody, multi-wallet authentication, and cross-contract event verification within Soroban, EscrowCrowd demonstrates the foundational building blocks required for milestone-gated freelance payments and decentralized reputation tracking on Stellar.
EscrowCrowd includes an integrated Contract Transparency Panel directly in the UI (available on both the Landing page and Dashboard):
- Live Ledger Sequence Pulse: Real-time synchronization displaying the latest Stellar Testnet ledger sequence via Soroban RPC.
- Direct Explorer Links: One-click navigation to verified contract addresses on Stellar Expert Explorer.
- Verified Transaction Proofs: Live links to the deployment transaction and on-chain cross-contract execution proofs.
- One-Click Address Copy: Instant clipboard copy with visual confirmation feedback.
| Contract / Action | Address / Transaction Hash | Explorer Link |
|---|---|---|
| Crowdfund Escrow Contract | CANOYAM53C5Q6DNECYVNIQAQN5VI4GMWRXPGQ6CDTHNZBWPBAJ3A7AYA |
View on Stellar Expert |
| RewardBadge Contract | CAA3IZ7SVURXJP5YNZL66BKGKXOJWSP2KRVUJDRXIECGR3KHDGA4WISD |
View on Stellar Expert |
| Deployment Transaction | 93e4b3b2fc78ef5bfd1bf4cd31364c0f1c1cf63cb3164767c9c547780957168a |
View Deployment Tx |
| Cross-Contract Proof Tx | 515e8f8f639c581bb97a67feae84a5dae0e5045935d45df19a01be6f5f8a1da5 |
View Cross-Contract Tx |
To solve the issue of contract upgradability and fragmentation, EscrowCrowd now uses a Factory Contract Pattern. Instead of users individually deploying contracts, the Factory maintains the latest, most secure WASM hash and deploys instances natively on-chain.
- Global Discovery: The Factory maintains a registry of all deployed campaigns and their metadata, allowing the frontend to dynamically list every active campaign.
- RewardBadge Hardening: The
RewardBadgecontract now enforces a caller allowlist. Only campaigns legitimately deployed and registered by the Factory are authorized to mint badges, elegantly closing a major security gap.
Currently, the frontend queries the Factory's registry array directly for discovery. As the platform scales, reading a growing list of thousands of contracts will become slow and hit contract read-size limits (even with pagination).
Future Work:
A production version of this platform will use an Indexer (like The Graph or Goldsky) to listen to the campaign_created events emitted by the Factory in real-time. This provides a fast, searchable GraphQL API for the frontend, ensuring the platform remains hyper-scalable. The current direct-polling architecture is sufficient for demo and early adoption scale.
-
Transaction State Machine & In-Flight Click Guard:
- Centralized state machine (
idleβpreparingβsigningβconfirmingβsuccess/error). -
isSubmittingclick-guard with guaranteedfinallyrelease block to prevent accidental double-signing while ensuring buttons never remain locked after a rejection.
- Centralized state machine (
-
Cursor-Based Event Pagination & Scoped Backoff:
- Event queries track
lastCheckedLedger + 1to eliminate duplicate event fetching. - Background polling applies exponential backoff on network failures (
$5\text{s} \to 10\text{s} \to 20\text{s} \to 30\text{s}$ ceiling) and resets immediately on recovery. - Financial transactions (
donate()) are never silently retried.
- Event queries track
-
Comprehensive Client-Side Validation:
- Rejects non-numeric, zero, or negative inputs with inline feedback.
- Real-time wallet balance validation disabling submission before any transaction is built.
-
Mobile Responsive Layout:
- Stacking order optimized for mobile: Donate Form placed at the top (
order-first md:order-none), 48px touch targets, mobile wallet pill, and responsive toasts down to 320px viewport width.
- Stacking order optimized for mobile: Donate Form placed at the top (
- Wallet Not Installed: Detects missing extensions (Freighter, Albedo, xBull) and renders an actionable installation banner.
- Connection Rejected: Catches user dismissal gracefully without crashing state and displays a non-blocking toast.
- Insufficient Balance: Compares donation input against active account balance in real-time, blocking submission with a clear explanation.
The repository includes a comprehensive GitHub Actions workflow (.github/workflows/ci.yml) validating every commit:
- Rust Toolchain: Pinned to
1.81.0withwasm32-unknown-unknowntarget. - Contract Compilation & Tests:
cargo build --target wasm32-unknown-unknown --releaseandcargo test(5 smart contract unit tests). - Frontend Quality Assurance:
oxlintlinting, Vitest unit test suite (6 frontend tests), and Vite production bundle compilation.
- Node.js (v18 or v20)
- Rust (v1.81.0 recommended) with
wasm32-unknown-unknowntarget:rustup target add wasm32-unknown-unknown
- A Stellar wallet extension (e.g. Freighter) set to Stellar Testnet.
- Testnet XLM funded via Stellar Friendbot.
git clone https://github.com/HarK-github/EscrowCrowd_App.git
cd EscrowCrowd_App
npm installCopy the example environment file:
cp .env.example .envEnsure .env contains the required testnet configurations:
VITE_CROWDFUND_CONTRACT_ID=CANOYAM53C5Q6DNECYVNIQAQN5VI4GMWRXPGQ6CDTHNZBWPBAJ3A7AYA
VITE_REWARD_BADGE_CONTRACT_ID=CAA3IZ7SVURXJP5YNZL66BKGKXOJWSP2KRVUJDRXIECGR3KHDGA4WISD
VITE_HORIZON_URL=https://horizon-testnet.stellar.org
VITE_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
VITE_STELLAR_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"npm run devNavigate to http://localhost:5173.
cd contracts
cargo testnpm run testnpm run lint
npm run buildThis project is licensed under the MIT License.





