Homework: ERC20

  1. What are the benefits of setting a token standard like ERC20?
    So that everyone knows how to communicate with the token/contract. In that way all applications like wallets support it automatically.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply - get total supply
    balanceOf - get balance for an address
    transfer - trasfer tokens from one address to an other
    approve - works together with transferFrom function to execute a contract
    transferFrom

1 Like

So that all Exchanges and all wallets can talk to each token correctly and efficently.

BalanceOf
transfer()
approve()
transferFrom()
allowance()

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

It enables anyone who is creating a token on the ETH network to have a set of uniform best practices. By following the ERC-20 standards develops can be confident that there token will be compatible with other ERC-20 projects.

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

function
total supply: set the total supply of a token
balanceOf(address): is a function that request the balance of a specific address
transfer(): a function that directs the amount transferred from one address to another
More will be covered later

1 Like

1 What are the benefits of setting a token standard like ERC20?
The benefits of a token standard ERC20 is that any coin/token is first of all fungible allowing equal and efficient navigation’s to and from wallets, exchanges and ICO’s as they share the same computing conventions in the code standard. Eg, function balanceOf(address account),
function transfer(address account) etc.

1 Like

Standardization, if implemented beyond a joke I saw in a Dilbert cartoon, is a consolidated, coordinated way of accomplishing a task. In this case it is communicating asset ownership.

The functions in ERC20 is:

  • totalSupply: Calculates and returns the total amount of the token that exists in circulation.
  • balanceOf: Allows a smart contract to store and return the balance of the provided address.
  • allowance: Provides the number of tokens allowed to be transferred from a given address by another given address.
  • transfer: Lets the owner of the contract send a given amount of the token to another address just like a conventional cryptocurrency transaction.
  • approve: The owner of the contract authorizes, or approves , the given address to withdraw instances of the token from the owner’s address.
  • transferFrom: Allows a smart contract to automate the transfer process and send a given amount of the token on behalf of the owner.

2 Likes
  1. What are the benefits of setting a token standard like ERC20?
    Benefits are it can be used in other exchanges
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    1) totalSupply() gives the number of tokens exist
    2) balanceOf() gives the account balance of a given address
    3) transfer() transfer number of tokens from sender to another addresss
    4) transferFrom(): take certain tokes from sender’s account and carry on its work.
    5) doSomething(): to operate instructions.
1 Like

1.The benefits of having a ECR20 standard is that all tokens created can then easily added to generic wallets and exchanges and other 3rd party products that use this standard

2.The ERC20 is an ethereum smart contract
It has functions with in it to direct and move units of value
balanceOf () provides the function of the number of tokens in an address
transfer() function to transfer tokens from one address to another
dosomething() and do function allows multiple operations a loop is do something multiple times say 10 x
approve() function if a parameter has been met go to the next stage
transferFrom() from approve () an action to move tokens
allowance() set limits on the transfer amount from one address to another
totalSupply() the number of tokens

1 Like
  1. Using an ERC20 standard allows exchanges and wallets to work with the tokens that are deployed upon the Ethereum blockchain. Without this standard it would be very difficult to cajole the wallet makers and exchanges to implement your OWN standard.

  2. Balance function allows to see the balance of any given address. Transfer functions ensures the possibility of sending tokens from one address to another. Approve and transfer from functions allow the contract to run an operation where a certain programmed action can occur ONLY when there is enough “money” present in the account of the sender to execute the operation ( When John wants to send 100 John tokens, it costs 5 John’s to execute. If there is more than 105 XJH tokens, the transaction will work )

1 Like
  1. Standartization allow wallets to provide token balances for different tokens and also increases efficiency

  2. totalsupply - sum of all balances, total supply of tokens
    balanceOf - balance of tokens held by a specific address

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Allows wallets and exchanges to implement support more easily for standardised tokens. Using standard functions enables consistent and faster development of new token economies. Can help adoption by providing a consistent user experience.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf() returns number of tokes held by an given address.
    transfer() transfers given number of tokens from one address to another.
    approve() authorises the transfer of a number of tokens
    allowance() queries a given address for the maximum number of coins allowed for a transaction
    totalSupply() returns the sum of all balances

