NFT Project Architecture Design
Most NFT project problems don't arise during development but during scaling or marketplace launch. Collection deployed, sold, then it becomes clear: metadata stored on centralized server and on its failure traders see empty pictures; royalties don't work on Blur and LooksRare; contract doesn't support batch operations and transfer gas costs $5 on loaded network. Architecture phase is about preventing such surprises from happening in 6 months.
Choosing Token Standard
ERC-721 vs ERC-1155 vs ERC-721A
ERC-721 — standard for unique NFTs. Each tokenId is unique, each has its owner. Widely supported by marketplaces. Weakness: _mint in loop — each mint is separate record in _owners mapping, each record = SSTORE = ~20k gas. Minting 100 NFTs in one transaction = 2M gas.
ERC-721A (Azuki) solves exactly this: batch mint writes minimal data — only record for first tokenId in batch, others computed on-demand via ownerOf. Savings on batch mint — 60-80% gas. Trade-off: ownerOf and transferFrom cost more than ERC-721 due to additional computations. For projects with active trading after mint — consider carefully.
ERC-1155 — multi-token: one contract contains multiple IDs, each ID can have multiple copies (fungible or semi-fungible). Perfect for: edition NFTs (1000 identical), gaming items (1000 swords of one type), certificates. Marketplaces support ERC-1155, but UX sometimes worse than ERC-721 (not all aggregators show editions correctly).
| Standard | Best for | Gas on mint | Gas on transfer |
|---|---|---|---|
| ERC-721 | Unique PFP | High | Low |
| ERC-721A | Batch mint PFP | Very low | Medium |
| ERC-1155 | Edition, gaming | Low | Very low |
Upgradeability: Do We Need It
For most NFT collections — no. Immutable contract inspires more confidence in collectors. Proxy adds attack surface: storage collision during upgrade can corrupt _owners mapping — all tokens become "nobody's".
When upgradeability justified: gaming NFTs with evolving mechanics, protocol NFTs within DeFi system. Then use UUPS with timelock: any upgrade has 48-72 hour delay, community can react.
Metadata Storage
IPFS and Pinning Problem
IPFS is decentralized storage, but file exists only while someone "pins" it. If pinner disconnects — ipfs://QmXxxx... becomes unavailable. Solution: paid pinning service (Pinata, NFT.Storage, Filebase) + multiple pinners.
NFT.Storage (Filecoin) stores data permanently via Filecoin deals — closer to real decentralization than just IPFS pinning.
Arweave — pay-once-store-forever. One payment on upload, data stored permanently (~200 years per protocol estimates). Used by Metaplex (Solana NFT standard) and many serious ETH projects. For 10,000 NFT images Arweave costs $200-500 — cheaper than pinning service for several years.
On-Chain Metadata
For fully on-chain NFTs (generative art, fully on-chain games) metadata and image stored in contract. tokenURI returns base64-encoded JSON with base64-encoded SVG inside. Expensive on deployment, but absolutely permanent. Example: Loot Project, Nouns DAO.
Structure:
data:application/json;base64,{base64({"name":"...", "image":"data:image/svg+xml;base64,{base64(svg)}"})}
Royalty Mechanics
EIP-2981 as Base Standard
royaltyInfo(uint256 tokenId, uint256 salePrice) returns (receiver, royaltyAmount). Supported by OpenSea, Rarible, Foundation. Not enforced — advisory. Implemented via ERC2981 from OpenZeppelin:
_setDefaultRoyalty(treasury, 500); // 5% = 500 basis points
Or per-token royalty for collaborations: different royalty on different tokenIds.
Operator Filter
For projects wanting enforced royalty: inherit from OperatorFilterer, register in OpenSea Operator Filter Registry. Blocks transfer via non-compliant marketplaces. Requires weighted decision — limits transferability, causes community disputes.
Mint Mechanics in Architecture
Dutch Auction — for projects with high demand. Reduces gas wars (no point outbidding price), fair price discovery. Refund mechanism for difference between paid and final price.
Whitelist + Public phases — standard. Merkle proof for WL (described in separate service), Public with rate limiting (max N per wallet per tx).
Lazy mint — NFT exists off-chain, created on-chain only on first purchase. Collector pays mint gas. Used by Zora, Foundation. Reduces creator risk — don't pay for deploying 10,000 tokens that may not sell.
Architecture Design Process
Analysis (1-2 days). Project type (PFP / gaming / art / membership), target marketplaces, royalty requirements, planned utility (staking, governance, content access).
Architecture document (1-2 days). Standard choice with justification, metadata storage scheme, mint mechanics, royalty approach, upgrade roadmap if needed.
Architecture technical review. Check compatibility with target marketplaces (OpenSea, Blur, LooksRare), potential gas issues, attack surface.
Deliverable. Markdown document with architecture decisions, ER-diagram of contracts, storage layout, risk list. Development based on document.
Timeline Estimates
NFT project architecture design — 3-5 days. Includes document with decisions, diagrams, risk review.
Cost calculated after initial project briefing.







