// WHITEPAPER · v1.0

bitsLAND
technical paper.

bitsLAND is an NFT-only on-chain city builder on Ethereum mainnet. The system is three contracts (NFT, game state, policy) plus two pure libraries (layout, simulation). There is no ERC-20 token, no Uniswap hook, no external oracle.

Solidity 0.8.26 viaIR · Cancun ERC-721 fully on-chain SVG

02The NFT (BitsLand)

Minimal ERC-721 (no external dependencies). Total supply 10,000. Mint paths:

  • mintFree() — one per wallet, lifetime. Tracked by hasFreeMinted map.
  • mintPaid(qty) payable — 0.001 ETH per plot. ETH forwarded to treasury.
  • Wallet cap: 10 per address.
  • Founders: plots #1 through #200 are flagged on-chain.

The NFT stores six independent utility systems (described in section 04). All state is on-chain and rendered into the tokenURI as an animated SVG.

03The Game (BitsCore)

A 32x32 grid per plot. Up to 256 buildings from a catalog of 50 (residential, commercial, industrial, services, utilities, parks). Game actions:

  • register(plotId) — one-time, free. Initializes the plot at happiness 5000.
  • placeBuilding(plotId, x, y, id) payable — gated by Level (T2 at L5, T3 at L10, T4 at L15, Pixelmid at L25). Validates footprint, road adjacency, power requirement. Costs ETH by tier (0.00002 to 0.001).
  • demolish(plotId, idx) — free. Clears footprint.
  • repair(plotId, idx) payable — 50% of placement cost. Required for damaged buildings to count toward happiness/population.
  • tick(plotId) — free. Recomputes happiness/population, rolls disaster RNG, awards 10 XP.

All paid actions route ETH to treasury and call BitsLand.addPrestige(plotId, weiAmount) to bookkeep the same amount as permanent Prestige on the NFT.

04NFT Utility Systems

A. Genesis traits — rolled once at mint from keccak256(plotId, blockhash, minter, prevrandao), packed into a single bytes32:

  • Climate: 0..5 (Temperate, Desert, Polar, Tropical, Volcanic, Cyber) — happiness modifier of plus or minus 5% to 20%.
  • Terrain: 0..5 (Flat, Hilly, Coastal, Forest, Wasteland, Floating) — visual + bonus on matched building tier.
  • Aura: 0..7 (Order, Chaos, Trade, War, Faith, Tech, Wild, Void) — 25% discount on matching building category.
  • Generation: 1 (#1..1000) / 2 (#1001..5000) / 3 (#5001..10000).
  • Founder: plots 1..200 only. Permanent plus 5% happiness multiplier.

B. Level + XPlevelOf(plotId) = floor(sqrt(xp / 50)). XP grants: tick +10, place +(5 times tier), repair +3, demolish +1.

C. Prestige — cumulative ETH paid through gameplay, stored as uint128 wei. Tier thresholds: Bronze 0.001, Silver 0.01, Gold 0.05, Diamond 0.1, Mythic 0.5. Each tier paints a brighter border in the rendered SVG and adds to the happiness multiplier.

D. Achievements — 32-bit on-chain bitmap. Set by BitsCore on milestones. Each one unlocks visibly as a star in the SVG. Major achievements: First Spark, Skyline (10 buildings), Metropolis (30), Survivor (3 disasters), Saint (10 repairs), Tycoon (pop 2000+), Megacity (5000+), Optimist (happy 8000+), Scholar/Sage/Master (levels 10/25/50), Pixelmid placed.

E. Naming + mottosetName(plotId, n) once per 7 days (50,400 blocks), setMotto(plotId, m) once per 30 days. Stored as ASCII strings, validated for length and printability. Both render in the JSON metadata and as a strip across the SVG.

F. Visitor stamps — any wallet that already owns a plot can call visit(plotId) once per target plot. Sybil-resistant (visitor must hold a plot themselves). Increments visitCount[plotId].

05On-chain Rendering

tokenURI(plotId) returns a base64-encoded JSON whose image field is a base64-encoded animated SVG. The SVG composes nine layers, all rendered from on-chain state:

  1. Sky gradient — day/night cycle animation, 60-second loop, colors derived from Climate.
  2. Sun/moonanimateMotion across the top of the canvas.
  3. Ground — colors derived from Terrain (grass / dirt / water / wasteland / floating).
  4. Terrain features — coastal shimmer line, forest pixels, drifting clouds.
  5. Climate overlay — animated weather: sand drift (Desert), snowfall (Polar), rain (Tropical), volcanic ash (Volcanic), neon glow (Cyber).
  6. Building silhouette — 4..36 procedurally-positioned buildings, colored by population tier (wood / brick / stone / steel / neon), with blinking windows.
  7. Founder border — yellow marquee tape with "// FOUNDER //" text, if the plot is a Founder.
  8. Prestige ring — outer border at the Prestige tier color, pulsing opacity.
  9. Aura glyph — rotating shape in top-right corner.
  10. Level badge + name strip + achievement stars — bottom row.

06Determinism

MoodBitsSimulation.moodOfDay(block.number / 7200). Every plot sees the same mood on the same day. Distribution: 7% Recession, 18% Stagnant, 40% Stable, 25% Growing, 10% Boom. Mood is applied as a happiness modifier (minus 10% to plus 12%).

DisastersBitsSimulation.rollDisaster(seed, elapsed, happiness, count, baseRiskBps). Seed is blockhash xor prevrandao xor plotId xor lastTickBlock. Risk scales with elapsed blocks and inverse happiness; max 50% per tick.

07Treasury

Single payable address, settable by deployer. Receives 100% of mint ETH and 100% of action ETH. Does not hold game state. The same ETH amount is also recorded as Prestige on the NFT (bookkeeping only, no double-spend).

The whole system is two reads and one write. The game reads your NFT, computes the new state, and writes XP, Prestige, and achievement flags straight back. There is no path where ETH leaves your wallet without crediting the NFT.