Loading
PRICE DISCUSSION DOCS
APP
Updated 2026-10-11·View as Markdown

Smart Contracts — Overview

The PD protocol is a small family of contracts with one temperament: immutable logic, money that never rests, and art that renders from the chain alone. One factory is deployed once; every Project deploys its own ERC-721 and royalty splitter beside it; a shared append-only registry holds the art's libraries; the sticker economy runs on its own ERC-1155 with matching splitter vaults; and the keychain capsule machine mints one-of-one charms drawn entirely by an on-chain renderer. Everything below is taken from the contract source.

The architecture

PD contract architecture. PDFactory deploys each PDProject with its PaymentSplitter; PDProject reads blessed libraries from PDLibraryRegistry at render time. PDStickers reads the factory's platform wallet live and pays royalties to StickerSplitter vaults. PDKeychains mints living charms drawn by the PDKeychainRenderer and its three part stores. PDLibraryRegistry append-only · frozen read at render PDFactory whitelist · wallets fee corridor deploys PDProject ERC-721, one per Project art on-chain · 95/5 mint 5% royalty PaymentSplitter one per Project 3% artist · 2% platform platformWallet(), read live PDStickers ERC-1155 sticker shop sealed sheets · peel 5% royalty StickerSplitter solo vault + collab vaults 3% creator · 2% platform PDKeychains ERC-721 capsule machine living charms · luck draws via KeychainRenderer + 3 part stores, immutable fully on-chain SVG
  • PDFactory — deploys every Project (through its own deployment arm, a size-limit split with zero governance surface). Holds the artist whitelist, the platform wallets, the storage-fee corridor, and the registry of everything it has deployed (isProject).
  • PDProject — the per-Project ERC-721. Stores the generative script on-chain, commits each Output's hash at mint and reveals it a block later (so no minter can pick their outcome), renders tokenURI entirely from chain data, pays out 95/5 inside every mint transaction, opens every drop with the fail-open 60-second entry window, and signals EIP-2981.
  • PaymentSplitter — receives the Project's 5% secondary royalty and splits it 60/40 (3% of sale to artist, 2% to platform), with permissionless withdrawals in ETH and ERC-20.
  • PDLibraryRegistry — append-only, on-chain storage for the blessed JavaScript libraries — at launch the shelf holds p5.js 1.11.13 plus the gzip inflater, and more libraries can be added to it later — that Projects may bind, and the source of every Output's Language attribute.
  • PDStickers — the sticker economy's ERC-1155: fully on-chain SVG stickers sold as sealed sheets, peeled to reveal, with royalties flowing to StickerSplitter vaults that mirror the Project split. It reads the factory's live platform wallet, so both economies rotate at one point.
  • PDKeychains — the capsule machine's ERC-721: one-of-one living charms drawn entirely by the on-chain PDKeychainRenderer and its three part stores, with luck-tilted rarity rolls frozen at the crank, the polish attestation, and the keeper bond.

The guarantees

  • Projects are immutable. No admin, no pause, no upgrade path, no withdraw function, no balance. A Project's terms at deployment are its terms forever.
  • The art is on Ethereum. Scripts live in SSTORE2 data contracts; tokenURI returns a self-contained data URI whose HTML document renders the artwork from the token's on-chain hash. No server, no IPFS, no platform dependency.
  • Money never rests in contracts. Primary proceeds push to artist and platform inside the mint transaction; secondary royalties rest only in the Project's own splitter until anyone triggers a withdrawal, which can only pay the artist's immutable address or the factory's current platform wallet.
  • Governance is minimal and visible. The factory's admin whitelists artists and rotates platform wallets through two-step transfers — and the two wallets that receive pushed ether must prove they can receive it before going live; the storage fee moves only within an immutable corridor. Nothing an admin holds can touch a deployed Project.
  • Nothing can permanently halt a mint. The one time-boxed mechanism in the protocol — the contested-drop entry window — fails open at an immutable deadline: if the platform's settlement server never shows up, minting opens by itself. There is no oracle and no external price dependency anywhere.

Verification status

The suite is complete and under test — more than 400 Foundry tests in the repository, including differential fuzzing of the assembly paths against memory-safe references — with continuous integration running the full suite plus an EIP-170 deploy-size gate on every push, so an undeployable contract fails the build rather than surfacing at launch. An earlier revision of the stack is deployed to the Sepolia test network and was exercised end to end there, including a full live run of the money paths (mints, royalties, sticker purchases and peels, marketplace sales) verified to the wei, with the core art contracts source-verified on Etherscan; the next Sepolia rehearsal carries the newest rounds (marketplace attributes, the two-clock entry window, commit-reveal seeds, keychains, and the latest security-hardening pass). Mainnet deployment is the platform's launch event; mainnet addresses are published in these docs when they exist. The $PRICE token — a separate, standalone contract — is already live on mainnet.

Further reading