- Date: 12/04/2022
- Author: @Bridgiie
- Topic: The Relationship between NFTs and Smart Contract
Good evening everyone.
Welcome to 101 Tuesdays.
My name is Omenazu Chioma.
Today, we’ll be discussing:
The Relationship between NFTs and Smart Contract
Before we dive into that, let's talk about NFTs for a bit and understand what it is.
NFT stands for non fungible token.
They are digital tokens that are non fungible.
What is fungible?
When a thing is fungible, it means that it is equivalent and can be exchanged for something else. For instance, 500 dollars in the paper is equivalent to 500 dollars received via transfer.
If you lend someone a $500 note, the person can repay you with a $200 + two $100 + two $50.
The value would still be retained.
However, a non fungible token is unique, just like art.
I can have a picture of the Monalisa painting in my phone, but it is not equivalent to the original Monalisa art. Every NFT is one of a kind.
One very popular NFT collection is the Cryptopunks collection.
Every NFT in that collection has a unique identity.
So, if you have an NFT from that collection and I do as well, we still don't own the same NFT. The uniqueness of NFTs are made possible by identification codes and metadata that is logged and authenticated on cryptocurrency blockchains.
Now that we understand NFTs, let's talk about the relationship between NFTs and Smart Contracts
The first relationship is in the minting (harvesting) of NFTs.
The creation of NFTs is done by the creation of smart contracts stored in the Blockchain.
A smart contract is defined as "a self-executing programme or protocol in which the contents of an agreement are inscribed directly into lines of computer code to facilitate the performance of the agreement".
Smart contracts work with an “if” rule.
If a certain condition is met, then a certain command is executed.
For instance, the smart contract could be that an NFT will be minted for 0.5Eth
.
So if you have 0.5Eth
and you approve the smart contract, the 0.5Eth
and the gas fee will be deducted,
and the ownership of the NFT will be transferred to you.
With the smart contract, a seller doesn't have to be online for his NFT to be sold.
He just has to list it, and if his selling price is met, ownership is transferred to the buyer. There are two primary ways in which smart contracts and NFTs can interact with each other.
- NFT’s can be embedded in smart contracts and vice versa
NFT’s can be embedded within smart contracts. A smart contract can own an NFT within it which is then transferred to a user or another contract based on the rules and events defined in the smart contract.
Smart contracts can be embedded in an NFT to call and access assets within the NFT. For example, a user can access a song which is embedded in an NFT through a smart contract. They would agree upon the terms using the smart contract, pay the agreed upon amount and then get access to that song. This is a process that will most likely run in the background when users hit play on their applications.
NFTs and smart contracts can solve different problems within and outside the blockchain, and also create a reward system that is reliable.
Getting to know about NFTs and Smart Contracts is a knowledge you’d be glad you acquired. That's where we round up for Today, thank you for joining.