Whitepaper · Version 1.0

Territoria

Lock a token, claim a country, brand it, defend it, earn from it — a fully on-chain territory-conquest game where every mechanic is enforced by smart contracts, not by us.

1. What Territoria Is

Territoria is a fully on-chain territory-conquest game. The map has 180 real countries, each a claimable territory. Players lock $TORIA to plant a flag on a country, brand it with their own name, color, and logo, defend it during a protection window, and earn passive rewards for as long as they hold it — until someone else pays the price to take it from them.

There is no backend server and no database. Every balance, every territory's owner, every steal, and every reward is computed and stored entirely by smart contracts. Nothing shown on the map is decorative — every number, every war-log entry, every leaderboard position is read live from the chain.

The connection between "game" and "market" is deliberate: $TORIA is not pre-priced. It trades against a live bonding curve from the first transaction, meaning the token's price is a genuine market outcome, not a number we chose.

2. The Core Loop

  1. Get $TORIA — buy it from the bonding curve. Price rises as more is bought, falls as it's sold.
  2. Claim a territory — lock at least 500 $TORIA plus a small fixed ETH fee on any unclaimed country.
  3. Brand it — set a custom name, color, and logo. Your flag, visible to everyone who visits the map.
  4. Earn while you hold — your locked $TORIA is also a stake. Every override-burn anywhere on the map feeds a rewards pool shared by every active holder.
  5. Defend or lose it — a 6-hour protection window shields new owners; after that, anyone can pay to take the territory outright.

The loop has no end state. There is no "winning" the game — the war is designed to never stop.

3. The Map & Territories

180 real, named countries, each tracked as an independent on-chain record: current owner, amount locked, time claimed, and optional customization (empire name, color, logo link). Claiming or losing a territory always resets its customization — a new owner starts with a blank flag.

Logos are not stored on-chain as images — that would be prohibitively expensive. Instead, a territory stores a link to an image, the same pattern NFT metadata has always used. The link is rendered both on the map (as a small badge over the territory) and in the hover tooltip.

4. The Bonding Curve

$TORIA trades against a quadratic bonding curve:

price(x) = basePrice + curveSlopeK × x² / 1e18

where x is the number of tokens sold so far. Early buyers pay a much lower price than later ones, since the curve starts near zero and rises quadratically as supply is consumed.

Buying & Selling

Sending ETH to buy() returns $TORIA priced along the curve at that instant. Sending $TORIA to sell() does the exact symmetric inverse — no fee — and can be done any time before the curve graduates.

Both directions use a 100-step numerical approximation of the true price integral rather than an exact closed-form solution. This was a deliberate choice — it avoids on-chain cubic-equation solving, keeping the contract simple and auditable, at the cost of a small (~0.25%) residual pricing error, which the contract caps defensively so it can never revert a trade or lose funds.

5. Tokenomics

ParameterValue
Max supply1,000,000,000 $TORIA (fixed, only decreases via burns)
Bonding curve allocation950,000,000 (95%)
Treasury allocation50,000,000 (5%), no vesting
Steal fee split70% previous owner / 30% Treasury
Override-burn split50% burned / 40% Rewards Pool / 10% Treasury
Rapid-steal multiplier1.5× base, +10% per rapid steal, 2.0× cap, 1h cooldown
Protection window6 hours, 4 decaying tiers (40% → 30% → 20% → 10%)
Sell fee (curve phase)0% — fully symmetric with buying
Graduation thresholdFixed ETH amount, set at deployment based on prevailing ETH price

6. Protection & Combat

Claiming or stealing a territory starts a 6-hour protection window that decays in four tiers. During each tier, an attacker must first call overrideBurn() and pay that tier's percentage of the current steal price in $TORIA before they're even allowed to attempt a steal.

Time heldOverride cost
0 – 1.5h40% of steal price
1.5 – 3h30%
3 – 4.5h20%
4.5 – 6h10%
After 6hNo protection — steal directly

A steal itself costs 1.5× the current locked amount in $TORIA — 70% refunded to the previous owner, 30% to the Treasury. Stealing the same territory again within an hour raises the multiplier by 10% per repeat (capped at 2.0×), specifically to discourage wash-trading a territory back and forth between two wallets to farm activity.

7. Staking & Rewards

Locking $TORIA into a territory is also a stake. Every override-burn payment anywhere on the map splits 50% burned / 40% into a shared Rewards Pool / 10% Treasury. The pool distributes to every current territory holder automatically, weighted by how much each has locked — using an accumulator-based ("MasterChef-style") reward-per-share model, the same pattern used across most of DeFi for gas-efficient proportional distribution.

No action is required to start earning. Holding a territory is enough; rewards accrue continuously and can be checkpointed and claimed at any time.

8. Graduation & Uniswap V4

Once the bonding curve collects its fixed ETH threshold, it graduates: buy() and sell() stop working permanently. 10% of the collected ETH goes to the Treasury, and the remainder — plus the unsold $TORIA supply — is used to seed a real Uniswap V4 liquidity pool.

The pool is created and its liquidity is permanently locked by a dedicated contract (GraduationLP) with no function capable of withdrawing it — the lock is a property of the code, not a promise. This has been tested end-to-end on a live network: a real pool was created against Uniswap's actual deployed infrastructure, not a simulation (see Section 10).

9. Contracts & Architecture

ContractRole
TORIATokenFixed-supply ERC20, single initial mint split between curve and treasury
TreasuryVault for protocol fees, owner-withdrawable
BondingCurveBuy/sell pricing, graduation logic
TerritoryRegistryClaim state, locked amounts, customization
RewardsPoolProportional staking-reward accounting and claims
StealMechanismProtection windows, override-burns, steals
GraduationLPCreates and permanently locks the Uniswap V4 position

No proxy pattern and no upgrade path on the core game contracts — the rules deployed are the rules that run. Owner privileges are narrow and enumerated per contract (e.g. setting the Treasury address once, pausing where applicable); no owner function can seize a territory, alter a balance, or redirect locked funds.

10. What Is Verified

Claims in this paper that were actually tested, and how:

Why this matters: most of what goes wrong in DeFi goes wrong exactly where testing is skipped — price math, integration addresses, and liquidity-lock logic. All three were treated as first-class engineering problems here, not assumptions.

11. Status & Roadmap

ComponentState
Core contracts (7)Live on testnet
Bonding curve buy/sellLive on testnet
Claim / protect / stealLive on testnet
Staking rewardsLive on testnet
Uniswap V4 graduationTested live, real pool created
Mainnet deploymentIn preparation
Sell-fee hook (post-graduation)Not yet built
External security auditNot yet commissioned

12. Risks