Homework: ERC20

  1. What are the benefits of setting a token standard like ERC20?

ERC20 is a set of standards ensuring universal compatibility/interoperability/frictionless operation. It defines how we programme tokens. You can programme a token any way you want in Solidity, but important to have a framework of standards. This ensures for example that all exchanges and wallets will be able to support the tokens from the moment they are released.

  1. What functions are in the ERC20 Token Standard Interface and what do they do?

2 examples from the lesson:

“totalsupply” - determines the total supply of a token

“balanceOf(address account)” - enables a exchange or a person to query the balance held in a wallet, e.g. via a block explorer.

Other examples from the Medium article:

“Transfer”, “approve” and “transferFrom” - approving and enabling transfer of tokens from one address to another.

“allowance” provides the number of tokens allowed to be transferred from a given address by another given address.

1 Like
  1. Setting ERC20 Standards for tokens makes them easily integrate and interoperate with each other. These standards create efficiency without friction.

  2. ERC20 tokens have a total supply function that shows how many tokens have been created. A
    balance of function that shows how many tokens you have in your wallet. ERC20 standard also has the same naming convention so that they that can talk to each other. This key to enable atomic swaps.

1 Like
  • What are the benefits of setting a token standard like ERC20?
    • A standard can be adopted by each participate, thereby increasing interoperability and efficiency and reducing friction.
    • All users can use the same functions, rather than developing their own implementations.
    • All tokens can use the same functions.
  • What functions are in the ERC20 Token Standard Interface and what do they do?
    • A function is code that accepts specific inputs and generates an output.
    • Standardized functions enables a user to perform operations and get the same results as other users.
1 Like

Every wallet and exchange would be able to read, accept and interact with the token using ERC20, if they do not have a standard they wouldn’t be as efficient as they are and would take much longer and difficult to be programmed and recognized, by Exchanges, and Wallets.
2.
“…allowing wallets to provide token balances for hundreds of different tokens and creating a means for exchanges to list more tokens by providing nothing more than the address of the token’s contract.”

balanceOf() function provides the number of tokens held by a given address.
transfer() function transfers a number of tokens directly from the message sender to another address.
approve() approval to transfer up to a certain number of tokens
allowance() function provides the number of tokens allowed to be transferred from a given address by another given address

1 Like

It means that you can have many different tokens on the blockchain
totalSupply relates to how many tokens there are
balanceOf relates to the balance of tokens in an address
transferFrom relates to sending tokens

1 Like
  1. By using a stantard like ERC20, everything that interacts with it knows how to read and act with that specific code. In practice, wallets or exchanges can integrate all ERC20 based tokens.
  2. balanceOf() - Which gives the balance of an address;
    transfer() - sends the transfer from the one to other address;
    approve() - the tokens holder gives the approval to an address to transfer a certain amount of tokens;
    transferFrom() - take the amount of tokens from one address previous allowed;
1 Like
  • What are the benefits of setting a token standard like ERC20?
    Interoperability and quicker adoption. If everyone follows a standard, the new token can be quickly/easily adopted from day 1 instead of having to try and figure out how the new token should interact with existing tokens.
  • What functions are in the ERC20 Token Standard Interface and what do they do?totalSupply = total amount of tokens in circulation
    balanceOf = account balance of another account
    transfer = send tokens to an address
    allowance = returns amount that the spender can still get from the owner
    approve
    = allows the spender to withdraw tokens from the owner’s account
