Member-only story
Exploring ERC20 Fungible Token Standard in Solidity
Meet the gold standard for tokens on EVM chains

This time let’s talk about fungible tokens, one of the main building blocks in DeFi. These tokens can represent coins, gold, grain, and other assets that can be exchanged for them. We will look into one of the first Ethereum Improvement Proposal with number 20. This token standard is widely known as ERC20 and describes an interface for tokens within smart contracts. Functions like token transferring, approving spending, creating, and others are defined by this ERC20 standard.
To illustrate the ERC20 standard in code, we will use OpenZepplin ERC20 implementation.
Minting and burning
There are two main actions with total token supply. We can use either mint or burn them. Minting means creating more supply, and burning means decreasing supply once we need to do so.
Minting
To create a token supply, we need to mint this amount. When we are minting behind, the scenes caller that calls this function receives provided amount of tokens.
Let’s create a smart contract that would act as an ERC20 token. In the constructor, we need to provide the total token supply and call OpenZepplin’s ERC20
implementation constructor…