Tokens
Digital assets you can control with your wallet
To start, what's a token? In the physical world, a token is a jeton that has value within a circuit that recognizes it and that is accepted by its users. Vintage public telephone tokens, company's loyalty cards, and carbon credits are all examples of tokens.
A cryptographic token is a quantified and tradable unit of social or economic value recorded on the blockchain.
Tokens can be fungible, non-fungible, and soulbound.
Fungible tokens represent coins much like cryptocurrencies bitcoin and ether. They are:
interchangeable with tokens of the same type: I can exchange one coin for another coin, since they are fungible assets
divisible into smaller pieces whose sum makes the whole
transferable from one wallet to another
Technically, a native cryptocurrency for a blockchain like bitcoin and ether is different from a fungible token, like DAI and UNI, which lives on a blockchain but is not its native coin.
Programmatically, tokens are defined in token standards for smart contracts. A token standard is a minimum interface a smart contract belonging to the standard must implement to allow tokens to be managed, owned, and traded.
the most common standard for fungible tokens on Ethereum is ERC-20
the most common standard for non-fungible tokens on Ethereum is ERC-721
there is still no commonly accepted token standard for soulbound tokens.
There is also the concept of multi-token standard, ERC-1155, for what are also called semi-fungible tokens. A semi-fungible token is a non-fungible token that has a supply, that is a number of identical (fungible) digital assets associated with the token. If the supply is 1, we boil down to a non-fungible token. If the supply is greater that 1, then there are many identical copies on a unique asset, like the very same editions of a unique artwork. In this way, the ERC-1155 token can do the same functions as an ERC-20 and ERC-721 token, and even both at the same time.
Token applications
So far, blockchain token applications are mainly driven by finance, gaming and art. However, as we will argue in this course, decentralized education and learning is still a sleeping beauty.
Fungible tokens
The principal application of fungible tokens on programmable blockchains like Ethereum is Decentralized Finance or DeFi.
DeFi refers to the ecosystem comprised of financial applications that are being developed on top of blockchain systems. It aims to create a financial system that's open to everyone and minimizes one's need to trust and rely on central authorities.
Popular DeFi applications include:
stablecoins: cryptocurrencies that attempt to peg their market value to some external reference, typically the U.S. dollar
decentralized exchanges: applications in which you can provide liquidity to a pool of coins (market making) earning an interest or swap coins of a liquidity pool (market taking) paying a swap fee that goes to the liquidity providers
lending and borrowing: services to lend your coins and earn an interest or borrow cryptocurrencies paying an interest and depositing a collateral as a guarantee
staking: tools to stake your coins on a blockchain using the Proof-of-Stake consensus mechanism, like Ethereum, and get a reward interest or the possibility to become a validator of the chain, competing for the block rewards
Non-fungible tokens
These are notable use cases of non-fungible tokens (NFTs):
profile pictures (PFPs), the most popular and traded are CryptoPunks and Bored Ape Yacht Club. PFPs are used as status symbol and profile pictures on social media accounts and metaverses
digital art, with iconic projects Autoglyphs and Fidenza, and marketplaces SuperRare and ArtBlocks, where artists mint their artworks and collectors can bid and buy them
decentralized metaverses, where many assets are tokenized as NFTs. Two notable examples are:
Sandbox, a metaverse where users can build, own, and monetize gaming experiences
Decentraland, a metaverse where users can buy and trade virtual lands; on a piece of land one can build things, for instance a digital art museum
Let's focus on the pipeline of operations that are necessary to mint and sell an NFT on a marketplace like SuperRare. We consider the case of the artwork Andy-Machine-Portrait-2020 by hex6c:
the artwork (an digital image in this case) and its metadata (title, description and keywords) are created by the artist
the artist interacts with the gallery's smart contract in a minting transaction in which an ERC721 NFT associated with the artwork is generated and transferred from the contract into the artist's wallet
the NFT is saved onchain and contains the address of the creation contract (contract address) and a progressive numeric identifier of the artwork within that contract (token id);
the metadata and the artwork file are instead stored offchain on decentralized file system like IPFS or Arweave. The minting transaction contains a link to a JSON file on IPFS that contains the metadata of the artwork and a further link to the artwork file also on IPFS (see the input data field and click on decode input data)
the artwork is now available on the primary market of the gallery. Collectors can bid by participating in an auction, signing transactions that interact with the gallery's smart contract, committing the funds offered in the contract. Any funds previously committed in lower bids are released
when deemed appropriate, the artist may accept the last bid made by signing a transaction interacting with the gallery's smart contract. In this case the NFT transfers from the artist's wallet to the collector's wallet and the offered cryptocurrency (net of the gallery commission of 18% on primary market) moves the other way round.
the artwork remains on the gallery's secondary market, where it can possibly change hands from collector to collector. In the case of a sale on the secondary market, the sale transaction transfers an artist royalty of 10% of the sale price to the original artist of the artwork, who therefore always retains a share in the ownership of the work even after it has been sold. Notice also a 3% gallery commission on secondary market.
Soulbound tokens
Soulbound tokens are widely discussed in the paper Decentralized Society: Finding Web3's Soul. Some possible use cases of soulbound tokens are illustrated below.
Last updated