Homework: ERC20

  1. What are the benefits of setting a token standard like ERC20?
    Token standards ensure the largest number of exchanges, wallets, nodes, etc, can consume, expose and interoperate with a given token (or a great many tokens). This yields an efficiency on the part of the developer but, possibly even more profound, is that it produces efficiencies in the economy itself, reducing friction among parties (be they systems, individuals or otherwise).

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    function name(): Returns the token name.

function symbol(): Returns the token symbol (eg, ETH).

function decimals(): Returns the number of decimals used by the token (effectively defining the level of divisibility supported by the token).

function totalSupply(): Returns the total number of this token in existence.

function balanceOf: Returns the current balance of the provided address.

function transfer: Transfers a specified value (in tokens) from one address to another.

function transferFrom: Similar to the transfer function, but it allows a contract to transfer tokens on behalf of a party.

function approve: Allows a specified address to withdraw from your account multiple times, up to a certain amount.

function allowance: Related to the approve function, allowance returns the amount up to which some account B is permitted to withdraw from account A (through multiple withdrawals).

2 Likes

Homework 1/30/21 ERC20

  • What are the benefits of setting a token standard like ERC20?
    The benefits of a token standard include ensuring interoperability and consistency with programmable ERC20 smart contracts on the ETH chain platform. This allows for consistent, standard code (communication) that is recognizable and effective when setting up a wallet or sending a new project/smart contract/cryptocurrency to a DEX

  • What functions are in the ERC20 Token Standard Interface and what do they do?
    The 6 functions in the ERC 20 Token standard Interface:

balanceOf()
Used to get the token supply of a specific ERC-20 token.

totalSupply()
Keeps track of the token balance in each Ethereum wallet.

transfer()
Upon token creation, this function can send all the tokens to one wallet or distribute them to ICO investors.

transferFrom()
Enables token holders to exchange tokens with one another after the initial distribution occurs.

approve()
Used to ā€œapproveā€ other accounts to withdraw a certain amount of tokens from the account calling the function.

allowance()
After approve() is used, allowance() is used to see the amount of tokens the approved account is allowed to withdraw from the original account.

2 Likes
  1. What are the benefits of setting a token standard like ERC20?
    All exchanges can work with every token if they have implemented the ERC20 token.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply gives the maximum number of tokens that exist.
    balanceOf gives the account balance

1 Like

1. What are the benefits of setting a token standard like ERC20?
For wallets and exchanges it is less work do to because they can handle all tokens in the same way if they are programmed in the same way. There are not a ton of different tokens with different programs types.
2. What functions are in the ERC20 Token Standard Interface and what do they do?
transfer() = transfer tokens from one address to another address
balanceOf() = check the balance of an address
approve() = give permission to another address to take a defined amount of tokens
transferFrom() = take tokens from address, when approval is given

2 Likes

The ERC20 token standard allows people to create tokens via token contracts that run on the ethereum network. The token creators (projects) don’t have to develop a mining community, exchanges can list the token without effort and wallets can interact with them in a standard way. This seriously reduces the expenses associated with creating a token and improves usability dramatically.

The functions defined in ERC20 are balanceOf, totalSupply, transfer, transferFrom, approve and allowance - the spec I found. These functions are used to display balances, transfer balances between accounts and ensure funds are available (allowance) prior to triggering a payment event.

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

Easy to interact between the wallets and exchanges

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

Example: totalSupply() -> total supply
balanceOf(account address) -> balance

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Simpler to engage transactions for wallets if a token standard is set.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf()- states balance of ERC20 tokens
    totalSupply()- total amount of existing tokens
    transfer()- transfers token

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    The support and integration of exchanges and wallets is easier and much quicker when setting a token which is standarized by ERC20.

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

There are many functions in the the ERC20 standard interface for example:
name() - returns name of token,
symbol() - returns symbol of a token,
decimals() - returns the number of decimals the token uses,
totalSupply() - returns the total token supply,
balanceOf(address _owner) - returns the balance of the specific address which is the argument of a function in brackets
transfer(address _to, uint256 _value) - transfer _value amount of tokens to ā€œ_toā€ address
etc.

1 Like

1. What are the benefits of setting a token standard like ERC20?
Ans 1: By setting a token standard like ERC20 ensures that all the tokens have the same parameter conventions and all the applications are able to seamlessly communicate with each other to integrate and inter-operate with each other. This is what creates efficiency and avoids friction with each other.

2. What functions are in the ERC20 Token Standard Interface and what do they do?
Ans 2: So far in the instruction video we have:
1. Function - totalSupply() - access the total amount of token supply
2. Function - balanceOf() - access the balance of a particular address.
:pray: :heart: :pray:

