Docs/Examples/Nft Registry

NFTRegistry (Scheduled Supply Releases)

Enforces a committed NFT release calendar on-chain — "limited" supply becomes a verifiable smart-contract guarantee instead of an operator promise.


Overview

NFTRegistry manages collections with hard supply caps and a committed release schedule. Admins create collections and schedule future mint releases. AutoLoop fires the mint at the committed releaseTime regardless of operator action. Buyers can then claim tokens from the treasury at the published mint price.

PropertyValue
Base contractAutoLoopCompatible (no VRF)
VRF usageNone
Gas per tick~40k–120k (scales with release quantity)
Sourceautoloop/src/agents/NFTRegistry.sol
Tests38 passing (unit + fuzz)

Why AutoLoop Is Structurally Required

"Limited" supply is a promise without enforcement. Classic failure modes:

  • Roblox Limiteds: the entire market depends on Roblox's promise not to re-release. No enforcement mechanism exists.
  • TF2 hats: Valve can stealth-increase supply of "rare" items — and has.
  • NBA Top Shot: Dapper Labs controls supply with zero on-chain verification.

NFTRegistry moves the supply cap into a smart contract (maxSupply) and the release schedule into a committed ReleaseSlot. AutoLoop executes the mint at releaseTime — not when the operator decides, and not on a different date. The supply cap is enforced in progressLoop() — an attempted over-mint reverts.

Mechanics

  • createCollection(name, maxSupply, mintPrice): registers a new collection with an immutable supply cap. Admin only.
  • scheduleRelease(collectionId, quantity, releaseTime): schedules a future mint. Validates that total scheduled ≤ maxSupply at scheduling time. Admin only.
  • progressLoop(): finds the first due slot and mints quantity sequential tokens to the treasury address. Emits SupplyReleased.
  • claim(tokenId): buyers pay mintPrice to claim a treasury-held token. 2% protocol fee applied.

Revenue Model

  • 2% protocol fee on each claim() call
  • AutoLoop gas fee on each tick

Deploy

forge create src/agents/NFTRegistry.sol:NFTRegistry \
  --constructor-args 0xTREASURY_ADDRESS \
  --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

Args: treasury — address that receives minted-but-unclaimed tokens.

Dashboard

View NFTRegistry on the AutoLoop Dashboard.