uniCRAFT a sandbox game with a self-funding token economy.
A complete technical and economic description of the game, the $uCRAFT token, and the Uniswap v4 hook that ties them together.
01Abstract
uniCRAFT is a browser sandbox game in which the act of mining ore, defeating mobs, and unlocking achievements credits players an off-chain $uCRAFT balance that can later be claimed on-chain through an ERC20 contract. The token trades against ETH inside a Uniswap v4 pool, and a custom hook attached to that pool charges 30 basis points on every swap. Sixty percent of the collected fee is routed back to the player rewards escrow and forty percent is permanently burned, giving the economy a structural deflationary tilt while continuously refilling the pool that pays players for in-game activity.
Total supply is capped at one billion $uCRAFT and is split at deployment as 80 percent into the liquidity pool and 20 percent into the rewards escrow. The full LP allocation is locked at launch, there is no team allocation, and there is no future mint path. The game itself is a fully playable sandbox, with survival and creative modes, mob AI, biomes, crafting, and persistent saves, so the experience holds up even if the on-chain layer is removed.
02Vision
The bestselling block sandbox in history sold three hundred million copies without ever shipping a single token, NFT, or chain integration. That sets a useful bar for any project trying to combine sandbox gameplay with crypto incentives, namely that the game has to be worth playing on its own merits before any token mechanics get added on top.
uniCRAFT is built on three convictions that run through the rest of this paper:
- The game has to be enjoyable without the token. If the on-chain layer disappeared, players should still want to keep playing. If they would not, the project is a faucet rather than a game.
- The reward economy has to be self-funding. Token emissions paid out of fixed treasury balances always run dry eventually, so the rewards pool needs an ongoing income source rather than a one-time allocation.
- The cap table should fit on a postcard. The simpler the allocations, the harder it is to extract value through governance changes, vesting unlocks, or unannounced mints.
03The play-to-earn problem
Most play-to-earn projects from the 2021 to 2024 cycle followed a recognizable pattern. A token launched with a multi-billion fully-diluted valuation, daily emissions were paid out of a team-controlled bucket, gameplay was thin and primarily designed to drive token velocity, and the eventual collapse arrived within months of launch. The failure modes were almost always the same.
Tokens were minted out of nowhere to reward players. With no offsetting demand, the price of those tokens fell faster than rewards could compensate, so net player earnings turned negative even before the on-chain emission bucket was empty. Insider concentration made the problem worse, because team and investor allocations of thirty to fifty percent typically came with cliff-and-vest schedules that conveniently coincided with peak hype. And underneath all of it, the gameplay itself was secondary, so when the token economy turned south there was nothing left to retain players who had been there for the yield.
uniCRAFT is structured to address each of these failure modes:
04Game design
uniCRAFT is a single-player sandbox game running entirely in a modern browser. The technical stack and gameplay surface area are described below in the order a player would encounter them.
Engine and rendering
The renderer is built on Three.js r160 and WebGL 2. All textures come from a procedurally generated 256 by 256 atlas drawn at startup with NEAREST filtering, which gives blocks and items the pixel-art look without shipping any image files. The world consists of 16 by 16 by 128 chunks generated deterministically from a seed, with six biomes (plains, forest, desert, taiga, mountains, ocean), 3D Perlin noise for cave carving, and ore distribution biased by depth so diamond only appears near bedrock and coal stays close to the surface.
Chunk meshes use face culling and per-vertex ambient occlusion, with separate transparent passes for water, glass, and leaves so they sort correctly. Frustum culling on chunk meshes, plus inline Web Worker generation through a Blob URL, keeps the main thread free for input and physics while new chunks are streaming in.
Physics, mobs, and progression
Player physics are AABB sweep tests against block boxes, axis by axis, with gravity, jump, sneak, sprint, and a creative-mode flight toggle. Water gives buoyancy and slowed movement, and falls greater than three blocks deal damage. Mob AI covers passive species (pigs, cows, chickens, sheep) and hostile species (zombies, skeletons, spiders, and the boomer) with simple A-star pathfinding on a 16 by 16 grid recomputed every half second. Hostile mobs only spawn when the local light level is below seven, which gives the day-night cycle a real gameplay role.
Crafting includes both shaped and shapeless recipes evaluated against a 3 by 3 grid, plus furnace smelting with fuel burn timers, chests with 27-slot storage, item drops, and durability on tools. Three save slots persist worlds and player state in localStorage, with chunk deltas RLE-compressed to keep the storage footprint small.
05$uCRAFT token
| Property | Value |
|---|---|
| Name | uniCRAFT |
| Symbol | uCRAFT |
| Decimals | 18 |
| Standard | ERC-20 (OpenZeppelin v5) |
| Max supply | 1,000,000,000 $uCRAFT |
| Mint path | Constructor only, no future minting |
| Burn path | Hook contract, on collected swap fees |
| Max transaction (buy) | 0.5% of supply (5,000,000) |
| Max wallet | 2% of supply (20,000,000) |
| LP status | Locked at launch |
The token contract has exactly two privileged functions, both gated to the hook address. fundRewards(uint256) moves hook-collected fees into the rewards escrow, and burnFromHook(uint256) burns hook-collected fees from circulation. Neither one is callable by the contract owner, so even a compromised owner key cannot mint new tokens or move treasury balances around. The 0.5 percent max-transaction cap on buys and 2 percent max-wallet cap protect early holders from sniper bots and concentrated whales during the launch window, and can be lifted by the owner once trading has settled.
06Tokenomics
Two slices, fixed at deploy:
| Allocation | % | Tokens | Lock or vest | Recipient |
|---|---|---|---|---|
| Liquidity Pool | 80% | 800,000,000 | Locked at launch | Uniswap v4 pool |
| Player Rewards | 20% | 200,000,000 | Held by uCRAFTRewards | Players, via the daily faucet |
What is conspicuously absent from this table is any allocation for the team, for early investors, for advisors, for an ecosystem fund, for a treasury, or for future emissions. The team gets paid the way every player gets paid, by playing the game and claiming through the same rewards contract. Investors and partners participate through the same liquidity pool that any other holder uses.
07Uniswap v4 hook architecture
Uniswap v4’s hook system lets a custom contract intercept pool operations such as swaps and liquidity changes, and modify their behavior. uniCRAFT deploys a single hook on the $uCRAFT/ETH pool. The relevant excerpt from the contract is short enough to print here in full:
contract uCRAFTHook is BaseHook {
uint24 public constant FEE_BPS = 30; // 0.30%
uint24 public constant FEE_DENOM = 10_000;
uint16 public constant REWARDS_PCT = 60;
function _beforeSwap(...) internal override returns (...) {
uint256 inputAmount = abs(params.amountSpecified);
uint256 fee = (inputAmount * FEE_BPS) / FEE_DENOM;
poolManager.take(inputCurrency, address(this), fee);
if (inputCurrency == uCRAFT) {
uCraft.fundRewards((fee * REWARDS_PCT) / 100);
uCraft.burnFromHook(fee - (fee * REWARDS_PCT) / 100);
} else {
rewardsContract.call{value: fee}("");
}
return (selector, toBeforeSwapDelta(int128(int256(fee)), 0), 0);
}
}
In practice, every swap on the pool pays an extra 30 basis points on the input side, on top of the standard LP fee. When $uCRAFT is the input currency, sixty percent of the fee is moved into the rewards escrow (extending the runway for player payouts) and forty percent is permanently burned from supply. When ETH is the input currency, the entire fee is forwarded to the rewards contract, which can hold and account for any token type. The hook never holds $uCRAFT longer than a single block, because fundRewards and burnFromHook are called immediately inside _beforeSwap.
Why a custom hook? Standard LP fees go to liquidity providers and stay there. The 30 bps hook fee is layered on top of the LP fee rather than replacing it, so LPs continue to earn their normal yield while traders pay an additional surcharge for the privilege of transacting in a market whose token has a self-funding game economy attached.
08Earn mechanism
All earning happens client-side first. As the player mines ore, defeats mobs, or hits achievement thresholds, the game writes the corresponding $uCRAFT credit into a pending balance stored in localStorage. The values are wired into the live game and reflected in the in-game HUD as soon as they fire.
| Action | Reward ($uCRAFT) | Notes |
|---|---|---|
| Mine diamond ore | +10.0 | Survival mode, requires correct tool tier |
| Mine gold ore | +2.0 | Survival mode, iron pickaxe or better |
| Mine iron ore | +0.5 | Survival mode, stone pickaxe or better |
| Mine coal ore | +0.1 | Survival mode, wood pickaxe or better |
| Kill zombie | +1.0 | Direct kill, melee or ranged |
| Kill skeleton | +1.5 | Direct kill, melee or ranged |
| Kill spider | +1.0 | Direct kill, melee or ranged |
| Kill boomer | +2.5 | Boomers explode and damage terrain |
| Daily login | +5.0 | Resets at UTC midnight |
| Welcome bonus | +25.0 | First-ever session only |
| Achievement: First Diamond | +5.0 | One-time, mine your first diamond |
| Achievement: 10 Diamonds | +100.0 | One-time |
| Achievement: 10 Mobs | +5.0 | One-time |
| Achievement: 100 Mobs | +50.0 | One-time |
| Achievement: 500 Mobs | +250.0 | One-time |
| Achievement: 100 Ores | +25.0 | One-time, all ore types combined |
Creative mode does not credit any rewards, since it exists for testing and showcasing rather than playing. In survival mode, ore-mining rewards only fire when the player actually drops the resource, which means using a tool of the correct tier or higher. Trying to mine diamond with a wood pickaxe gives no drop and therefore no reward.
09Claim flow
The rewards contract is a permissionless faucet capped per address per day. Any wallet can call it directly, but the daily cap means no single account can drain a meaningful share of the rewards pool in a single window. The flow is:
- The player clicks “Claim Pending” in the in-game wallet panel.
- The front-end reads the contract’s current
dailyClaimCapand the player’sclaimedTodaycounter, and works out the largest amount it can submit without reverting. - The front-end calls
claim(amount)onuCRAFTRewardsdirectly from the player’s wallet. There is no backend in the path. - The contract resets the daily counter if a new UTC day has rolled over, checks that
claimedToday + amount ≤ dailyClaimCap, increments the counter, increments the lifetimetotalClaimedtotal, and transfers $uCRAFT to the player. - The transaction emits a
TokensClaimedevent that the front-end uses to confirm the claim and update the wallet panel.
Until the contract address is wired into the game, the wallet panel runs in a demo mode where clicking Claim simply moves the pending balance into a local “claimed” counter without producing any on-chain transaction. The full UX can therefore be exercised end to end before contracts go live.
10Security model
Daily cap
Each address can claim at most dailyClaimCap $uCRAFT per day, with a window that resets at UTC midnight. The cap defaults to zero at deploy, which means claims revert with ClaimsPaused until the owner explicitly opens the faucet through setDailyCap. The cap can be changed at any time, and setting it back to zero pauses claims again without redeploying or moving funds.
Sybil tolerance through cap math
Because the faucet is permissionless, any address can call claim. The cap is the only rate limiter, so it is sized so that even with a large sybil farm the rewards pool depletes slowly. At a default cap of 100 $uCRAFT per address per day, the entire 200,000,000 escrow would take 2,000,000 unique-address-days of activity to drain. The owner can lower the cap, pause it entirely, or use rescue to recover stuck non-uCRAFT tokens if anything unexpected lands in the contract.
Anti-whale and trading freeze
The token contract enforces a 0.5 percent max-transaction cap on buys and a 2 percent max-wallet cap during the launch window. A trading-active flag also blocks all transfers between non-excluded addresses until the deployer flips it, so the pool can be initialized and seeded before any swap activity begins.
LP locked at launch
The full 80 percent liquidity allocation is paired with ETH and locked through a public lock contract on day one. Neither the deployer nor the team can withdraw the LP NFT during the lock period.
Hook permission constraints
Uniswap v4 enforces hook permissions at the address level, in the sense that the lower bits of the deployed address must encode which callbacks the hook claims. uniCRAFT mines a CREATE2 salt to produce an address with exactly the BEFORE_SWAP_FLAG | BEFORE_SWAP_RETURNS_DELTA_FLAG bits set, so the PoolManager rejects any other hook callback on the same contract.
One-shot hook wiring
Once the hook contract address is set on the token through setHookContract, the function rejects any second call. This prevents an owner with a compromised key from re-pointing the mint and burn permissions at a malicious successor contract.
11Roadmap
The roadmap is split into four phases. Phase 1 is in your browser already, phase 2 is in audit, and phases 3 and 4 are sequenced behind it.
Phase 1, Game (live)
The block engine, survival and creative modes, mob AI, biomes, crafting, smelting, three save slots, settings persistence, the in-game wallet panel, and the pending $uCRAFT tracker are all running in the live build today.
Phase 2, Token and hook (current)
The uCRAFT token, rewards faucet, and v4 hook are written and ready for deployment on Ethereum mainnet. The full 80 percent liquidity allocation will be paired with ETH and locked through a public lock contract on day one, and the rewards faucet opens with a conservative daily cap that the owner can adjust as the project grows.
Phase 3, Multiplayer
Multiplayer is built around shared worlds via WebSocket for the single-region case and WebRTC mesh for peer-to-peer play. Player-versus-player combat is included, with on-chain bounties paid through the same rewards contract. Land plots will be tokenized as ERC-721 and can be traded through the Uniswap v4 ecosystem alongside $uCRAFT itself.
Phase 4, Modding and governance
A sandbox modding API will let community members ship signed mod packs, distributed as ERC-1155 NFTs. The rewards contract will gradually transition into a stake-weighted DAO so $uCRAFT holders can govern future parameter changes such as the daily cap, the fee split, or the addition of new earn rates. Cross-chain liquidity bridges round out the phase.
The whole point is the game.
Stop reading and start mining. The first diamond is on the house.
Launch uniCRAFT