Jul 16, 2026

Dark Forest: Fully On-Chain 3D MMO SLG — Every Rule Is in the Contract

Dark Forest: Fully On-Chain 3D MMO SLG — Every Rule Is in the Contract

Most "blockchain games" are Web2 frontends with a token contract on top. Real game logic runs on centralized servers — no different from traditional games.

Dark Forest is different.

10 Solidity contracts (all <24KB, EVM L1 compatible) carry the complete game logic: 3D coordinate space, fog of war enforced by distance and energy, five tech trees with no level cap and N² quadratic growth, a player-driven energy order book market, alliance totem system, daily token distribution (unclaimed = burned), and an AI Agent automation framework.

All state is on-chain. All rules are in the contract. Nobody can change them.

✅ LIVE on BSC Mainnet — 10 contracts verified on BscScan, source code publicly available.

Distance Is the Only Fog of War

All civilization coordinates are public on-chain. Anyone can call getCivilization(address) to read any player's exact 3D position.

Three contract-enforced constraints make the dark forest law work:

Distance gate — You can only attack what your radar can see. The contract rejects attacks beyond scan range.

Token bucket rate limiter — Attack frequency is hard-capped. Lv.1 weapon: ~3s between attacks. Lv.100: ~1s. You cannot stand and spam attacks.

Energy cost — Each attack costs 50,000 + 50,000 × weaponLv energy. Lv.1 costs 100k. Lv.10 costs 550k. You fire a few shots and must retreat to resupply.

Public coordinates do not mean you can do anything about them.

Five Tech Trees — N² Growth, No Level Cap

All systems have no level cap, using N² quadratic growth. Upgrade costs use the Anchor Formula — simulating locking DFT for N days equivalent.

Energy Collector: 3 + 10√(L-1) energy/sec, 1× cost. Your economic lifeline. Weapon System: 900 + 10L² attack power, 4× cost. Exponential destructive power. Shield System: HP 3,600 + 15L², Defense 540 + 6L², Regen 50 + L²/sec, 4× cost. Survival core. Radar System: 1,000 + 150L + 5L² light-seconds, 8× cost. See farther, fight farther. Engine System: 10 + 5(L-1) light-seconds/hour, 16× cost. Most expensive, fastest.

Key levels: Lv.1 → Lv.10 → Lv.50 → Lv.100 Weapon: 910 → 1,900 → 25,900 → 100,900 attack Shield: 3,615 → 5,100 → 41,100 → 153,600 HP Radar: 1,155 → 3,000 → 56,500 → 66,000 ls range Engine: 10 → 55 → 255 → 505 ls/h speed

A single Lv.100 weapon shot deals 40,560 shield damage + 80,720 health damage = 121,280 total. Enough to one-shot anyone below Lv.100 shields.

Combat System — Real On-Chain Math

Attack Power = 900 + 10 × weaponLv² Defense Power = 540 + 6 × shieldLv² + alliance bonus Shield Damage = max(0, atk + 200 - def) Health Damage = atk > def ? (atk - def) × 2 : 0 Overflow = shield breach overflow × 3 (deadly!) Plunder = defender.energy × (5% + 0.5% × weaponLv)

When health hits zero: lose one random system level. If all already Lv.1 — civilization becomes ruins. Attacker takes all remaining energy. System downgrade compensates defender with 5% of upgrade cost.

This creates a dynamic food chain: top players periodically plunder lower-level civs like sheep farming.

Rebirth System — Death Makes You Stronger

Being destroyed is not the end. Rebuild from ruins — every death makes your next life stronger.

Energy: 500,000 × (1 + 0.12 × rebirthCount), capped at 20× DFT: 100 + 10 × rebirthCount, capped at 2,000 DFT

Retained on rebirth: coordinate location, permanent +12% attack AND defense per rebirth, stackable 3× (max +36%). Systems reset to Lv.1. Health restored to 50%.

Veterans with 3 deaths become +36% monsters. True roguelite progression on-chain.

Energy Economy

Energy is the ultimate resource. Not purchased — generated by time.

Collection rate = (3 + 10√(L-1)) × (1 + 0.002 × referrals) energy/sec. Generates even while offline.

Maintenance cost: every action deducts totalLevel × 2,000 × timePassed / 1 day. The bigger you are, the faster you burn. Don't fight and you starve. Fight and you may die.

DFT Token — Claim or Burn

Total supply: 420,690,000,000,000 (hard cap). Emission: 3,650 days (~10 years). Daily: ~1,152,575,342 DFT. Trading tax: 2.5% (1% dev + 1.5% marketing).

Every day at UTC 0: previous unclaimed DFT is burned, active civilizations counted, each player can claim dailyEmission / playerCount. If you forget to claim, your DFT is gone forever.

Energy Market — Real Order Book

Fully on-chain limit order book via EnergyMarket.sol. Sellers lock energy, buyers pay DFT. 1% protocol fee. 3-second anti-sniping delay.

War drives energy prices up. Peace brings them down. Pure player-driven price discovery.

Alliance & Totem

Max 100 members. Leave penalty: 100 + 10 × memberCount DFT. 24-hour cooldown.

Totem provides defense bonus: (members - 1) × 8 × (1 + 0.005 × totemLevel). Build cost: 20,000,000 × N × (N+5) / 10 energy. Members donate every 48h or lose bonus.

AI Agent System — Program Your Civilization

Native AI Agent automation via DarkForestAgentRegistry. Permission bitmasks: collect(1), repair(2), claim(4), attack(32), upgrade(64), jump(128), rebuild(256), donate(512).

Contract-level limits: max attacks/hour, max upgrades/day, max upgrade cost, attack whitelist/blacklist. Deploy automated warriors with safety fences.

Python SDK with 4 strategy templates: aggressive (45 attacks/h), balanced (15), defensive (5), farmer (0).

Space Jump — DFT Burn

Jump to random coordinates. Costs DFT — directly burned from circulation. Tracking jump (Radar Lv.20+) lets you jump directly to any player.

An Autonomous World, Not Just a Game

No admin: owner renounced. No downtime: as long as BSC runs, the game runs. No hidden rules: every formula verifiable. No pay-to-win: time is the only currency.

How long can your civilization survive in the dark forest?

Website: darkforest.uk GitHub: github.com/RabbitChaindevs/Dark-Forest