Blockchain Fundamentals: Tokens

Blockchain Fundamentals: Tokens

Wednesday Feb 21, 2024

Introduction to Tokens

In this course, we will discuss different types of tokens and how they are used in the Ethereum ecosystem. We will also discuss some of the common standards that have been developed for tokens on Ethereum.

What is a Token?

Tokens represent a digital asset. This asset can be a digital currency or a digital representation of a project (sort of like how stocks are a representation of how much a project is worth).

When discussing cryptocurrency, we need to distinguish between two types of tokens. Native tokens and just tokens.

Native Tokens

A native token is a token that is used on a blockchain to pay for transaction fees. For example, Ethereum is the native token of the Ethereum blockchain. Bitcoin is the native token for the Bitcoin network, and so on.

This is pretty clear. However, when we introduce tokens, there might be some confusion.

Other tokens

Tokens are all other tokens that exist on a blockchain in the form of a Smart Contract called the ERC20 contract. We also refer to these tokens as ERC20 tokens.

It is, therefore, important to distinguish between the two because while ETH might exist on the Ethereum network as a native token, it may also exist on the Polygon network as an ERC20 token.

What is the difference between Tokens and Native Tokens?

ERC20 tokens have functional capabilities - what I mean by this is that you can change the way they work. You can build on them - they are Smart Contracts.

Native tokens do not have this capability. They are just the native token. They are not smart contracts.

Wrapped Tokens

Because native tokens are not smart contracts, we can not use them in the same way in decentralized apps. Developers then created wrapped versions of these tokens, that is, a version of the native token wrapped in a smart contract.

In doing this, it allows developers to use them as they would other ERC20 tokens.

How do wrapped tokens have value?

The way they are created is by depositing the native token into a contract and then issuing (or minting) an equivalent amount of the wrapped token back to the person who deposited the native tokens.

Token Standards

ERC-20

ERC-20 is the most common token standard for Fungible Tokens. Fungible tokens mean that each token is the same as the other. As an example, if you have 1 ETH and I have 1 ETH, they are the same. They are interchangeable.

ERC-777

ERC-777 is an extension of ERC-20. It adds some functionality to the token, most notably being able to send tokens to a contract and have the contract react to the transfer. This is not possible with ERC-20.

ERC-721

ERC-721 is a token standard for Non-Fungible Tokens. Non-Fungible tokens are unique. As an example, if I have a digital artwork and you have one, they are not necessarily the same. They are not inherently interchangeable.

ERC-1155

ERC-1155 is a token standard that allows for both Fungible and Non-Fungible tokens to be created. It draws on the functionality of ERC-20, ERC-721, and ERC-777. It is very flexible and allows for massive gas savings when creating multiple tokens.

Token Use Cases

There are many use cases for different tokens. Some of the most common are:

Stablecoins

Stablecoins are tokens that are pegged to the value of some asset. For example there is a token called USDT that is pegged to the US Dollar. This means that 1 USDT is worth 1 USD.

Utility Tokens

Utility tokens are tokens that are used to pay for some product or service. For example, if we have a decentralized exchange, we might give people who hold our token a discount on trading fees.

Security Tokens

Security tokens are tokens that represents partial ownership of assets that have real-world value. For example, a token that represents equity, real estate, etc.

Collectibles

Collectibles are tokens that represent unique assets. For example, a digital artwork, a digital trading card, etc. These are usually Non-Fungible Tokens.

Governance

Governance tokens are tokens that allow holder to vote on decisions that affect the project. For example, if we have a decentralized exchange, we might allow holders of out token to vote on which trading pairs to add to the exchange.

It's important to note that one token can be used for multiple use cases. For example, a token can be a governance token and a utility token.

Conclusion

In this course, we discussed different types of tokens and how they are used in the Ethereum ecosystem. We also discussed some of the common standards that have been developed for tokens on Ethereum. In our other courses, we will explore these topics in more detail: