NFTs technical guide
By Walid KHEMIRI
Plan
01 Non-fungible tokens(NFTs)
02 NFT project: technical
steps
2
Non-fungible
tokens(NFTs)
Blockchain
Blockchain is a highly secure, reliable, and decentralized network that store
data, exchange values, and record transactions activity in a shared ledger that is
not controlled by any central authority, but instead maintained by multiple
parties.
4
Smart contract
- They manage a digital agreement between unrusted parties
- A set of promises (in digital form), that run on a blockchain automatically.
- They are deployed and executed on a blockchain.
- A computer program that automatically executes all or parts of an agreement
between parties without the need of a trusted third party.
5
Token
- Used to represent value in our digital world using Blockchain and smart contract.
- It is a new way to create, store and transfer values in our digital world on the internet via
decentralized, transparent, P2P, without an intermediary, low cost, and instant manner.
-They programmed using a smart contract
6
Token and smart contract
movements
- Initial coin offering (ICO), Security Token Offering(STO)
- Decentralized finance(DeFi)
- Non-fungible tokens(NFTs)
- Decentralized autonomous organization(DAOs)
- X to Earn: Play to Earn, Move to Earn, etc
- Decentralized science(DeSci)
- Decentralized Society (DeSoc)
- Regenerative Finance (ReFi)
7
Token and smart contract
movements
- Initial coin offering (ICO), Security Token Offering(STO)
- Decentralized finance(DeFi)
- Non-fungible tokens(NFTs)
- Decentralized autonomous organization(DAOs)
- X to Earn: Play to Earn, Move to Earn, etc
- Decentralized science(DeSci)
- Decentralized Society (DeSoc)
- Regenerative Finance (ReFi)
8
Non-fungible tokens(NFTs)
What is Fungibility?
- “Fungibility” refers to the interchangeability of
the asset.
- Fungible is the property of being exchangeable
for other assets of the same kind without any
change in value or usability.
- Non-fungible things, are not interchangeable
with one another and have unique properties
that can make them radically different from one
another, even though they may look similar.
9
Non-fungible tokens(NFTs)
- A non-fungible token (NFT) is a digital cryptographic token that
represents ownership of something unique.
- A Non-Fungible Token is NOT fungible. It is a token that represents a
unique asset with characteristics that are particular to it: it cannot be
interchanged or replaced by another equivalent token.
- An NFT can represent anything like a physical thing (house), a digital
thing (crypto punk) or even an idea (intellectual property).
- NFTs can take the form of a digital work, a virtual land, a domain
name.
10
Non-fungible tokens(NFTs)
Mainly, NFTs are composed of two distinct parts: Token and Metadata. Each token is linked to an account as well as to metadata
(describe the asset which the token represents).
In the NFTs space, the metadata is the actual content and the description of what the token represents. This is what gives
meaning to an NFT.
In an NFT, the metadata is pointed to uniform resource identifier (URI) referenced in the token.
TOKEN ID OWNER(ACCOUNT ADDRESS)
1 0x6E7448a6335d5C947953994d071D4Dc1F6e5BE96
2 0xEA9Eb93E5dca67f5BFc00e8B82b4FdfbB6B838e6
TOKEN ID METADATA(URI)
1 ipfs://bafyreicioolpq7rcevvruaxte2jb3h4mmyz3px2ytzohbo5a3zum
2 ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb
11
NFTs use cases
Event
Digital Art Gaming etc …
ticketing
Anything unique in any industry, we can use NFTs to make the
digital representation of it
NFTs are tokens. A digital representation of ownership that can be
recognised, transferred, upgraded, automated and transacted
between humans, computers, devices, drones and much more in
a B2B and B2C context.
12
NFTs as new digital
primitive
- NFTs are not just an avatar or an image. It is a new powerful digital
primitive.
- You can represent anything unique using an NFT in our digital world.
- The programmability aspects provided by the smart contract lead to an
infinite feature around NFTs.
13
NFTs features
It will be a lot of features based on NFTs.
- Membership NFTs - NFTs as collateral
- Digital twin - Badges NFTs
- NFTs royalties - Digital art collection
- NFTs ownership access management - Fractional NFTs (F-NFTs)
- Proof of attendance protocol(POAP) - Gaming items
- Ticketing: tickets NFTs - Subscription NFTs
- NFT Renting - Dynamic NFT (dNFT)
- …
13
NFTs project
steps
Technical Steps
NFTs project
01 02 03 04
Pick a
blockchain
07 06 05
15
16
How can I choose a suitable
Blockchain?
01 Blockchain
ecosystem
maturity
17
Blockchain ecosystem
maturity
Number of
Active address developers
count
Documentation
Libraries and
frameworks
Tools
forums
feedbacks
18
How can I choose the suitable
Blockchain ?
01 Blockchain
ecosystem
02 Project funding:
Grant program
maturity
19
Grant program
2
0
1
3
20
How can I choose the suitable
Blockchain ?
01 Blockchain
ecosystem
02 Project funding:
Grant program
maturity
03 Blockchain
Trilemma
21
Blockchain Trilemma
- It is introduced by Vitalik Buterin(co-founder of Ethereum)
- Blockchains are often forced to make trade-offs that prevent them from
achieving 3 aspects (Different priorities, result in different design tradeoffs):
- Security: the ability of the blockchain system to operate as expected, and
defend itself from attacks, bugs, and other unforeseen issues.
- Decentralization: creating a blockchain system that does not rely on a
central point of control.
- Scalability : the ability for a blockchain system to handle an increasingly
growing amount of transactions.
22
How can I choose the suitable
Blockchain ?
01 Blockchain
ecosystem
02 Project funding:
Grant program
maturity
03 Blockchain
Trilemma
04 Transaction
fees and
transactions
throughput
23
Transaction fees and
transactions throughput
2
0
1
3
24
Layer-2 Scaling/
Sidechains
- If high throughput/lower gas fees are a critical point for the success of your NFTs
project. So, Layer-2 is a good choice.
- L2 is a rich ecosystem. There are multiple types of L2 projects which are based
on different technologies:
- Optimistic rollups: Arbitrum, Optimism, and Boba Network
- Zero-knowledge rollups: Polygon Hermez, zkSync, STARKNET, Aztec
- State channel: Connext, Kchannels, and Perun, The Raiden Network
- Plasma: pg, Ploygon
- Validium: DeversiFi, Immutable X
- NFT-Specific L2: : Immutable X, Sorare based on StarkEx
- With Sidechains, we can also achieve high throughput/lower gas fees
- Sidechain projects: Polygon, Skale
25
Technical Steps
NFTs project
01 02 03 04
Pick a NFT Standard
blockchain
07 06 05
26
NFTs standards
Blockchain Standards
Ethereum ERC721, ERC1155
Binance Smart Chain BEP-721, BEP-1155
(BSC)
Tezos FA2 (TZIP-12)
NEAR NEP-171, NEP-177, NEP-178, NEP-181
Algorand Algorand Standard Assets (ASAs)
Flow The Flow Non-Fungible Token standard
Tron TRC-721(equivalent to ERC-721)
Cardano CIP NFT Metadata Standard
Polkadot The Paratoken Standard
27
Ethereum NFTs standards
ERC721 ERC1155
Only one token type Multi token type
Transfer one token at a time Batch-transfer in single transaction
Only Non-Fungible token Supports creation of both fungible and
Non-Fungible token
Consume a lots of gas Consume less gas
https://eips.ethereum.org/EIPS/eip-721
https://eips.ethereum.org/EIPS/eip-1155
28
Technical Steps
NFTs project
01 02 03 04
Pick a NFT Standard Metadata:
blockchain Storage type
07 06 05
29
NFTs Metadata
- NFT metadata is one of the core components of an NFT.
- Metadata is a set of data that describes and gives information about anything.
- It is a JSON document that often contains the following: Name, Description, Traits,
etc.
30
NFTs Marketplace: OpenSea
NFT metadata is the core of an
NFT. It is a JSON document that
often contains the following:
NFT’s name
Description of the NFT
Link to the hosted image
Traits
…
https://docs.opensea.io/docs/
metadata-standards
31
Metadata storage type
- Metadata can be stored on-chain or off-chain using decentralized storage systems like IPFS or even private storage. However, in order to
reliably model ownership of assets, metadata (or at least a hash) should be stored on-chain so that it cannot be tampered with.
- This URI could point to a website maintained by the NFT creator or a third party, an IPFS address, or other data location that the NFT app
can resolve.
- Image can be stored on-chain using SVG format.
32
IPFS: InterPlanetary File System
- One of the most used solutions for storing
metadata
- It is a protocol to access files on the internet.
- IPFS is a peer-to-peer distributed file system
that seeks to connect all computing devices
with the same system of files.
- IPFS aims to be complent with HTTP or
replace it.
- HTTP: location-based addressing.
- IPFS: content-based addressing
33
IPFS: InterPlanetary File System
- IPFS is not responsible for the permanent
storage of your metadata and image.
- Files are temporary and will eventually be
deleted unless the user decides to "pin" the
data.
- You can run your IPFS node to ensure the high
availability of your data.
- You can alse delegate the infrastructure
responsibility to a remote pinning service.
- Remote pinning services: Pinata, nft.storage
34
Other aspects
- Other aspects may be useful for your NFTs project:
- The NFT Playbook by Walt.id: https://walt.id/nfts
- Dynamic NFT: https://blog.chain.link/what-is-a-dynamic-nft
- Hybrid smart contract: https://blog.chain.link/hybrid-smart-contracts-explained
- EIP-4361: Sign-In with Ethereum: https://eips.ethereum.org/EIPS/eip-4361
- etc
35
Technical Steps
NFTs project
Implementation/
01 02 03 04 Test
Pick a NFT Standard Metadata:
blockchain Storage type
07 06 05
36
EVM compatible chains
Hardhat
- An Ethereum development environment
- With hardhat:
1- Run a local Ethereum network for development
purpose.
2- Compile Smart contract
3- Deploy your contracts on the target network
4- Run tests
5- Debug Solidity code
- Tasks and plugins features:
1- Rich ecosystem of plugins created by the community.
2- You can create some tasks or some plugins to reuse
later.
37
EVM compatible chains
OpenZeppelin
- A library for secure smart contract development.
- A set of modular, reusable, secure smart contracts for the
EVM networks, written in Solidity.
- Build on a solid foundation of community-vetted code.
- Features:
1- Implementations of standards like ERC20, ERC721,
ERC1155 and ERC777.
2- Flexible role-based permissioning scheme.
3- Reusable Solidity components to build custom
contracts and complex decentralized systems.
38
EVM compatible chains
Ether.js/Web3.js
- Most popular JavaScript libraries to interact with smart
contracts.
39
Multi-Chains
Alchemy Moralis
- An RPC node provider - An RPC node provider
- An enhanced API to build NFTs project. - An enhanced API to build NFTs project.
- etc .. - Web3UIKit: Lightweight reusable Web3 UI components
for dapps developers
- etc …
40
Multi-Chains
Decentralized oracle network: Chainlink Indexing protocol: The Graph
- Chainlink provide tamper-proof inputs, outputs, and - The Graph is the indexing and query layer of the
computations to support advanced smart contracts on decentralized web
any blockchain:
- Chainlink Verifiable Random Function (VRF)
- Chainlink Data Feeds
- Chainlink Keepers
- Call External APIs
41
Technical Steps
NFTs project
Implementation/
01 02 03 04 Test
Pick a NFT Standard Metadata:
blockchain Storage type
Smart
07 06 05 contract
auditing
42
Technical Steps
NFTs project
Implementation/
01 02 03 04 Test
Pick a NFT Standard Metadata:
blockchain Storage type
Smart
08 07 06 05 contract
auditing
Smart
contract
deployment
43
Technical Steps
NFTs project
Implementation/
01 02 03 04 Test
Pick a NFT Standard Metadata:
blockchain Storage type
Smart
07 06 05 contract
auditing
Mint new Smart
tokens contract
deployment
44
Thank You