Homework: ERC20

Homework on ERC20 token standard.

1. What are the benefits of setting a token standard like ERC20?
The benefits of setting a token standard like ERC20 is dat all tokens are programmed the same way. The functions one uses to program a token work exactly the same when programming another token. This makes the exchange of tokens more easy, allowing wallets to provide token balances for different tokens.

**2. What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply(): it gives an overview of how many tokens are in circulation.
balanceOF(): this shows how many tokens a certain adres contains.
transfer(): transfers an amount to a specified address from the owner of the contract
transferFrom(): specifies a from address, to address and a value to transfer
approve(): when called, the owner of the contract authorises the address to withdraw tokens from the owners address

1 Like

If you have standard, like ERC20, all exchanges or wallets can read and interact talking the same “language”.

  1. What functions are in the ERC20 Token Standard Interface and what do they do?
    Standard functions like totalSupply(),balanceOF(),transfer(),approve().
1 Like
  1. What are the benefits of setting a token standard like ERC20?

This is to help the ecosystem grow more quickly - if all tokens are ER20 then all wallets and exchanges or maybe other applications also can easily integrate all ERC20 tokens in.

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

There are a lot…
“balanceOf() 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”

etc

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

All exchanges and wallets can be supported on one platform.

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

They all use the same Total Supply and BalanceOf. Multiple entities are able to build on one network and communicate with each other.

1 Like
  1. having a standard allows wallets and exchanges to easily add all ERC20 tokens as they have common naming in their code -> all tokens are fungible

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. What are the benefits of setting a token standard like ERC20?
    it allows for wallets and exchanges to easily add tokens because they are fungible, or the same.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    there’s some examples like:
    balanceOf() number of tokens in an account/address
    transfer() for sending tokens from one address to another

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    After a token has been created, it can be traded, spent, or given to someone else. ERC-20 is the universal language that all tokens on the Ethereum network use. It allows one token to be traded with another.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    The functions are:
    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 th benefits of setting a token standard like ERC20?
    A standard provides specific communication which everyone can use easily.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Each token contract has a totalSupply function built in which checks how many tokens are in circulation.
    The balance function stores the amount of tokens which are held by a public address.
    The transfer function allows to transfer tokens to another public address.

1 Like
  1. Some of the benefits are that; it can interact with the entire ecosystem such as wallets, exchanges and the web because its a standard language for the network allowing for interoperability.

  2. balanceOf(address): gives the balance of the erc20 tokens of that address
    transferFrom() give
    totalSupply() says how many tokes are in circulation

1 Like

Standards enable all apps to integrate and talk to each other. This eliminates friction and unifies the tokens’ functionality and cohesion.
2.
totalSupply- Gives there total supply of the tokens.
balanceOf ()- Gives the balance of a certain account.
transfer()- Gives the address of the recipient and how much is to be sent.
approve()- Allows you to allow someone else to spend from your account.
transferFrom()- transfers tokens from a sender address to a receiver address.

1 Like
  1. With standard token can interact with many other tokens, wallets etc. that are in the same standard because they all speak the same language.
  2. Here is two expamples:
    totalSupply: Returns the total circulating amount of tokens
    balanceOf: Tells how many tokens exist in an account
1 Like
  1. The benefit of ERC20 standard are: It allows the wallet to provide balance to many deferent tokens. It allow exchanges to list many tokens by adding the token contract address. It also provide a standard for all token contract created in ethereum blockchain is the same.

  2. Functions in ERC20 token standard: a) totalsupply which provide the total amount of token in the contract address.
    b) balance0f which provide the amount of token held on an address.
    c) transfer function is use to transfer some amount of to token from one address to another address.
    d) approve function gives allowance detail of an amount of token to transfer from the holders address to another address.

1 Like

Homework: ERC 20

  1. What are the benefits of setting a token standard like ERC20?
    a. Standards provide rules and regulations to ensure a certain quality of procedures are maintained and adhered to, that are specific for the item the standard has been written for, standards provide a guideline to follow to implement something.
    b. If everyone adheres to the same Standard for instance in this case scenario ERC20, all tokens will adhere and maintain a certain standard and make them easier to use on different platforms.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf() This provides the number of tokens held by a given address
    transfer() Transfer a number of tokens directly from the message sender to another
    allowance() Provides the number of tokens that are allowed to be transferred
    Approval() Second step in transfer process
1 Like
  1. It would be easy to integrate them into products like exchanges. This also allows interoperability across different platforms that support the standard.
  2. totalSupply - returns total supply of token in circulation
    balanceOf - returns number of tokens in an address
    transfer - transfer tokens from one address to another
    approve - approves a token transfer
1 Like

Answers ERC20 token standard

1: What are the benefits of setting a token standard like ERC20?
The befenefit is, that every token created after a specific standard (like ERC20) can be used in the same way. Users of that token (e.g. exchange, wallet, smart contracts) know which operations are supported in the standard and can rely on the fact, that every token has implemented the operations. This leads to interoperability inside the ethereum ecosystem.

2: What functions are in the ERC20 Token Standard Interface and what do they do?
balanceOf(): Returns the balance of a given address
transfer(): Transfers tokens from one account to another
approve(): A Token holder can authorize the transfer of an amount of tokens to a defined receipient (usually a smart contract). This creates a so called allowance.
transferFrom(): After a transfer was approved using the approve() function, the approved address (smart contract) can then withdraw the approved amount of Tokens from the approving address.
allowance(): Returns the allowances of a specific address. This can be used by a smart contract to check wether an address has provided allowance of enough tokens that can be used for execution.

2 Likes
  1. ERC20 standard defines how a token is programmed. It allows ease for exchanges and wallets to read them if they all have a similar standard program format. Its allows fungibility of tokens.

  2. https://ethereum.org/en/developers/tutorials/understand-the-erc-20-token-smart-contract/

function totalSupply() external view returns (uint256); The monetary policy. Total in circulation.

function balanceOf(address account) external view returns (uint256); Balance of given address.

function allowance(address owner, address spender) external view returns (uint256); Are there enough tokens to perform the smart contract.

function transfer(address recipient, uint256 amount) external returns (bool); from Account A to B.

function approve(address spender, uint256 amount) external returns (bool); Holder approves amount of tokens to the smart contract.

function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); The smart contract withdraws the tokens from the sending address.

2 Likes

1.With the token standart there are set of rules how everything operates.And the ERC20 token standart is easily useful for every participants.
2.Balance/Total supply

  1. In this way, exchanges, wallets, web servers and smart contracts are programmed to support any token using the same standard so the admin friction is reduced and the network is much more effective and efficient than having each token with their own particular code format.

  2. totalsupply(); it gives you the total of all the existing tokens of a given kind on the network

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

doSomething(); executes an action

approve(); approves an action

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

2 Likes
  1. ERC20 is a standard uses to program smart contracts, meaning all things are created the same–allowing all new tokens to be accepted by all exchanges and all wallets.
  2. -BalanceOf( ) – provide the balance of tokens held by an address; all address can be queried on the blockchain.
    -TrnasferOf( )- transfers a number of tokens to a given address, and since there are no checks, users should double check to ensure the address is accurate.
    -Transfer ( ) – used to send tokens from one address to another, but doesn’t work well when paying for functions of a contract.
2 Likes