Finance:ERC-20
ERC-20 is a technical standard used for smart contracts on the Ethereum blockchain for implementing tokens [1]. ERC stands for Ethereum Request for Comment, and 20 is the number that was assigned to this request. The clear majority of tokens issued on the Ethereum blockchain are ERC-20 compliant. [1] As of 2018-07-26, a total of 103621 of ERC-20 compatible tokens are found on Ethereum main network, according to Etherscan.io[2]. ERC-20 defines a common list of rules for Ethereum tokens to follow within the larger Ethereum ecosystem, allowing developers to accurately predict interaction between tokens. These rules include how the tokens are transferred between addresses and how data within each token is accessed.[1] [3]
Currently Ether does not conform to the ERC-20 standard. Protocols which require ERC-20 compliance for trading have created Wrapped Ether tokens as a place holder for ETH[4]. These "WETH[5]" tokens are held in a separate smart contract[6] and pegged to Ether at 1:1.
History
ERC-20 was proposed on November 19, 2015 by Fabian Vogelsteller[7]. It defines a common list of rules that an Ethereum token has to implement, giving developers the ability to program how new tokens will function within the Ethereum ecosystem. The ERC-20 token standard became popular with crowdfunding companies working on initial coin offering (ICO) cases due to the simplicity of deployment, together with its potential for interoperability with other Ethereum token standards.[8]
Applications
As of July 26 2018, there were more than 103,621 ERC-20 token contracts.[9] Among the most successful ERC20 token sales are EOS, Filecoin, Bancor, Qash, and Bankex, raising over $70 million each.[10]
Functions
The ERC-20 token has the following method-related functions:
The specific wording of the function is followed by a clarification of what it does, in [brackets]
totalSupply() public view returns (uint256 totalSupply)
[Get the total token supply]balanceOf(address _owner) public view returns (uint256 balance)
[Get the account balance of another account with address _owner]transfer(address _to, uint256 _value) public returns (bool success)
[Send _value amount of tokens to address _to]transferFrom(address _from, address _to, uint256 _value) public returns (bool success)
[Send _value amount of tokens from address _from to address _to]approve(address _spender, uint256 _value) public returns (bool success)
[Allow _spender to withdraw from your account, multiple times, up to the _value amount. If this function is called again it overwrites the current allowance with _value]allowance(address _owner, address _spender) public view returns (uint256 remaining)
[Returns the amount which _spender is still allowed to withdraw from _owner]
Events format:
Transfer(address indexed _from, address indexed _to, uint256 _value)
. [Triggered when tokens are transferred.]Approval(address indexed _owner, address indexed _spender, uint256 _value)
[Triggered whenever approve(address _spender, uint256 _value) is called.]
References
- ↑ 1.0 1.1 1.2 "ERC-20 Token Standard - The Ethereum Wiki". https://theethereum.wiki/w/index.php/ERC20_Token_Standard. Retrieved 30 August 2017.
- ↑ etherscan.io. "Etherscan Token Tracker Page" (in en). https://etherscan.io/tokens.
- ↑ Reiff, Nathan (2017-06-20). "What is ERC-20 and What Does it Mean for Ethereum?" (in en-US). Investopedia. https://www.investopedia.com/news/what-erc20-and-what-does-it-mean-ethereum/.
- ↑ "Canonical WETH – 0x Protocol". 0x Protocol. 2017-11-08. https://blog.0xproject.com/canonical-weth-a9aa7d0279dd.
- ↑ "W-ETH" (in en). https://weth.io.
- ↑ etherscan.io. "Ethereum Accounts, Address and Contracts" (in en). https://etherscan.io/address/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.
- ↑ "ERC: Token standard #20". https://github.com/ethereum/eips/issues/20. Retrieved 13 April 2018.
- ↑ "What is an ERC20 Token". BitcoinForBeginners. 15 May 2018. https://www.bitcoinforbeginners.io/cryptocurrency-guide/what-is-an-erc20-token/. Retrieved 14 June 2018.
- ↑ etherscan.io. "Etherscan Token Tracker Page" (in en). https://etherscan.io/tokens.
- ↑ "Token Data | News, data and analytics for all ICO’s and tokens". https://www.tokendata.io.