Homework: ERC20

  1. What are the benefits of setting a token standard like ERC20?
    There are many benefits:
  • Setting standards help with the interoperability of tokens
  • It ensure they can be hosted by exchanges and wallets
  • It helps with scalability as repetitive use cases are captured in a standard for easy reuse
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
    function TotalSupply () = how many tokens are in circulation
    function balanceOf () = balance of the respective account
    function transfer (
) = for transferring from one account to another
1 Like
  1. It is more efficient to use a standard. If every token is programmed and deployed using a standard, exchanges and wallets can easily add and support the tokens.
  2. totalSupply() total amount of all existing tokens
    balanceOf() balance of the provided address
    transferFrom() describes what to transfer from where
    approve() gives approval to transfer up to a certain number
    allowance() the number of tokens allowed to be transferred
1 Like
  1. All ERC20 tokens are based on the same standards which makes them to easily communicate and support with wallets and exchanges. Increases efficiency and much less frictionless.
  2. totalSupply () gives maximum number/amount of tokens that exist.
    balanceOf () gives a public addresses’ balance of ERC20 tokens
    transfer () allows someone to transfer their ERC20 tokens to another public address
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    That all the applications can fully understand and communicate back understanding the
    language.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply: Checks the total supply of the token.
    BalanceOf: Shows you your balance in your wallet
    transfer : The way the coin is send to another adres

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    A. Having standards allows exchanger and wallets to support all ERC20 tokens.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    A. function TotalSupply() give the total number of tokens
    BalanceOf() gives the available balance for an account
    Transfer ()is used to send to other accounts
    IncreaseAllowance() used to increase balance in account.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    They Ethereum wallets to be programmed to hold any token programmed according to the standard. This makes it scalable.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Total supply - Gives an amount of the total supply of that particular token
    Balance - shows the balance of a given address
    Transfer - transfers the amount to the given address
    Approve - token holder gives approval for another address to transfer up to a certain specified allowance
    doSomething -instructions
    Allowance - number of tokens allowed to be transferred from one address to the other.

1 Like
  1. An ERC20 standard means that all exchanges and wallets can support those tokens. It also means it is a standard way to program and deploy.

  2. The balanceOf() function provides the number of tokens held by a given address.
    The transfer() function transfers a number of tokens directly from the message sender to another address.
    The approve() and transferFrom() are two functions that allow certain scenarios to work using a two-step process.
    The doSomething() function requires (X amount) Do tokens to operate.
    The allowance() function provides the number of tokens allowed to be transferred from a given address by another given address.

1 Like
  1. The benefits of using a standard are that all applications on the ETH network work from the same set of rules. ERXC20 allows a user to create Non Fungible Tokens.

  2. ERC20 attributes;
    -name- the title of the contract.

-symbol- broadly equivalent to a stock ticker, usually 3-4 characters all though no restrictions.

-decimals- how divisible a token can be; 0(not divisible)-18 (almost continuous). It is the number of digits that are after the decimal place when displaying token values. This can be a “humanizing factor” because it allows token contracts to define how they would like balances to be displayed to users. If the token represents an indivisible entity, such as a software license, the decimals are set to 0. If there are a fixed number of decimal places, set decimals to that number. If neither apply set decimals to the default 18. Total tokens = number of tokens x 10^(to the power of) decimals.

-totalsupply The only mandatory parameter. The sum of all balances.

Functions of an ERC20 contract allow users to check and transfer balances of accounts under varying conditions.

-balance0f() provides the number of tokens held by an address. Anyone can query the address’ balance as the blockchain is public.

-transfer() Transfers tokens from the message sender to another address. There are no checks made on the recipient address, so the sender must ensure the address is correct. This is fine for sending tokens between users, it does not work well when used to pay for a function in a Smart Contract. The SC has no information about where the funds were sent from.

1 Like
  1. Standards provide a common language for all tokens that can be understood by all wallets and other Ethereum applications
  2. I have never read the ERC20 standard so I do not know all of the functions. However, there is certainly functions for calling for the total supply of tokens as well as the balance of tokens. I would also expect to see all the mathematical functions, such as add, subtract, multiply, etc. The common functions enable the common language.
1 Like

1- Standards define how the tokens should be programmed so they function the same way, that allow for the tokens to be able to be supported by existing wallets and exchanges from day one.

2- Total supply: gives you how many tokens are in circulation.
Balance Of: it gets balance of wallets
Transfer: for transferring tokens between wallets
And there are many more. They are name the same in every token, the have the same parameters conventions
 so that applications can talk with each other.

