UCUBES v0.1.0
mainnet · pending
ucubes://protocol — readme 64×64 · eth

UCUBES

$ ucubes --describe Buy $UCUBE on Uniswap v4. The hook auto-mints a sealed cube — no mint button. Reveal → isometric SVG. Hold → earn ETH fees.

./buy on uniswap ./docs ./x
unit50M
mintauto · hook
pooluniswap v4
flowBUY→REVEAL
01

Specification

/spec

Hard constraints. Same cube art in browser (generator.js) and on-chain (UcubesRenderer).

NFTERC-721 · symbol UCUBE · name UCUBES
ERC-20$UCUBE · Uniswap v4 ETH/UCUBE pool + UcubesHook
ArtOn-chain SVG via tokenURI · sealed until reveal · no IPFS
SeedReveal bytes32 → uint32(uint256(seed)) art seed
PRNGmulberry32 in browser; on-chain keccak walk matches CubesRenderer
Canvas64 × 64 crispEdges · rendered at any display size
Field18 glyph stamps · isometric cube · modes pure/dual/split/prism
SubjectIsometric cube · faces a (top) / b (left) / c (right)
UNIT50_000_000 ether backs one sealed cube NFT
MintNo public mint. Buy $UCUBE on the hooked v4 pool → NFT auto-issues per UNIT
RevealOwner calls reveal(tokenId) · burns fee · unlocks SVG · starts fee share
Socialx.com/Ucubes_
02

Pipeline

/pipeline
fn buy()

01 · buy

Swap ETH → $UCUBE on the hooked Uniswap v4 pool. UcubesHook.afterSwap records buy credit in the same tx.

fn mint()

02 · auto-mint

Token transfer from PoolManager consumes credit. Every UNIT (50M) backs one sealed cube NFT — no mint UI, no separate tx.

fn reveal()

03 · reveal

After the delay, call reveal. Seed unlocks isometric SVG on-chain. Revealed cubes earn a share of swap fees.

// same swap tx
// 1. UniversalRouter / UI swap ETH → $UCUBE
// 2. UcubesHook.afterSwap → _addBuyCredit(tokenOut)
// 3. CubesToken._update(PoolManager → buyer) → consumeBuyCredit → nft.mint(buyer)
// later: nft.reveal(tokenId) → UcubesRenderer SVG
03

Lab

/lab · seed inspector

Feed a uint32. Weighted world roll + same path as the renderer. Rail forces a world on the field.

out — 64²
seed—
mode—
worlds—
odds—
04

Docs

/docs

Architecture

There is no public mint button. Cubes arrive when you buy $UCUBE on the hooked Uniswap v4 pool. UcubesHook taxes swaps and tracks buy credit; Ucubes issues sealed NFTs 1:1 per UNIT; UcubesRenderer draws isometric cubes after reveal.

// ownership graph
UcubesHook (v4 · flags 0x20CC · 2% tax)
  └─ afterSwap BUY → buy credit (transient storage)
Ucubes ($UCUBE)
  ├─ UNIT = 50M ether · INITIAL_SUPPLY = 100B ether
  ├─ fees 95% holders / 3% official / 2% buyback
  └─ _update(PoolManager → buyer) → consumeBuyCredit → nft.mint
UcubesNFT
  ├─ sealed until reveal(tokenId)
  ├─ revealSeed[tokenId] → bytes32
  └─ renderer → UcubesRenderer

Buy → auto-mint

On every ETH→$UCUBE swap through the registered pool, the hook credits the token output. When the PoolManager delivers tokens to your wallet in that same transaction, the ERC-20 consumes the credit and mints sealed cubes for each full UNIT of purchased balance capacity.

  • You do — buy on Uniswap v4 (pool with UcubesHook)
  • Hook does — afterSwap buy credit
  • Token does — nft.mint(buyer) automatically
  • You reveal later — unlock art + fee share

Reveal / seed

Commit–reveal via blockhash. After delay, owner calls reveal(tokenId); seed is keccak256(blockhash(target), tokenId, nft). Art uses uint32(uint256(seed)).

  • mint(to) — controller-only, triggered by hooked buys — not callable by users
  • reveal(tokenId) — burns reveal fee · sets reward weight · unlocks SVG
  • Sell below UNIT — excess NFTs burn; pending rewards redirect to buyback

Renderer

Crisp-edge SVG 64×64. Glyph field under an isometric cube. Modes: pure / dual / split / prism. Lab on this site mirrors the same palette and geometry for previews only.

  • faces — top / left / right tones
  • modes — (seed >> 8) % 64
  • rewardWeight — 100–300 · mode + palette rarity → ETH fee share

Addresses

Loaded live from addresses.json. Pool link appears after deploy.

// loading…

ABI surface (minimal)

[
  "function reveal(uint256 tokenId) returns (bytes32)",
  "function claim() returns (uint256)",
  "function UNIT() view returns (uint256)",
  "function nft() view returns (address)",
  "function pendingReward(address) view returns (uint256)"
]
05

Get a cube

/get · no mint button

Cubes are not minted from this site. Buy $UCUBE on Uniswap v4; the hook mints a sealed cube into your wallet in the same swap. Then reveal when ready.

unit50M / NFT
pathswap → auto NFT
chainETH · v4

pool pending deploy · after launch: buy $UCUBE → sealed cube lands in wallet

06

FAQ

/faq
Is the art on-chain?

Yes. SVG is built from the reveal seed inside tokenURI. Sealed cubes show a placeholder until reveal.

Do web and wallet match?

Same palette table and cube geometry as UcubesRenderer. Lab seeds preview art; on-chain reveal seed is canonical.

Multi-color cubes?

Four modes. pure (~62%) stays mono. dual mixes field + faces from two worlds. split gives each face a different world. prism (~3%) is max clash. Roll = (seed >> 8) % 64.

Rarity model?

Worlds are weighted (mono common, rose/lime scarce). Modes stack — prism + rare palette raises rewardWeight (100–300) for ETH fee share.

How do I get a cube?

There is no mint button. Buy $UCUBE on the hooked Uniswap v4 pool. In that same swap the hook auto-mints one sealed cube per UNIT (50M tokens). Call reveal later to unlock art and fee share.

What if I sell?

If balance falls below UNIT × NFT count, excess cubes burn automatically. Unclaimed rewards redirect to buyback.

Where is social?

x.com/Ucubes_