NFTs, otherwise known as non-fungible tokens, come in many different types, but at its core is a smart contract that defines what makes these assets what they are and how they work within a set of pre-programmed conditions.
Most definitions of NFTs to date vary depending on what perspective one is coming from. Forbes describes NFTs as digital assets that represent real-world objects, while Cointelegraph defines it as verifiably unique representations of digital and physical goods.
On another end, Binance Academy explains NFTs as cryptoassets that represent something unique and collectible using blockchain technology, while Investopedia even goes a level higher and describes NFTs as cryptographic assets on a blockchain with unique identification codes and metadata that distinguish them from each other.
These varying definitions of NFTs are not wrong, but it can get quite confusing especially for someone who is just starting to explore what NFTs are and what makes them so valuable that people are dropping insane amounts on them.
For this reason, it is important to look at the fundamentals of what makes up an NFT to gain a solid understanding of what they really are and appreciate the value that they bring to the table - and it all starts with a smart contract.
A smart contract is simply a computer program stored on the blockchain that automatically runs when pre-determined conditions are met.
Since a smart contract self-executes when pre-programmed conditions are triggered, it allows two parties to set the conditions of a transaction without the need to trust an intermediary to oversee the execution.
John wants to set aside a fund to ensure that he will be able to pay his rent of US$500 to Adam every 15th of the month for the next 6 months. By using a smart contract, John can program it to check the current date, send the US$500 automatically to Adam's account on the 15th, and repeat the process every month until the 6-month period is up.
Ethereum (ETH) is an open-source platform that uses blockchain technology and supports smart contract functionality. It is regarded as a "world computer" where software developers can deploy smart contracts and enable it to run 24/7.
At present, Ethereum is the most dominant blockchain for smart contract applications, especially NFTs. Independent news company Forkast reported that as of the first quarter of 2022, Ethereum accounts for over 72% of all NFT sales to date - a market that is expected to surpass US$30 billion within the year.
However, there are also other blockchains that support smart contract applications aside from Ethereum and some are even optimized for specific purposes like gaming and digital art.
Solana (SOL), Cardano (ADA), Tron (TRON), Tezos (XTZ), Hive (HIVE), and Avalanche (AVAX) are just some of the Ethereum alternatives that are currently making waves and notably involved in the NFT space.
There are already many remarkable use cases of smart contracts to date, including DeFi applications, asset tokenization, DAOs, and of course, NFTs. Each adheres to a specific development standard to ensure that the smart contract remains composable and the project remains interoperable across implementations.
When it comes to tokens, smart contracts have to observe the specific token standard necessary for the project. This token standard varies per blockchain and may come in one or several types.
Solana, on the other hand, uses the term "programs" instead of "smart contracts" or "token standards". These programs exist in their Solana Program Library (SPL), with their Token Program governing the implementation of both fungible tokens and NFTs on the Solana blockchain.
Meanwhile, Tezos has the token standard FA2 (Financial Application 2), which supports a range of token types, including fungible, non-fungible, and non-transferrable tokens, as well as multi-asset contracts.
Avalanche, for its part, has Contract Chain (C-Chain), which is its default smart contract blockchain that enables the creation of any Ethereum-compatible smart contracts. This means users can use Ethereum's token standards on Avalanche to create tokens, including NFTs.
We say that a smart contract is the heart of an NFT and for good reasons - one being that it is the smart contract that makes it possible for a non-fungible token to be what it fundamentally is, from being scarce, non-fungible, verifiable, self-executing, to embedding utilities that give this asset more intrinsic value.
The smart contract also governs the most significant functions that are non-negotiable when it comes to NFTs and make this information permanent and irrevocable, such as transaction, ownership, and identification.
This part deserves its own article, but for reference, Schonherr summarizes what a smart contract is quite succinctly:
Meanwhile, Nanowerk makes a simple but compelling outline of the components that makes up an NFT transaction, which they summarized as follows:
As this topic can get quite long, I’m cutting this here for now but stay tuned for the next part as we delve deeper into what an actual NFT smart contract looks like, what are its specific parts, and how it gets deployed on the blockchain.