1 Like
  1. What are the benefits of setting a token standard like ERC20? It creates standards. Having standards makes it so more projects can go forward and the crypto space can grow… it allows exchanges and wallets to be able to communicate with these tokens since they have the same ā€œstandardā€ of language within them.

  2. What functions are in the ERC20 Token Standard Interface and what do they do? There is function totalSupply that says how many token are in circulation, there is balanceOf - the address of account and it will show the balance of those tokens, transfer - function for transferring tokens.

1 Like
  1. It allows for interoperability across all tokens that are also built using this standard.
  2. balanceOf() gives the balance of a specific address
    transferFrom- specifies a sender address, receiver address, and a value to transfer
    totalsupply - returns the total supply of the token
    transfer - transfers an amount to a specified address
1 Like

What are the benefits of setting a token standard like ERC20?
It reduces the friction to integrate new tokens to the space, improving the interoperability and compatibility of the system, by defining all the required functions that wallets and exchange platforms will invoke in order to operate adequately with this token, without implementing any token-specific logic.

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

  • balanceOf(address): Returns the amount of tokens that the given address has.
  • transfer(address, amount): Sends the given amount of tokens to the specified address, deducting them from the sender’s address.
  • approve(): This function is invoked by a holder address, to authorize another address to withdraw up to a certain amount of tokens from the holder’s account (this amount is called allowance). It is used, for example, to pay for a service defined in a smart contract.
  • transferFrom(): This function is used to withdraw a given amount of tokens from a certain address. This will fail if the address hasn’t enough token in its balance, or if the address allowed less tokens that the amount that is being charged. For instance, the smart contract may charge the address a certain amount of tokens to provide a service.
  • allowance(): Provides the amount of tokens that a holder account approved to transfer to a target address. This does not guarantee that the address actually has enough tokens in its balance, so people should check both allowance and balanceOf before invoking transferFrom.
1 Like
  1. the erc20 standard helps to create dapps and applications in a standartized way, so they can communicate with each other.
  2. Total Supply = how many tokens are in supply
    BallanceOf = For example a wallet show balance
    transferFrom- transfer function
    approve- are enough token here
1 Like
  1. It makes the whole space able to communicate with each other.
  2. balanceof-provides the number of tokens held by a given address
    transfer-transfers tokens from one address directly to another
    allowence-provides the number of tokens allowed to be transferred from a given address by another given address
    approve-when called the owner of the contract authorises the withdraw tokens to another address
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It’s supported by all the users of the network. Makes the development more efficient.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf() - checking the balance of the provided address
    totalSupply() - calculate and returns the total number of tokens in circulation
    transfer() - lets the owner of the contract send tokens
    transferFrom() - allows the owner automate the process of sending the tokens on behalf of the owner.
    approve() - owner of the contract approves the given address to withdraw tokens
    allowance() - returns the current approved number of tokens by an owner to a specific delegate, as set in the approve function.

1 Like

Indeed, but could you please describe what those function do? :slight_smile:

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

Carlos Z.

  1. What are the benefits of setting a token standard like ERC20?
    It provides a mechanism for tokens to be created in a manner that supports the network and blockchain while also allowing exchanges and wallets to easily support the token.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf() function provides the number of tokens held by an address
    transfer() sending tokens from one user to another
    allowance() function provides the number of tokens allowed to be transferred from a given address by another given address

1 Like
  1. Setting token standard like ERC20 allows the ecosystem to function easiliy. When we have a standard, all exchanges and wallets will be supporting that token from day one.

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 the message sender to another address
allowance() function provides the number of tokens allowed to be transferred from a given address by another given address

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

A token standard creates a base for all other tokens to work off of. It creates consistency and less confusion.

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

totalSupply() = gets the total supply of tokens.
balanceOf() = finds the balance of said address.
transfer() = transfers funds from one account to another.
approve = approves the smart contract function.
doSomething() = operate instructions.
allowance() = amount allowed to be transferred to another address.

1 Like

ERC20 sets a standard for tokens on the Ethereum blockchain. These tokens can then take advantage of all the infrastructure that already exists on the Ethereum blockchain and also be compatible with peripheral support software such as wallets and exchanges.

The functions of the ERC20 token are

name - the name of the token
symbols - the abbreviated name of the token of token ā€˜ticker’
decimals - defines how divisible a token can be and refers to the number of digits displayed on screen after the decimal place, since Ethereum only uses integers
totalsupply - the total supply of the token in circulation
balanceOf( ) - the number of tokens held by a given address
transfer( ) - tranfers tokens directly from one user to another’
approve( ) - allows the transfer of a certain number of tokens
allowance( ) - provides the number of tokens
transferfrom( ) - allows a smart contract to automate the transfer process and send a given amount of the token on behalf of the owner.

1 Like