1 Like
  1. ERC20 is a set of standards that defines certain rules for issuing tokens on the Ethereum network. With an universal standard, new tokens can be put on an exchange or transferred to a wallet automatically without the need for each exchange or wallet having to accommodate for each unique token’s code.

  2. The balanceOf() function provides the number of tokens held by a given address.
    The transfer() function transfers a number of tokens directly from the message sender to another address.
    The approve() function is used by the token holder to give another address approval to transfer up to a certain number of tokens.
    The transferFrom() function is used to take up to the allowed number of tokens from a user’s allowance as part of a smart contract’s operation.
    The allowance() function 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 insures that everyone uses the same structure, naming conventions, parameter conventions so that it all can easily integrate and operate with one another. It lowers friction and increases efficiency and economies of scale.
  2. There are numerous functions in the ERC20 Token Standard Interface including totalSuppy() and balanceOf(address account)
1 Like
  1. What are the benefits of setting a token standard like ERC20?

It allows tokens that are created using the ERC20 standard to freely interact with all exchanges and all wallets. That ultimately allows a lot of innovation to take place on the Ethereum network since anyone can create an ERC20 token and it any exchange or wallet would work with it.

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

balanceOf () - shows the balance of tokens held by an address.

transfer () – transfers tokens directly from one address to another.

approve () – gives an address approval to transfer a certain number of tokens.

transferFrom () – allows tokens to be transferred from an account to perform a function.

allowance () – gives the number of tokens that are allowed to be transferred from an address by another address.

1 Like
  1. Setting a token standard allows for all wallets and exchanges to support any token on the same standard.

a) balanceOf() returns the balance of a given address.
b) transfer() will send tokens to a specified address.
c) allowance () returns the amount of token allowed to be transferred from an address to another.
d) approve () permits another address to withdraw tokens from another address up to a specified amount.

1 Like
  1. ERC20 standard provides a common set of features and interfaces for token contracts in Ethereum, allowing easy compatibility and interoperability between different smart contracts.

  2. ERC20 Token Standard Interface defines the following functions:

  • balanceOf(): allows a smart contract to store and return the balance of the provided address;
  • totalSupply(): allows an instance of the contract to calculate and return the total amount of the token that exists in circulation;
  • 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 and send a given amount of the token on behalf of the owner, without is intervention;
  • approve(): the owner of the contract authorizes the given address to withdraw instances of the token from the owner’s address;
  • allowance(): provides the number of tokens allowed to be transferred from a given address by another given address.

Beside that ones, it also has a few optional fields like name (the long name by which the token contract should be known, «Ethereum»), symbol(symbol by which the token contract should be known, «ETH»), and decimals (the number of decimal places with which it will be measured).

1 Like
  1. standartization makes wallets, exchanges etc to comminicated between themselves in a common expected way, language and understandind each other
  2. totalSupply - number of tokens supplied; balanceOf (address_account) - the avalable tokens held in that account;
1 Like

Benefits are that functions can easily interact with each other as they are all written the same in the code.
The functions in the Erc20 code tell the balance, the supply, the function for transferring.

1 Like
  1. ERC20 and other token standards allow for greater scalability of smart contracts. Using them allow to set some specific rules and boundaries that enable every user to be aware of the content of the SC as well as be able to verify its features, but also to program their own versions of Tokens based on that standard. It also allows interoperability between blockchains, because running a standardized SC on different blockchains is easier when they are all sharing some basic features. All of this make it more efficient and reliable, because all similar tokens will be structured in a shared, well-defined way, and it makes it easier for developers to work on such Tokens.
  2. The main functions on an ERC20 Token are: Total Supply, Sender, Allowance, Transfer, Approve and Receiver.
    “Total Supply” defines the total amount of tokens that particular Token has on the market at a given time.
    “Sender and Receiver” functions specify the actors of the transaction.
    “Allowance” defines the number of tokens that are allowed to be transferred from an address by a specific, different one.
    “Transfer” function enables a smart contract to perform the transfer process from an account to another.
    Through the “Approve” function, the owner of the SC authorizes a specific address to withdraw instances of the token from its own address.
1 Like
  1. What are the benefits of setting a token standard like ERC20?

People creating new tokens just need to stick to the standard. It removes friction when creating smart contract applications. It also allows applications (i.e: wallets) to read any token following the standard.

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

Among others:

name() --> name of the token.
totalSupply() --> returns the maximum number of tokens that exist for the specific smart contract.
balanceOf(address tokenOwner) --> returns the balance of an specific address.
transfer( address destination, uint256 numberOfTokens) --> transfer numberOfTokens tokens to address destination.

1 Like
  • What are the benefits of setting a token standard like ERC20?
    ERC20’s is a Token standard which is supported by all wallets in the Ethereum Network.
  • What functions are in the ERC20 Token Standard Interface and what do they do?
    The ERC20 Token Standard Interface has many features that are all present in all ERC20 tokens. Basically a universal code to help “solidify” all ERC20’s together to be coded in a certain way.