Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geometry

A strategic raid game built on the Stellar blockchain where players stake crypto, build armies, and battle other players for rewards.

What is Geometry?

Geometry is a gamified DeFi experience. You deposit crypto (Soul Shards) into your vault, recruit heroes, upgrade your base defenses, and raid other players. Win battles to steal their Soul Shards. Lose and they take yours.

The twist: everything runs on Stellar. Your deposits, battles, and rewards are all on-chain.

How It Works

Deposit & Defend

  • Connect your Freighter wallet
  • Deposit Soul Shards (in-game currency)
  • Build defensive towers and walls
  • Your vault earns yield while you're away

Recruit & Train

  • Start with 3 free heroes: Archer, Knight, Sells Sword
  • Unlock more heroes with Soul Shards or XLM
  • Level up heroes to increase attack power
  • Each hero has unique stats and abilities

Attack & Raid

  • You get 4 attacks that regenerate over time (1 per minute)
  • Scout enemy bases to see their defenses
  • Pick your battle squad
  • Win = steal a portion of their vault
  • The game takes a 10% cut, winner gets 90%

Climb the Ranks

  • Win battles to earn trophies
  • Leaderboard shows top raiders
  • Higher rank = better rewards

Quick Start

  1. Clone this repo
  2. Set up environment variables (see DEVELOPMENT.md)
  3. Run backend: cd backend && npm install && npm run dev
  4. Run frontend: cd frontend && npm install && npm run dev
  5. Open http://localhost:5173
  6. Connect Freighter wallet and play

Tech Stack

  • Frontend: React, TypeScript, Vite, TailwindCSS
  • Backend: Node.js, Express, MongoDB
  • Blockchain: Stellar (testnet), Soroban smart contracts
  • Wallet: Freighter browser extension

Project Structure

├── backend/          # Express API server
│   ├── models/       # MongoDB schemas
│   ├── routes/       # API endpoints
│   ├── services/     # Battle logic, vault management
│   └── middleware/   # Auth, validation
├── frontend/         # React app
│   ├── src/
│   │   ├── components/   # UI components
│   │   ├── pages/        # Login, Register
│   │   └── services/     # API calls, battle logic
├── contracts/        # Soroban smart contracts (Rust)
│   ├── citadel_protocol/
│   ├── citadel_vault/
│   └── yield_engine/

Game Mechanics

Battle Formula

  • Win probability uses a sigmoid function based on attack vs defense power
  • Attacker with higher stats has better odds, but nothing is guaranteed
  • Underdog wins are always possible

Attack Regeneration

  • Max 4 attacks stored
  • 1 attack regenerates every 60 seconds
  • Can buy extra attacks for 50 Soul Shards each

Vault System

  • Deposit Soul Shards to your vault
  • Vault earns passive yield
  • But it's also what enemies can steal
  • Smart players balance offense and defense

License

MIT

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages