Liminal secures FSP license from FSRA in ADGM   Read more

ERC 20

| June 14, 2024

Share this article

Key takeaways

  • ERC-20 is the standard for fungible tokens on Ethereum. It guides token creation. Tokens made with ERC-20 are interchangeable. Most Ethereum tokens follow ERC-20.

What is ERC 20?

ERC-20 sets a standard for Fungible Tokens. This means each Token is identical in type and value to another Token. For instance, an ERC-20 Token behaves like ETH. This ensures 1 Token is always equivalent to all other Tokens.

It is a technical standard on the Ethereum blockchain. It was proposed by Ethereum developer Fabian Vogelsteller in 2015. It establishes rules for issuing assets, which ensure they function properly within Ethereum. The rules cover asset transfers, supply, and balances.

ERC-20 Features

ERC-20 is a set of functions and events required for token compliance. These functions outline what a token’s smart contract should include, while events depict actions. Mandatory functions include:]

  • TotalSupply: Indicates the total token supply.
  • BalanceOf: Shows an account’s token balance.
  • Transfer: Automatically transfers tokens to a specified address.
  • TransferFrom: Moves tokens from one address to another.
  • Approve: Allows token withdrawal by a spender.
  • Allowance: Returns token allowance from spender to owner.

Mandatory events are:

  • Transfer: Triggered upon successful transfer.
  • Approval: Logs an approved event.

Optional functions include token names, symbols, and decimal points. Not all tokens are cryptocurrencies; tokens represent external assets and rights. ERC-20 ensures standardization for easy access and use. Many popular digital currencies comply with ERC-20, such as Tether USD (USDT), USD Coin (USDC), Shiba Inu (SHIB), etc.

The ERC-20 Standard

ERC-20 is a set of rules for tokens. It decides how tokens can move and how many exist. It came from a 2015 idea and was added to Ethereum.

Interacting with ERC-20 Tokens

To use ERC-20 tokens, you need ETH. For example, sending 100 ABC tokens to Sam requires a bit of ETH.

ERC-20 tokens are powerful tools, but they rely on the Ethereum blockchain for functionality. To interact with ERC-20 tokens, you’ll need a small amount of ETH, Ethereum’s native cryptocurrency. This is because every transaction on the Ethereum network requires a fee, paid in ETH. These fees compensate miners for validating and securing the network. They are called gas fees.

Gas fees are like the fuel needed to power Ethereum’s ecosystem. The amount of ETH (gas) needed for a transaction can vary depending on factors like network congestion and the complexity of the interaction. Sending a simple ERC-20 token transfer might require less gas compared to a complex smart contract interaction.

Creating ERC-20 Tokens

You make ERC-20 tokens with smart contracts. Consider a contract that gets 1000 ETH max. For every ETH sent, it gives back 100 ABC tokens. This makes 100,000 ABC tokens. It’s like a company selling shares for dollars.

What ERC-20 tokens are used for?

ERC-20 tokens are like building blocks on Ethereum and are used for many things!

  • Stablecoins: These tokens act like digital dollars or euros, so their value stays steady.
  • Voting Tokens: A token that lets you vote on how a project is run!
  • Special Access Tokens: Some tokens give you access to games, websites, or special features.
  • Real-world Ownership: Tokens can even be tied to real things like gold or houses!
  • Game Money: Some games use ERC-20 tokens as their virtual currency.
  • Virtual World Money: Want to buy land or stuff in a virtual world? ERC-20 tokens can help!
  • Decentralized Finance (DeFi): These tokens can be used for things like borrowing and lending crypto.

Advantages of ERC-20

ERC-20 tokens have many benefits. They can be easily swapped because they all follow the same standards. This makes them useful for lots of things. For example, you can switch one ERC-20 token for another, even if they’re for different projects.

ERC-20 tokens are safe because they use the Ethereum Blockchain. The Blockchain is secure and hard to change. It keeps things transparent and fair.

Developers can make their own ERC-20 tokens. They can decide how many tokens there are, how small they can get, and what they can do.

ERC-20 tokens are transparent. Every move they make is recorded on the Ethereum Blockchain. This helps verify transactions and lets everyone see what’s happening.

ERC-20 tokens are easy to trade. You can buy and sell them quickly on crypto exchanges. This makes them popular with investors.

Using ERC-20 tokens is simple. You can create and manage them with tools like MyEtherWallet and MetaMask. This makes them available for everyone, boosting creativity in the Blockchain world.