1 Like
  1. So we can build applications that can understand each other

  2. ERC20 tokens are fungible meaning each token is interchangeable and have the same value

1 Like

1. What are the benefits of setting a token standard like ERC20?
All tokens built on the standard have a uniform interface so they automatically become compatible with existing exchanges and wallets on day 1. Interopability FTW!

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

totalSupply: returns the total amount of tokens in existence
balanceOf: returns the token balance of a given account
transfer: moves tokens from one account to another
transferFrom: allows smart contracts to transfer tokens on behalf of a user
approve: allows a contract to withdraw mulitple times from an account up to a given amount (like preauthorized payments)

2 Likes
  1. Tokens standards are very useful and one of them is the ERC-20. Setting a pattern of developing of smart contracts or even new currencies makes it easy for connection between wallets and exchanges. Another benefit of the use of these patterns is that if the project is open source anyone can analyse the code and understand it knowing the “root code” ERC-20.

  2. totalSupply() it returns the total token supply
    balanceOf(address_account) which returns the balance of a specific account.

1 Like
  1. When all tokens operate on the same standards, wallets and exchanges can interact easily.
  2. function totalSupply() = total number of tokens, function balanceOf() = account balance.
2 Likes
  1. So that all the tokens built using ERC20 standard are inter-operable. Supported by exchanges and wallets without much changes.

  2. functions such as totalsupply, transfer, balanceOf, etc that are essential for tokens.

1 Like
  1. The benefit is interoperability. By having one standard, all wallets and exchanges that already work with tokens based on the ERC20 standard, can by default interact with any new ERC20 tokens as well. It also makes it easier to review code, and to create new ERC20 smart contracts.

  2. The following functions & parameters are part of the ERC-20 standard:
    Parameters:

  • name the full name of the contract/token
  • symbol the ticker symbol, usually 3 to 4 characters in length
  • decimals the divisibility from 0, which, however, is calculated backwards as 10^x. Where 10^x defines the full unit of the token
  • totalsupply the balance of tokens in all addresses
    Functions:
  • balanceOf query the balance of a particular address
  • transfer transfer a number of tokens from one address to another
  • doFunction executes a specified function
  • approve + transferFrom tells the smart contract to transfer an amount of tokens. any amount can be set, disregarding the balance. if the balance is insufficient the execution will fail
  • allowance sets a maximum allowance of tokens that can be transferred from an address. again, balance is disregarded
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Setting the Standard allows for the interoperability of tokens with exchanges and wallets.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    The functions perform actions. Examples are
    function totalSupply () this number is the total supply of the token
    function balancesOf(address of account) returns the balance of an account address

1 Like
  1. helps keep the industry compatible with other each other so things like wallets can work.
  2. total supply- how many token will there be
    balanceOf- show account balance
    transferFrom- is this a recieve function?
    approve- send tokens?
    allowance- return a set number of tokens from a spender to the owner?
1 Like
  1. The benefits for a token standard like ERC 20 is to have an ecological environment where all wallets and exchanges can inter-operate within a set of well defined rules. This also will avoid hapharzard developments of the eco system where it will stiffer the progress of ERC 20 tokens.

  2. " Functions " are programming codes to be called upon to execute a certain task. In ERC 20 standards, these functions are conventions to be used by all participants in the eco system to avoid confusions and break down in software communications.

1 Like

1.) ERC20 Standard allows token creation in “the same” way - means, that naming conventions, functions and code usage are easy readable and usable/implementable for others/interfaces - eg. wallets and exchanges.
2.) There are many standard functions like:

  • balanceOf : shows the balance of an (wallet)address.
  • transfer : send an amount of tokens from the sender/message address to a receipient address.
  • totalSupply : the whole amount of tokens
  • allowance : the amount of tokens, which are allowed to transfer - and has to be doublechecked with the balance of the token holder in order to emit a transfer.
  • approve and transferFrom : are a used in a two way process - in step 1, the token holder gives an other address an approval to transfer a amount of token (allowance). In step 2, the transferFrom can be used in a function, which acts like a “promise”? (as I understand) to varify the allowance and the balance - if there is not enough balance or allowance to transfer a given amount of tokens, the function will fail.
2 Likes