← Back to Projects

NFT Platform Project

Build Digital Ownership Infrastructure

Problem Statement: How do we create verifiable digital ownership and scarcity?
Jupyter Notebook Slide Deck

Learning Objectives

  1. Understand ERC-721 and ERC-1155 standards
  2. Implement proper metadata handling
  3. Store NFT data on IPFS
  4. Create marketplace functionality

NFT Standards Comparison

FeatureERC-721ERC-1155
Token TypeNon-fungible onlyFungible + Non-fungible
UniquenessEach token uniqueMultiple of same ID
Gas EfficiencyHigher per transferLower (batch support)
Use Case1/1 Art, PFPsGame items, editions

Step-by-Step Guide

Phase 1: Basic ERC-721

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract MyNFT is ERC721, ERC721URIStorage, Ownable {
    uint256 private _nextTokenId;

    constructor() ERC721("My NFT", "MNFT") Ownable(msg.sender) {}

    function mint(address to, string memory uri)
        public onlyOwner returns (uint256) {
        uint256 tokenId = _nextTokenId++;
        _safeMint(to, tokenId);
        _setTokenURI(tokenId, uri);
        return tokenId;
    }
}

Phase 2: Metadata Standard

{
    "name": "Artwork #1",
    "description": "A beautiful digital artwork",
    "image": "ipfs://QmXxx.../image.png",
    "attributes": [
        { "trait_type": "Background", "value": "Blue" },
        { "trait_type": "Rarity", "value": "Legendary" }
    ]
}

Phase 3: IPFS Storage

  1. Upload image to IPFS (get CID)
  2. Create metadata JSON with image CID
  3. Upload metadata to IPFS
  4. Set tokenURI to metadata CID

Phase 4: Marketplace

Cryptoeconomics Analysis

QuestionAnswer
PROBLEMProve digital ownership and scarcity
INCENTIVESCreators earn royalties, collectors speculate
BENEFITS/COSTSVerifiable provenance; gas costs, metadata risk
FAILURE MODEMetadata loss, rug pulls, smart contract bugs
DESIGN CHOICESOn-chain vs off-chain metadata
ALTERNATIVESTraditional digital rights management

Implementation Checklist

Related Lessons

Resources