Homework: ERC20

1. What are the benefits of setting a token standard like ERC20?
The benefits of setting a token standard like ERC20 allow all crypto wallets to be able to read and understand that it is an incoming ERC20 token as the standard reads the same as any other ERC20

2. What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply() represents the amount of tokens in circulation
balanceOf() provides the number of tokens held by a given address (public)
transfer() transfers a number of tokens directly from the message sender to another address.
transferFrom() a token holder gives another address approval to transfer up to a certain number of tokens
approve() The token holder then uses this function to provide that information

3 Likes
  1. function totalSupply() provides the total numbers of tokens in circulation
    function balanceOf() provides the balance of tokens in the account address specified
2 Likes

1. ERC-20 has many benefits, including 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.

2. ERC20 Functions;

  • 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.
    approve() and transferFrom() are two functions that allow the above scenario to work using a two-step process. :speech_balloon:
2 Likes
  1. What are the benefits of setting a token standard like ERC20?
    It gives a common standard that everyone can understand and communicate with. This allows for less friction and makes things more efficient. Otherwise it would take time and work for each wallet, exchange, program, etc to become compatible with an standardized token.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    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.
    approve() -a token holder gives another address (usually of a smart contract) approval to transfer up to a certain number of tokens, known as an allowance.
    transferFrom() -moves a certain number of tokens from one account to another.

1 Like
  1. Wallets and exchanges can run fungible tokens built on the same standards without needing to upgrade or change their own software, and having people build on one standard propelles the industry forward.

  • totalSupply - Fetches the total token supply.
  • balanceOf - Fetch the balance of an address linked to the token.
  • transfer - Transfer amount of tokens from contract to another address.
  • transferFrom - Transfer amount of tokens from address to address.
  • approve - Approve withdraws.
  • allowance - The amount left to spend/withdraw.
1 Like
  1. By having a standard it allows all wallets and exchanges to support all tokens that are created with that standard. It also allows for developers to have a universal language to interact with the Ethereum network.

balanceOf () provides the number of tokens held by a given address
transfer() transfers a number of tokens from the message sender to another address
approve() allows a token holder to send to another address an approved amount of tokens, known as an allowance.
transferFrom() takes an allowed amount from a users allowance as part of the contract’s operation.
allowance() allocates the number of tokens that is allowed to be transferred from an address by another address.
doSomething() is for executing a specific instruction

1 Like
  1. All wallets and application immediately know how to interact with tokens following ERC20 standard.

  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 benefit of using ERC20 is that all wallets and accounts will recognize you easily which is good because then you don’t have to put in more or extra work to be recognized or supported.

  2. balanceOf(address account)

1 Like
  1. ERC20 makes transferring between wallets easy and universal.
  2. Total supply, balance, allowance, transfer, approve, transfer from.
  1. If all tokens function in the same way, exchanges and wallets will be able to support them from day one.
  2. There are many functions in the ERC20 standard. Here are just a few:
    function totalSupply () - it gives you the amount of tokens in circulation
    function BalanceOf (address account) - tells you how much the balance of the account you specified is.
    function transfer (address recipient, uint256 amount) - transfers tokens from one account to another
1 Like
  1. Setting a standard allows seamless integration without a lot of processing power for all wallets, exchanges, and future builds of such software and protocols.

  2. balanceof() = checks balance of given address.
    transfer() = transfers given number of tokens from the address accessing the function.
    approve() = is how a token holder approves a set number of tokens for an outside wallet to initiate transfer but only up to that amount.
    transferfrom() = how a wallet can initiate transfer of owed funds from a wallet that has already approved the amount.
    Allowance()is another way to allow transfer of funds but these can excees an addresses balance.

1 Like
  1. The benefits of standardization are increased efficiency and compatibility

  2. The standard functions in the ERC20 Token Standard Interface are:
    totalSupply() - total coins in circulation
    balanceOf() - total balance in the specified account
    transfer() - tx a number of tokens from sender to another address

1 Like

What about the others? could you please describe them also? :nerd_face:

Carlos Z

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

It allows a better communication between the smart contract using the same standard. Additionally, it allows compatibility between wallets and exchanges using the same token standard.

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

for instance, balanceOf() provides the number of tokens

and allowance() provides the number of tokens which could be transferred

  1. A standard allows the creation of different tokens that have some common characteristics, which makes easier for software as wallets or exchanges to operate with different tokens.

  2. Total supply, transfer and balance of an address.

  1. When you have a token standard like ERC20 you are creating a program language that is compatible across various projects. This means that coders can work from a template and not have to invent their own standards in each component of their code. It also makes it much easier for others to read and understand what a particular code is designed to do.

  2. Ivan showed us various functions, such as: transferFrom which indicates the address to take tokens from and where to send them to; approve which grants the transfer of tokens; balanceOf which provides the account balance of a particular address.

2 Likes
  1. Standards allow for development from more places & people. If everyone uses the same standards then the industry as a whole moves forward and grows at a much faster pace. As an example the ERC20 standard deals with the development of fungible currency, coins, tokens. Objects written to this standard can easily be understood by current exchanges and wallets that are already in existence.

  2. an example of a functions in the ERC20 standard:
    totalSupply() - returns the total amount of tokens in circulation.
    allowance() - gives the number of tokens that can be transferred.
    transfer() - uses the address of the receiving account and the amount of funds to move to that account.
    part of this standard means that the syntax of these reserved words are critical and can not be deviated from.
    There are many more defined functions, but the idea is that the names and behavior of these statements are defined as functions and to be used in an identical manor through out the industry. If you are participating in a game with others, there are rules that govern your interactions. These standards are rules if you want to participate in this game and get along with others. You can create your own rules but then you will be playing in a different game (probably by yourself for a good while)

2 Likes

1. What are the benefits of setting a token standard like ERC20?
It shows the format for all new smart contracts so all new smart contracts are programmed in the same way and everyone understands

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

  • totalSupply: Returns the total circulating amount of tokens.
  • balanceOf: ï»żReturns how many tokens exist in an account.
  • transfer: ï»żTransfer an amount of tokens from token owner’s account to another account.
  • approve: ï»żA token owner can approve for spender to transferFrom tokens from the token owner’s account.
  • allowance: ï»żReturns the amount of tokens approved by the owner that can transferred to the spender’s account.
  • transferFrom: ï»żAllows a spender account to transfer an amount of tokens on behalf of the token owner to another account.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    They are easily and quick to understand. This eases the integrity into exchanges.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply() - Definition how total supply of tokens existing in circulation
    balanceOf() - Allows the smart contract to store and provide balance of the provided address
    approve() - Owner of the contract authorizes, the given address to withdraw instances of the token from the owner’s address.
    transfer() - let the owner of the token send a specified amount to another address.
2 Likes

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

Yes sir, but could you please describe what those functions do?

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

Carlos Z.