StellarUrithi-Bidz is an open-source, on-chain auction protocol purpose-built for African art and cultural artifacts. Whether digital (NFTs) or physical (custodian-attested), every item is auctioned transparently on Stellar with escrowed bids and automatic royalty distribution.
- Three Auction Formats: English (ascending), Dutch (descending), and Sealed-Bid (commit-reveal)
- On-Chain Escrow: All bids are locked in the contract until auction resolution β trustless and transparent
- Automatic Royalties: Original creators receive their royalty on every hammer sale β no manual intervention
- Physical-Item Bridge: Custodians/galleries attest to physical item possession before an auction opens
- Real-Time Updates: WebSocket-powered live bid feed and auction state changes
- Low Fees: Settled on Stellar for sub-second, near-zero-fee finality
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND (Next.js 14) β
β ββββββββββββ ββββββββββββ βββββββββββββ βββββββββββββββββ β
β β Auctions β β Create β β My Bids β β Admin Panel β β
β ββββββββββββ ββββββββββββ βββββββββββββ βββββββββββββββββ β
β β Freighter Wallet β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β BACKEND INDEXER (Node.js) β
β ββββββββββββββββ ββββββββββββββββ βββββββββββββββββββββββ β
β β Event Indexerβ β WebSocket β β REST API β β
β β (Soroban RPC)β β (Socket.IO) β β (Express) β β
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ ββββββββββββ¬βββββββββββ β
β β β β β
β βββββββββββββββββββ΄βββββββββββββββββββββββ β
β β PostgreSQL β
βββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββ
β STELLAR SOROBAN β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β UrithiAuction Contract β β
β β ββββββββββββ ββββββββββββ ββββββββββββββ βββββββββββ β β
β β β English β β Dutch β β Sealed-Bid β β Escrow β β β
β β β Module β β Module β β Module β β Module β β β
β β ββββββββββββ ββββββββββββ ββββββββββββββ βββββββββββ β β
β β ββββββββββββββββ β β
β β βRoyalty Split β β β
β β β Module β β β
β β ββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CUSTODIAN PORTAL (Next.js) β
β Physical-item attestation β upload IPFS docs, verify possession β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
StellarUrithi-Bidz/
βββ contracts/ # Soroban Smart Contracts (Rust)
β βββ Cargo.toml # Workspace root
β βββ auction/
β βββ Cargo.toml
β βββ src/
β βββ lib.rs # Contract entry point
β βββ types.rs # Data structures & enums
β βββ english.rs # English auction logic
β βββ dutch.rs # Dutch auction logic
β βββ sealed_bid.rs # Sealed-bid logic
β βββ escrow.rs # Fund locking & refunds
β βββ royalty.rs # Royalty calculation & distribution
β βββ events.rs # Event emission helpers
β βββ test.rs # Comprehensive test suite
β
βββ backend/ # Indexer & API Server
β βββ package.json
β βββ tsconfig.json
β βββ src/
β βββ index.ts # Main entry point
β βββ db/
β β βββ index.ts # PostgreSQL connection & queries
β βββ indexer/
β β βββ event_indexer.ts # Stellar event poller
β βββ ws/
β β βββ socket_server.ts # WebSocket manager
β βββ routes/
β β βββ auctions.ts # REST API endpoints
β βββ services/
β βββ logger.ts # Winston logger
β
βββ frontend/ # Main Web Application
β βββ package.json
β βββ next.config.js
β βββ tailwind.config.ts
β βββ tsconfig.json
β βββ src/
β βββ app/
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home β auction listings
β β βββ globals.css # Global styles
β β βββ auctions/[id]/ # Auction detail page
β β βββ create/ # Create auction page
β β βββ my-bids/ # Bid history page
β β βββ admin/ # Admin panel
β βββ components/
β β βββ auction/
β β β βββ AuctionCard.tsx
β β βββ layout/
β β βββ Navbar.tsx
β β βββ Footer.tsx
β βββ hooks/
β β βββ useWebSocket.ts # Real-time update hooks
β βββ lib/
β β βββ api.ts # Backend API client
β β βββ stellar.ts # Stellar/Soroban helpers
β βββ providers/
β βββ wallet.tsx # Freighter wallet provider
β
βββ custodian-portal/ # Custodian Admin App
β βββ package.json
β βββ src/
β βββ app/
β βββ layout.tsx
β βββ globals.css
β βββ page.tsx # Attestation dashboard
β
βββ README.md
- Docker & Docker Compose (for one-command local dev)
- Rust (1.75+) with
wasm32-unknown-unknowntarget (for contracts) - Soroban CLI (>= 22.0.0):
cargo install soroban-cli - jq (JSON processor):
brew install jqorapt install jq - Node.js 18+ (if running services directly)
- Freighter Wallet browser extension
- Pinata account (for IPFS storage)
One command starts the full stack β PostgreSQL, backend, frontend, and custodian portal:
# Start all services
docker compose up --build
# Start in detached mode
docker compose up --build -d
# View logs
docker compose logs -f
# Stop everything
docker compose down
# Stop and remove volumes (resets database)
docker compose down -vAfter startup:
- Frontend: http://localhost:3000
- Custodian Portal: http://localhost:3001
- Backend API: http://localhost:4000/api/health
- PostgreSQL: localhost:5432 (user:
postgres, password:postgres, db:stellar_urithi_bidz)
Note: Set
CONTRACT_IDandPINATA_JWTin a.envfile (or export them) before starting. The compose file reads them via${CONTRACT_ID}and${PINATA_JWT}.
# Interactive deployment wizard β guides you through everything
./deploy.sh
# Or use the Makefile directly
make allBoth will: check prerequisites β build β test β deploy to testnet β initialize β verify.
cd contracts
# Build contracts
make build-release
# Run tests
make test
# Generate identity & fund (testnet)
make keys # generates 'alice' identity
make fund # funds via Friendbot
# Optimize WASM
make optimize
# Deploy to Stellar testnet
make deploy-testnet
# Initialize the contract
make initialize
# Verify deployment
make verify| Target | Description |
|---|---|
make help |
Show all targets and variables |
make build |
Compile debug |
make build-release |
Compile release (optimized) |
make test |
Run all tests |
make test-verbose |
Run tests with full output |
make optimize |
Strip & optimize WASM |
make keys |
Generate testnet identity |
make fund |
Fund via Friendbot |
make deploy-testnet |
Deploy to testnet |
make deploy-mainnet |
Deploy to mainnet |
make initialize |
Initialize contract on-chain |
make verify |
Query contract state |
make verify-events |
Check emitted events |
make demo |
Run end-to-end demo |
make lint |
Clippy lint |
make fmt |
Format code |
make clean |
Remove build artifacts |
make all |
Full pipeline |
cd backend
# Install dependencies
npm install
# Set environment variables
cp .env.example .env
# Edit .env with your Postgres credentials and contract ID
# Start the indexer and API server
npm run devcd frontend
# Install dependencies
npm install
# Set environment variables
cp .env.example .env.local
# Start the development server
npm run devVisit http://localhost:3000 β connect your Freighter wallet and start bidding!
cd custodian-portal
npm install
npm run devVisit http://localhost:3001
PORT=4000
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=stellar_urithi_bidz
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
STELLAR_RPC_URL=https://soroban-testnet.stellar.org
CONTRACT_ID=<deployed_contract_address>
FRONTEND_URL=http://localhost:3000NEXT_PUBLIC_CONTRACT_ID=<deployed_contract_address>
NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_API_URL=http://localhost:4000
NEXT_PUBLIC_WS_URL=http://localhost:4000
NEXT_PUBLIC_PINATA_GATEWAY=https://gateway.pinata.cloud| Format | How It Works | Best For |
|---|---|---|
| English | Ascending bids. Highest bidder wins when timer expires. | Popular, well-known format. |
| Dutch | Price drops over time. First to "buy now" wins instantly. | Quick sales, price discovery. |
| Sealed-Bid | Bids are hidden (commit-reveal). Highest valid bid revealed at close. | High-value items, privacy-sensitive. |
Every hammer sale automatically distributes proceeds:
Winning Bid (100%)
βββ Seller receives (net after fees)
βββ Creator royalty (royalty_bps / 10000 Γ bid)
βββ Platform fee (platform_fee_bps / 10000 Γ bid)
Example: 1000 XLM bid with 5% royalty (500 bps) and 2.5% platform fee (250 bps):
- Seller: 925 XLM
- Creator: 50 XLM
- Platform: 25 XLM
For physical artifacts, the flow includes a custodian attestation step:
- Seller lists item with
item_type: Physicaland assigns a custodian address - Custodian inspects the physical item, uploads documentation (photos, condition report) to IPFS
- Custodian calls
attest_physical_itemon the contract with the IPFS hash - Auction activates β bidding begins
This ensures physical items are verified by a trusted third party before funds are committed.
MIT Β© StellarUrithi-Bidz Contributors
Built with β€οΈ for African art and culture. Powered by Stellar.