1 Like
  1. The standardization ensures everyone is able to benefit on the platform (cohesion)

  2. totalSupply() - total token supply
    `balanceOf() - account balance of another account
    transfer() - transfers a number of tokens directly from the message sender to another address
    approve() - approval to transfer a certain amount of tokens
    transferFrom() - Send value amount of tokens fromone address to another
    allowance() - provides the number of tokens allowed to be transferred from a given address by another given address

1 Like
  1. ensures interopability
  2. totalSupply() = total supply of tokens
    balanceOf(address account) = balance of tokens for an address
    transfer(address recipient, unit256 amount) = an amount transfered to a recipient
1 Like
  1. What are the benefits of setting a token standard like ERC20?

Easier to communicate with them. Other services only have to implement one standard, then all ERC20 tokens can be used. For example ony system needs to be implemented on an exchange to make it possible to trade all different ERC20 tokens.

  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • balanceOf(): get number of tokens of a given address
  • transfer(): send tokens to an address
  • approve(): allow an address to use a set of tokens
  • transferFrom(): take a set amount of tokens from an address
1 Like
  1. What are the benefits of setting a token standard like ERC20?
  • Having token standards allows wallets, tokens, and exchanges to communicate on the network efficiently. Thus creating interoperability between the token networks
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • Total Supply: Returns a unit of the total supply token
  • balance Of(): Provides the number of tokens given held in a given address
  • transfer(): Allows the transfer of an ERC 20 token to another ERC address
  • doSomething(): Operates instruction on the network
  • allowance(): Sends the value amount of tokens from address owner to address spender
1 Like
  • What are the benefits of setting a token standard like ERC20?
    Having a token standard allows for all wallets and exchanges to support them as standard.

  • What functions are in the ERC20 Token Standard Interface and what do they do?
    Total Supply; Gives the total supply of tokens in circulation.
    Balance of; Shows the token balance of the address provided.
    Transer; Enables the transfer of a specific amount to a specific recipient.

1 Like

1, It provides a common, stable, predictable and reusable platform from which to build on.
2, Total supply balance, max tokens, address balances, allows transfer of tokens between addresses.

1 Like
  1. The whole ecosystem (wallets/exchanges etc.) around the protocol can implement/add the new token right away, which brings unity and makes the space grow.

  2. balanceOf() - number of token in given adress
    transfer() - sends tokens
    allowance() - number of tokens allowed to be sent from a given adress by another given adress
    totalsupply - the sum of all balances

1 Like
  1. Makes it possible to have new tokens run on the blockchain without problems. It gives a standard format for the functions of a token to use. Tokens using the standards will run in many other programs and apps without difficulty and in a consistent way.
  2. Six functions, two events and 3 strings.
    Per bitcoinwiki.org
    function totalSupply() public constant returns (uint);
    function balanceOf(address tokenOwner) public constant returns (uint balance);
    function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);
    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
1 Like
  1. The standards of an ERC20 token allow wallets, exchanges and other applications using the token to communicate with each other.

  2. There are functions in the language such as “function total supply” which tells you how many tokens are in circulation and “balnceOf” which gives a balance. Both of these functions can be found in any application.

1 Like
  1. That the main functions and way it is written is similar to other tokens with this script. For 3rd parties like exchanges, wallets this is than more easy to read and to compare.

  2. totalSupply() for the maximum tokens in existance, balanceOf() to check the balance of an account, transfer() to transfer tokens to another adress.

1 Like

they all have standards to be set so they can integrate with each other
Functions for creating burning mapping etc.

1 Like
  1. For smooth execution and transaction by using standardized protocols and rules

  2. totalSpply(), balancOf(), Transfer(), TransferFrom() etc

1 Like

The benefits to setting a standard like erc20 is,

  1. it allows for people to use a standard for creating allowing the code and understanding of it to be more cohesive.
    Setting the standard like erc20 also allowed for the tokens to be fungible. meaning that they can be exchanged 1 for 1 without any decisive difference

2 Functions of the erc token , balanceOf would query the blockchain for the balance of an acct, transfer() would transfer a specified token from one acct to another providing there were funds and it was approved , allowance() allowance would refer to the amount of funds that could be used for a specific operation. approval() would be used to seek approval for a specific action before executing
Lastly totalsupply which is the total supply of all circulating tokens which is a defining factor in whether it is a erc token or not.

1 Like