Difference between revisions of "ERC20"

From DefiLlama
Jump to navigation Jump to search
m (link to erc page)
m (added link to categories)
 
(5 intermediate revisions by 3 users not shown)
Line 3: Line 3:
For example, an ERC-20 Token acts just like the ETH, meaning that 1 Token is and will always be equal to all the other Tokens.<ref>https://ethereum.org/en/developers/docs/standards/tokens/erc-20/</ref>
For example, an ERC-20 Token acts just like the ETH, meaning that 1 Token is and will always be equal to all the other Tokens.<ref>https://ethereum.org/en/developers/docs/standards/tokens/erc-20/</ref>


Example functionalities ERC-20 provides:
== Technical Details ==
The most used implementation of the ERC20 standard is the [https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol one from OpenZeppelin].
Most ERC20 tokens have 18 decimals, just as ether, that means each token can be divided up to 10<sup>-18</sup>.


== Use cases ==
ERC20 tokens are used, on EVM-compatible blockchains, to represent property of some asset (which can come from the real world or from the blockchian). They're used for example to port other cryptocurrencies on external blockchains (ex WBTC). They're used for governance on many protocols or even for liquidity mining. They're also used to represent other assets (see [[Stablecoin]]) like currencies, stocks, commodities etc...
== Functionalities ==
* transfer tokens from one account to another
* transfer tokens from one account to another
* get the current token balance of an account
* get the current token balance of an account
* get the total supply of the token available on the network
* get the total supply of the token available on the network
* approve whether an amount of token from an account can be spent by a third-party account
* approve whether an amount of token from an account can be spent by a third-party account
(Examples of ERC20 Tokens: $USDC, $LDO, $USDT, etc)


=== Sources ===
== Sources ==
<references />
<references />
[[Category:Glossary]]
[[Category:Token]]

Latest revision as of 04:51, 25 May 2022

The ERC-20 introduces a token standard for Fungible Tokens, in other words, they have a property that makes each Token be exactly the same (in type and value) of another Token.

For example, an ERC-20 Token acts just like the ETH, meaning that 1 Token is and will always be equal to all the other Tokens.[1]

Technical Details

The most used implementation of the ERC20 standard is the one from OpenZeppelin. Most ERC20 tokens have 18 decimals, just as ether, that means each token can be divided up to 10-18.

Use cases

ERC20 tokens are used, on EVM-compatible blockchains, to represent property of some asset (which can come from the real world or from the blockchian). They're used for example to port other cryptocurrencies on external blockchains (ex WBTC). They're used for governance on many protocols or even for liquidity mining. They're also used to represent other assets (see Stablecoin) like currencies, stocks, commodities etc...

Functionalities

  • transfer tokens from one account to another
  • get the current token balance of an account
  • get the total supply of the token available on the network
  • approve whether an amount of token from an account can be spent by a third-party account

(Examples of ERC20 Tokens: $USDC, $LDO, $USDT, etc)

Sources