Homework: ERC20

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

All wallets and exchanges can read and execute code ERC20 on the ethereum network, this negates the need for a unique support system for every coin or smart contract. it is the economy standard.

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

function balanceOf() this function show the amount of tokens on a target addres

function transfer() send x tokens from address A(message sender) to address B

function approve() this function is sent by the token holder to allow for the transfer of his tokens and the amount, called allowance.

function transferFrom() once allowance is established this function can initiate the tx, if there are not enough tokens it will fail however.

function allowance() this function sets the amount of tokens that can be send to this address, amounts can be exceeded.

1 Like
  1. Smart contracts can often have their own currency. The standard of ERC20 ensures that all tokens running off the ethereum network is universally recognized and transacted by all exchanges and wallets.
  2. totalsupply represents the max available tokens.
    transfer represents a transfer of tokens to a separate account.
    balanceOf represents the balance of available tokens
1 Like
  1. The ERC-20 token standard allows exchanges, wallets, new projects, etc. all use the same coding conventions and makes the entire space more cohesive/easier to work with. (Interoperability/Consistency)
    2.ERC-20 Functions:
  • balanceOf()
    – Shows the number of tokens held by selected address
  • transfer() / transferFrom()
    – transfers a specified # of tokens to another address
  • approve()
    – Allows the token holder to provide necessary info for transaction
  • allowance()
    – Specifies the maximum number of tokens a smart contract can take/use from account.
1 Like
  1. Having a set code/standard of code allows for it to be added to all exchanges easily
  2. balanceOf() and totalsupply gives balance of account and total amount of fungible tokens
1 Like
  1. The standardisation allows for all ERC20 tokens to communicate and interact with each other, thus improving efficiency.
  2. An example of a standard function is totalSupply which gives the total number of available tokens.
1 Like
  1. What are the benefits of setting a token standard like ERC20? By setting a standard it allows programs ( like wallets) to be able to interact with any token developed off the standard without having to communicate differently to each token.
  2. What functions are in the ERC20 Token Standard Interface and what do they do? 1) TotalSupply() - how many tokens are in circulation, BalancOf()- returns the balance of an account. 2) Transfer() would transfer a value between accounts, 3) allowance() shows the possible tokens that can be transfered. etc.
1 Like
  1. By having the same naming conventions, same parameters and same standards, all wallets know how to interact with the ERC20 tokens.
  2. a. totalsupply() - returns total available tokens
    b. balanceOf() - returns the balance of the respective account
    c. transfer() - transfers specified amount from one account to another
    d. allowance() - specifies the amount that a specific adress/account can spend from the mentioned account
1 Like
  1. What are the benefits of setting a token standard like ERC20?

All the tokens are programmed the same way so it makes it more efficient when you can use them seamlessly in exchanges and wallets.

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

The balance0f function tells you how many tokens are held in a given address. Anyone can query that in the public blockchain.

Transfer function transfers the tokens. This doesn’t work well with smart contracts though because it doesn’t have the details of which address sent funds and where.

Approve and transferFrom are used in smart contracts.

Allowance function provides how many tokens are allowed to be transferred from an address by another address.

1 Like
  1. Setting a Standard is like setting a common language for all of the computers, wallets etc.
    This reduces the confusion , brings more unity and makes the creation of smart contracts faster and easier.

  2. 2.1 Function totalSupply() - shows the total tokens in circulation.
    2.2 Function balanceOf() - shows the balance of a certain address ( The decentralization makes this possible)
    2.3 Function transfer() - transfers tokens from one address to another.
    2.4 Function approve() - allows smart contracts to receive an ,x’’ amount of tokens.
    2.5 Function transferFrom() - can be used from the creator of the smart contract to receive tokens from other addresses.

1 Like

1 The RC20 token standard solves wallet storage, the cooperation of several smart contracts, exchanges, farming, collecting, games

2 balance, address of the account, total supply, transfer, doSometning

1 Like
  1. What are the benefits of setting a token standard like ERC20? A token abiding by a standard such as ERC-20 allows the token to be compatible with certain exchanges and wallets that already support this standard
  2. What functions are in the ERC20 Token Standard Interface and what do they do?

The 6 mandatory functions are:

Total supply: When this limit is reached, the smart contract will refuse to create new tokens.

Balance Of: It is a method which has to return how many tokens a given address has.

Transfer: It takes a certain amount of tokens from the total supply. It then gives them to a user.

Transfer from: This can be used to transfer tokens between any two users who have them.

Approve: It verifies that your contract can give a certain amount of tokens to a user. It takes the total supply into account.

Allowance: It is almost the same as “approve”. But it also checks if one user has enough balance to send a certain amount of tokens to someone else.

1 Like

[quote=“filip, post:1, topic:8440”]

  • What are the benefits of setting a token standard like ERC20? So that developers have a common platform to build compatible tokens.
  • What functions are in the ERC20 Token Standard Interface and what do they do?

ref:

function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);

1 Like
  1. When setting a token standard it allows ease of usability between wallets and apps. Programming is done in a unified way which allows communication of the token in a single way which makes adoption for that token immediate.
  2. Some functions are: balance0f()-provides the number of tokens held my an address.
    transfer()-transfers a number of tokens directly form the message sender to another address.
    allowance()-provides the number of tokens allowed to be transferred from one address to another
    approve()-provides approval for an address to transfer a certain amount of tokens to another address
1 Like
  1. What are the benefits of setting a token standard like ERC20?

The benefits to setting a token standard like ERC20 is it makes it so much easier for all applications to understand and communicate with each other as everything and everyone is using the same language… You extend the chances of moving forward together and growing like this exponentially, a bit like life, if your all different you end up with differences and getting nowhere quickly till you find common ground.

  1. 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. All exchanges and wallets will be able to support the tokens.
  2. totalSupply gives the total amount of tokens in circulation. balanceOf gives the balance of a particular address. Another function is transfer.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Setting token standards allows multiple tokens to be built on one coin and can be used within the ecosystem through multiple projects.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    A couple of the functions in the ERC20 standard are BalanceOf (Shows the balance of a wallet) and totalSupply() (Shows the total supply of a token at any given time).
1 Like
  1. ECR20 define standard function for comunication with your token. Utilization new token with ecr20 standard is based on erc20 definition not token specific rules.

  2. totalsupply, balanceof, transfer

1 Like
  1. Wallets and exchanges can communicate with the token right away. Programmers can easily program, read and understand what a smart contract / token is meant to do. Also it allows for multiple tokens can be built on the one coin.

  2. TotalSupply, balanceOf, transfer. The totalsupply looks up the total supply of a token. The balance calls the balance on the wallet holder and transfer transfers the token to another wallet.

1 Like

1. What are the benefits of setting a token standard like ERC20?
Setting a token standard allows all wallets and nodes to communicate using the same set of functions. It will then be easier to develop applications.

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

  • balanceOf() returns the balance of any given address.
  • transfer() is used to transfer tokens directly from the sender to another address.
  • approve() allows other parties to tranfer certain amount of tokens from your address
  • transferFrom() is used by others to take token within the allowance.
  • allowance() queries the amount of tokens that is allowed to be taken to any given address.
1 Like
  1. All tokens are programmed in the same way so that all exchanges and wallets are able to support them from day one.

totalSupply() - allows to calculate and return the total amount of the token that exists in circulation
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
transferFrom() - allows a smart contract to automate the transfer process and send a given amount of the token on behalf of the owner
approve() - gives another address approval to transfer up to a certain number of tokens
allowance() - provides the number of tokens allowed to be transferred from a given address by another given address

1 Like