Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AryaFund

A decentralized crowdfunding dApp built on the Stellar network. Anyone can create campaigns, collect XLM donations, and receive automatic refunds if goals are not met — all enforced by smart contracts with no middleman.


Screenshots

Test Output — 25 Tests Passing

Test output showing 25 tests passing All 25 unit tests passing covering all 17 exported contract functions

Home Page — Wallet Not Connected

Home page with no wallet connected The home page as seen by a first-time visitor with no wallet connected. Campaign cards are visible and browsable without needing to connect a wallet.

Home Page — Wallet Connection Modal

Wallet selection modal showing available wallet options Clicking the Connect Wallet button opens the Stellar Wallets Kit modal, showing all supported wallets — Freighter, Albedo, xBull, Rabet, and LOBSTR.

Home Page — Wallet Connected

Home page with wallet connected The home page after successfully connecting a wallet. The connected address is displayed in the top right corner.

Create Campaign Page

Empty campaign creation form The campaign creation form where organizers can set a title, description, funding goal, deadline, and extension days.

Campaign Page — Active

Campaign page showing active state A campaign that is active, goal has not been met and the deadline has not passed. The donate form is available and users can donate by typing the amount they want to donate.

Campaign Page — Goal Reached

Campaign page showing goal reached state A campaign that has reached 100% of its funding goal. The donate form is replaced with a Goal Reached message, and the organizer can now withdraw funds from their dashboard.

Campaign Page — Successful

Campaign page showing successful state A campaign that has reached 100% of its funding goal. The donate form is replaced with a Campaign Successful message, which means that funds have been withdrawn by the organizer.

Dashboard — No Campaigns

Dashboard page with no campaigns yet The organizer dashboard when the connected wallet has not yet created any campaigns.

Dashboard — With Campaigns

Dashboard page with one or more campaigns The organizer dashboard when the connected wallet has created one or more campaigns.

Admin Page — Wallet Disconnected

Admin page prompting the user to connect their wallet to access the admin panel The admin page when the user has not yet connected their wallet. It prompts the user to connect their wallet to access the admin panel.

Admin Page — Access Denied

Admin page showing access denied for non-owner wallet The admin page when accessed by a wallet that is not the platform owner. Access is restricted to protect platform settings.

Admin Page — Admin Panel

Admin page showing the admin panel for owner wallet The admin page when accessed by the platform owner's wallet. It shows the Platform Settings card - which shows the settings that the platform owner can update. It also shows the All Campaigns card - which shows all the campaigns on the platform.


How It Works

  1. Create a campaign with a goal, deadline, and optional extension days
  2. Donate XLM to any active campaign
  3. Goal met → organizer withdraws funds (2.5% platform fee deducted)
  4. Goal not met → campaign fails, donors claim full refunds automatically

The 70% Rule

If a campaign raises 70%+ but misses its deadline, the organizer gets a 7-day action window to either extend the deadline (one time) or mark the campaign as failed. If they do nothing, it auto-fails and donors can claim refunds.


Repository Structure

arya-fund/
├── contract/     # Soroban smart contract (Rust)
│   ├── contracts/
│   │   └── arya_fund/
│   │       ├── src/
│   │       │   ├── lib.rs      # 17 exported functions
│   │       │   └── test.rs     # 25 unit tests
│   │       └── Cargo.toml
│   ├── Cargo.toml
│   └── README.md
│
└── frontend/     # React frontend
    ├── src/
    │   ├── contract/       # Contract client and config
    │   ├── hooks/          # useWallet, useContract
    │   ├── utils/          # Formatting, time, stellar helpers
    │   ├── components/     # Reusable UI components
    │   └── pages/          # Home, Campaign, Create, Dashboard, Admin
    ├── package.json
    └── README.md

Contract

Property Value
Contract Address CD5LOATI5SDME7GQXRBVSZIG3DZL4NRYD4663GM7PLPY252L2RGPOFTL
Network Stellar Testnet
Platform Fee 2.5% on successful withdrawals
Action Window 7 days
Deploy TX 95478ead278154ae67b279cdce1492715f2e37079d5ed41253710dbc017e2ab6
Init TX 8e29274c189a60e436da4d2c8aa807a3472ecc7584ad69a6891286312b69e64b

Verified Contract Calls

Action Transaction
Create Campaign (1000 XLM goal) aed99ba9...
Donate 120 XLM ca0e0fd7...
Donate 500 XLM 970d73e8...
Donate 80 XLM 98020ff7...
Donate 300 XLM 27c954cd...
Update Fee to 2% 4586967e...
Update Action Window to 5 days 4f4691ed...

Tech Stack

Smart Contract

  • Rust + Soroban SDK
  • Stellar CLI v25.1.0
  • wasm32v1-none target

Frontend

  • React 19 + Vite
  • React Router v7
  • @stellar/stellar-sdk v14
  • @creit-tech/stellar-wallets-kit v2 (Freighter, Albedo, xBull, Rabet, LOBSTR)
  • CSS Modules

Getting Started

Run the Smart Contract

cd contract

# Build
stellar contract build

# Test
cargo test --manifest-path=contracts/arya_fund/Cargo.toml

See contract/README.md for full deployment instructions.

Run the Frontend

cd frontend

# Install
npm install

# Run locally
npm run dev

Opens at http://localhost:5173

See frontend/README.md for full setup details.


Features

  • Create trustless crowdfunding campaigns on Stellar
  • Donate XLM to any active campaign
  • Smart contract enforced refunds on failed campaigns
  • Organizer dashboard — withdraw, extend deadline, mark failed
  • Platform admin panel — fee, treasury, action window management
  • Multi-wallet support via Stellar Wallets Kit
  • Real-time countdown timers and progress bars
  • Transaction status feedback with Stellar Explorer links

Security Design

  • Funds held by contract, never by the organizer
  • Pull refunds — donors claim themselves, no double claiming possible
  • Platform owner and treasury are separate wallets
  • Every write function requires .require_auth() from the appropriate party
  • All funding rules enforced on-chain

Contributing

Contributions are welcome! Please read CONTRIBUTING.md before opening a pull request.

To report a bug or request a feature, open an issue.


Links

About

A decentralized crowdfunding dApp built on the Stellar network. Anyone can create campaigns, collect XLM donations, and receive automatic refunds if goals are not met — all enforced by smart contracts with no middleman.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages