> For the complete documentation index, see [llms.txt](https://astrobase.gitbook.io/astrobase-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://astrobase.gitbook.io/astrobase-docs/astrobase.md).

# AstroBase

### 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.Why AstroBase?

* 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

Every 7 days, the jackpot is distributed automatically:

* 🥇 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: The weekly podium and scores reset after each distribution, but all-time records are preserved.

***

### 3. Smart Contracts

#### Deployed Addresses

| Network                | Contract Address                                                                                                              | Status     |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------- |
| Base Sepolia (Testnet) | [0x9559fA7870d8356411ED80D123eAAA7B9fA8f032](https://sepolia.basescan.org/address/0x9559fA7870d8356411ED80D123eAAA7B9fA8f032) | ✅ Verified |
| Base (Mainnet)         | [0xf80fa867530Ed4deB895DC090Ec9480a595feB59](https://basescan.org/address/0xf80fa867530Ed4deB895DC090Ec9480a595feB59)         | ✅ Verified |

🔍 Open Source: All contracts are publicly verified on BaseScan for complete transparency.

#### 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 game sessions with expiration
* ✅ Dual Scoring – Separate 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 enabled
* Signature Validation: ECDSA cryptographic signatures

#### Infrastructure

* Deployment: Vercel (Edge Network)
* Backend: Secure server for score signing
* Storage: Private keys stored securely in environment variables (never exposed)

***

### 5. Security & Transparency

#### Smart Contract Security

✅ Audited Code: Open-source contracts verified on BaseScan

✅ Battle-Tested Libraries: Uses OpenZeppelin's security standards

✅ Protected Functions: ReentrancyGuard on all financial operations

✅ Signature Validation: Only server-signed scores are accepted

✅ Nonce Protection: Each score submission uses a unique nonce

✅ Session Expiration: Time-limited game sessions prevent abuse

#### Operational Security

✅ Private Key Management: All sensitive keys stored in .env (never committed to Git)

✅ Environment Separation: Separate testnet and mainnet configurations

✅ Emergency Controls: Owner can pause contract in case of emergency

✅ Transparent Distribution: All prize payouts are publicly verifiable onchain

#### Player Protection

* Fair Play: Server-side signature validation prevents score manipulation
* Transparent Odds: All game logic and prize distribution is visible in the verified contract
* No Hidden Fees: Entry fee and distribution percentages are clearly defined
* Verifiable Randomness: No hidden RNG – pure skill-based gameplay

🔒 Security is our priority. We follow industry best practices and maintain complete transparency.

***

### 6. Long-Term Vision

AstroBase is more than a single game – it's the foundation of an evolving onchain gaming ecosystem, guided by our community.

#### Planned Features

🎨 Spaceship NFTs

* Unique visual collections with multiple skins
* Rarity tiers (Common, Rare, Epic, Legendary)
* Potential gameplay boosts and perks
* Tradeable on secondary markets

🪐 Expanded AstroBase Universe

* New interconnected mini-games (races, fleet battles, missions)
* Shared economy and cross-game progression
* Seasonal events and limited-time challenges

🗳️ Community Governance

* Player voting on new features
* Adjustable prize distribution based on feedback
* Community-proposed game modes
* Transparent roadmap evolution

🏆 Competitive Seasons

* Monthly tournaments with special prizes
* Seasonal leaderboards and achievements
* Exclusive rewards for top performers

***

### 7. Community & Governance

#### Our Philosophy

Nothing is set in stone. We believe in building with the community, not just for it.

* Active Listening: Pricing, reward splits, and gameplay mechanics can evolve
* Transparent Development: Open-source code, public roadmap, regular updates
* Community-Driven: Major decisions will involve player input
* Fair Evolution: Changes are announced in advance and explained clearly

#### Transparency Principles

✅ All smart contracts are open-source and verified✅ Prize distributions are publicly auditable onchain✅ Development updates shared regularly on Twitter and Telegram✅ Community feedback actively shapes the product roadmap

***

### 8. Quick Links

#### Play & Connect

* 🎮 Play AstroBase – [Start playing now](https://astrobase.games/fr)
* 🐦 Twitter – [Follow for updates](https://x.com/AstroBase_)
* 💬 Telegram – [Join the community](https://t.me/+lse_BRZX4kNjODE8)
* 💬 Discord → Coming soon

#### Developer Resources

* 📄 GitHub Repository – Coming soon
* 📖 Technical Documentation – Coming soon
* 🛠️ API Documentation – Coming soon

***

### 9. FAQ

Q: How much does it cost to play?

A: 0.00005 ETH per game session (\~$0.20). This gives you 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! AstroBase is optimized for both desktop and mobile browsers.

Q: Is the game fair?

A: Absolutely. All scores are cryptographically signed and validated. The smart contract is open-source and verified.

Q: What happens to my all-time score?

A: Your all-time best score is preserved forever onchain, even after weekly resets.

Q: Can I withdraw if I change my mind?

A: Entry fees go directly into the prize pool and cannot be withdrawn. Only play what you're comfortable risking.

***

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

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://astrobase.gitbook.io/astrobase-docs/astrobase.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
