AstroBase Documentation

Built with ❤️ on Base – Where skill meets onchain rewards

1. Introduction

What is AstroBase? AstroBase is a competitive 3D onchain game built natively on Base, where players pilot a spaceship through space, dodging obstacles while aiming for the highest score. Each game session costs a small entry fee (0.00005 ETH ≈ $0.20), and the weekly prize pool is distributed among the top 3 players on the podium.

Fast-paced arcade gameplay – Instant action, pure skill
Competitive weekly rewards – Real prizes for top performers
100% onchain – Transparent, verifiable, and secure
Accessible everywhere – Play on desktop and mobile
Dual leaderboards – Weekly podium + all-time records

2. How to Play

Game Mechanics

  • Objective: Navigate your spaceship, avoid obstacles, and achieve the highest score
  • Entry Fee: 0.00005 ETH per game session (~$0.20 at current rates)
  • Session Duration: 1 hour of active gameplay per payment

Scoring System

  • Weekly Score: Resets every week for podium competition
  • All-Time Score: Your personal best, preserved forever onchain

Weekly Prize Distribution

  • 🥇 1st place → 40% of the jackpot
  • 🥈 2nd place → 25% of the jackpot
  • 🥉 3rd place → 15% of the jackpot
  • 🔧 Server/Owner → 10% (maintenance & development)
  • 💎 Remaining → 10% stays in the contract for next week

Reset: Weekly podium and scores reset after each distribution; all-time records remain.

3. Smart Contracts

Deployed Addresses

NetworkContract AddressStatus
Base Sepolia (Testnet)0x9559fA7870d8356411ED80D123eAAA7B9fA8f032✅ Verified
Base (Mainnet)0xf80fa867530Ed4deB895DC090Ec9480a595feB59✅ Verified

Open Source: Contracts are publicly verified on BaseScan.

Contract Features

ReentrancyGuard – Protection against reentrancy attacks
Pausable – Emergency pause functionality (owner only)
ECDSA Signatures – Server-signed scores prevent cheating
Nonce System – Prevents replay attacks
Session Management – Time-limited sessions with expiration
Dual Scoring – Weekly and all-time leaderboards

4. Technology Stack

Frontend & Game Engine

  • Framework: Next.js 15.5.3 (React 19.1.0)
  • 3D Graphics: Three.js via React Three Fiber
  • Animations: Motion 12.23.22
  • UI/UX: Modern, responsive design optimized for desktop and mobile

Blockchain & Web3

  • Layer 2: Base (Ethereum L2) – Fast, low-cost transactions
  • Web3 Library: wagmi v2.17.2 + viem v2.37.8
  • Smart Contract: Solidity 0.8.17 with optimizations
  • Signature Validation: ECDSA cryptographic signatures

Infrastructure

  • Deployment: Vercel (Edge Network)
  • Backend: Secure server for score signing
  • Storage: Private keys secured in environment variables

5. Security & Transparency

Smart Contract Security

  • Audited/verified code on BaseScan
  • OpenZeppelin security standards
  • ReentrancyGuard for financial operations
  • ECDSA signature validation
  • Nonce protection against replay
  • Session expiration to prevent abuse

Operational Security

  • Private key management in .env
  • Separate testnet/mainnet configs
  • Emergency pause controls
  • Onchain, transparent prize distribution

Player Protection

  • Fair Play: Server-side signatures prevent score manipulation
  • Transparent Odds: Verified contract logic and distribution
  • No Hidden Fees: Entry fee and splits are explicit
  • Verifiable Randomness: Pure skill-based gameplay (no hidden RNG)

6. Long-Term Vision

Planned Features

Spaceship NFTs: skins, rarity tiers, potential boosts
Expanded universe: new mini-games, shared economy
Community governance: voting, adjustable distributions
Competitive seasons: monthly tournaments, achievements

7. Community & Governance

Nothing is set in stone. We build with the community. Pricing, reward splits, and mechanics can evolve. Open-source code, public roadmap, and regular updates.

  • Open-source and verified contracts
  • Onchain-auditable prize distributions
  • Regular updates on Twitter and Telegram
  • Community feedback shapes the roadmap

8. Quick Links

9. FAQ

Q: How much does it cost to play?
A: 0.00005 ETH per session (~$0.20) for 1 hour of gameplay.
Q: When is the jackpot distributed?
A: Every 7 days, automatically via smart contract.
Q: Can I play on mobile?
A: Yes, optimized for desktop and mobile browsers.
Q: Is the game fair?
A: Yes. Scores are cryptographically signed and validated. Contracts are verified.
Q: What happens to my all-time score?
A: Your best all-time score stays onchain forever.
Q: Can I withdraw if I change my mind?
A: Entry fees fund the prize pool and aren't withdrawable.
AstroBase