Homework: ERC20

ERC20 Homework

  1. The benefits of setting a standard like ERC20 is that it facilitates interoperability and efficiency and you can build applications that can talk with each other.
  2. Function totalSupply() gives total tokens in circulation.
    Function balanceOf() shows how many tokens this balance has
    Function transfer() transfers specified tokens from one address to another
    Function allowance() tokens allowed to be transferred
    Function approve() approve someone to spend from your Account.
1 Like

total supply = capped amount of tokens
Balance = sums up amount of tokens in wallet
Transfer = enables transactions

1 Like

Yes, this is a very good example sir! Glad too know that you are seeing the entire picture! :muscle:

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like

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

In setting a token standard such as ERC20, it enables all wallets on the network to correctly and efficiently communicate with eachother. This standard is beneficial for integration and interoperability on the Ethereum blockchain.

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

totalsupply - total number of tokens in circulation
blanaceOf - number of tokens in balance
transfer - transfer to an address from another
allowance - tokens able to be transferred

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

    • It reduces friction between systems developed on the blockchain and removes code duplication and in my professional opinion it reduces copy and paste.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?

    • name -sets the name of a token contract
    • symbol -sets the symbol of a token contract
    • totalsupply - retrieves the total balance available in an account for a specific address.
    • decimals - Sets the decimal value of a token.
1 Like
  1. All wallets and application immediately know how to interact with tokens following ERC20 standard.

  2. BalanceOf function lets you get the token balance at a certain address. Another function is totalSupply which tells you how many tokens are issued.

1 Like
  1. As everyone can build smart contracts on top of Ethereum blockchain, to avoid any frictions and to have smooth operation from Exchange and wallet side, there must be a standard to have one single way to build applications. Everyone who wants to create smart contract with token like ERC20 has to follow specific guidelines and syntax.
  2. balanceOf() gives back the balance of a specific address
    approve() to give another address approval to transfer the a certain amount of token (allowance)
    transferFrom() to actually make the transfer after the first step of approval
    allowance() Provides the number of token allowed to be transferred
1 Like

1 the standards create atmosphere of consistency and interoperability that decreases friction and allows for an easier and more accessible community
2 the functions are (erc20) standard is to create token contracts that are frozen and unchangeable allowing for a standard on communication between contracts has a commonality of interfaces and features for etherium contracts

1.It increases efficiency, allowing wallets and exchanges to support any token using that standard.

balanceOf(): provides the number of tokens held by a given address.

transfer(): transfers a number of tokens directly from the message sender to another address. But it doesn’t work well when tokens are being used to pay for a function in a smart contract.

approve(): a token holder gives another address approval to transfer up to a certain number of tokens(allowance).

transferFrom(): take certain tokes from sender’s account and carry on its work.

doSomething(): to operate instructions.

allowance(): provides the number of tokens allowed to be transferred from a given address by another given address.

1 Like
  1. The benefits of setting a token standard like ERC20 is that all tokens using this standard are all written the same way. This is beneficial because right from launch all exchanges and all wallets will be able to support these tokens. Having a standards allows developer to be more efficient when deploying their tokens.
  2. totalsupply equals the sum of all balances
    balanceOf() function provides the number of tokens held by a given address
    transfer() function transfers a number of tokens directly from my address to a recipient address
1 Like
  1. The benefit of setting token standards is that developers can easily code their apps to communicate with all tokens in the same way. Wallets, exchanges and apps can be coded once to execute the functions the same in all ERC20 tokens.

  2. Functions of ERC20 Token Standard Interface
    a. balanceOf() - Provides the number of tokens held by the given address.
    b. transfer() - transfers a number of tokens directly from the message sender to another address.
    c. approve() - step 1 of 2 in the process of paying for a function in a smart contract. This function approves an address to transfer a number of tokens. This is known as allowance.
    d. transferFrom() - step 2 of paying for a function in a smart contract. Once the approval function has been executed transferFrom() will attempt to transfer the requested amount.

1 Like

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

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

    “totalSupply()” The first function gives a number as an output. This number is
    the total supply of the token.

    “balanceOf()” The second function takes the address of an owner as the input and gives the balance of the users as output.

    “allowance()” This function takes in the address of the tokenOwner and the spender and
    gives as output, the number of tokens allowed to be transferred from a given
    address by another given address.

    “transfer()” This function simply takes in the address of the receiver and the funds which are to be sent to the account. It then gives a boolean output value which is either
    true or false.
    True means that the amount was transferred successfully whereas false means
    the amount could not be transferred.

    “approve()” With this function. You can approve someone to spend from your
    account. This function takes the address of the spender along with the coins to
    be spent as the input and tells whether the transaction was a success or a
    failure.

    “transferFrom()” This function takes in three inputs — the address of the sender, the address of the receiver, as well as the number of tokens to be transferred. It again
    gives an output to notify the success or the failure of the transfer.

ERC20 Token Standard: A Beginners Guide


Shivendra Misra

Shivendra Misra

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Standards allows various components of the space to easily interoperate with each other. For example any Wallet that can hold one particular ERC20 token can hold other ERC20 tokens because they follow the same ERC20 standards.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    function totalSupply() - returns the total supply of tokens
    function balanceOf() - returns the balance of a particular account.
    function transferFrom() - transfers token from one account to another.
    etc.
    etc.
    etc.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Because it is a sets a standard of rules and actions that a token must be able to implement. this allows the communication to be easier if everyone is using the same standard

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceof tells you how many tokens the account has
    transfer transfers a number of tokens directly from the message sender to another address

total supply- lets you know how me

1 Like
  1. Having a token standard like ERC20 is helpful in the way that it allows for common communication between places like wallets and exchanges. Everyone can easily use new tokens that are created because they are built from a common standard.
  2. The ERC20 Token Standard Interface can perform functions like
    totalSupply: tells how many of a token are in circulation
    balanceOf: tells the balance of a certain account
    transfer: lets ERC20 tokens be transferred to another address
    doSomething: carry out instructions
    allowance: specifies number of tokens to be transferred between accounts
1 Like
  1. All platforms (like exchanges or wallets) that are able to understand the ERC20 standard will be able to support the tokens.

  2. The main functions are:
    totalsupply() - sets the max amount of tokens
    balanceOf() - allows a smart contract to store and return the balance of the provided address
    approve() - approves adresses to withdraw instances of the token from the owner’s address
    transfer() - lets the owner of the contract send a given amount of the token to another address
    transferFrom() - allows a smart contract to automate the transfer process

1 Like
  1. The benefits of setting a token standard like ERC-20 is that all ERC-20 tokens function in the same way so all wallets and exchanges can support the tokens. Also ERC-20 tokens are able to communicate with each other.
  2. Functions include total supply which shows how many tokens are in circulation, balance which shows the balance in the address of the account, transfer which allows the transfer of tokens and allowance.
1 Like
  1. It makes communication between tokens and platforms easy. Efficiency and interoperability.
  2. totalsupply() gives how many tokens are in circulation. balanceOf(account) gives token balance for an account.
1 Like
  1. A benefit of setting a token standard like ERC-20 is that it can communicate with other already established ERC-20 tokens. Other benefits are that it will automatically be supported by wallets and exchanges that supports Ethereum wallet.

  2. totalSupply(), balanceOf(), transfer, and more

  1. By setting a token standard ERC20 we get the benefits of the standardization. That allow wallets and exchanges to be programmed to support any token using that standard. So ERC20= defines how we are PROGRAMMING the TOKENS
  2. Functions of the ERC20 = allow users to find out balances of accounts as well as to transfer them from one account to another under varying conditions.