Homework: ERC20

  1. A stoken standard makes programming quicker, usable by many exchanges and wallets.
  2. The functions in the ERC20 token standard include Function (total supply) which means total supply of tokens in circulation and Function (balanceOf) which gives the balance of tokens in the account
1 Like
  1. The benefits of setting a token standard like ERC20 is that all partecipants can communicate with each other: wallets, exchanges & applications. Having the same standards to not only communicate, but also integrate & interoperate will help to build an efficient economy.
  2. We have several functions in the ERC20 Token Standard Interface:
  • function total supply() - tells how many tokens are in circulation,
  • funcuin balanceOf(address account) - tells the balance of an account,
  • function transfer(address recipient, uint256 amount) - tells where to transfer tokens.
1 Like
  1. Having standards allows wallets, exchanges, etc to easily add all ERC 20 tokens as they have common naming in their code.

  2. totalsupply returns a unit of the total supply of that token
    balanceof - given an address it returns their account balanceOf
    transfer - transfers an amount to a specified address from the owner of the contract
    transferFrom - specifies a transfer 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
  1. The importance of a standard ensure a smoother working network so everyone knows what major key functions are on every Smart contract.

  2. totalSupply gives the maximum number of tokens.
    balanceOf checks an accounts balance.

1 Like
  1. The benefits are that the code is streamlined and can be executed by all wallets and nodes.
  2. total balance returns total number of tokens in circulation, transfer is sending tokens from one account to the other, account balance returns number of tokens in this account
1 Like
  1. A token standard allows developers build on platform more quickly and more exchanges and wallets can read the token
  2. There is Function (total supply) which is how many tokens in circulation and Function (balanceOf) gives balance of tokens in the account
1 Like

1. What are the benefits of setting a token standard like ERC20?
Setting a standard for all tokens lets them all communicate with one another, and any new tokens will communicate with the network.

2. What functions are in the ERC20 Token Standard Interface and what do they do?
function total supply returns the total supply of the token, and balanceOf returns the balance of the token in the accounts address.

1 Like
  1. By building your token on top of the ERC20 base class you gain benefits from polymorphism. Wallets and exchanges do not need to know any details about your specific token implementation to be compatible with your token.

totalSupply() - returns the number of tokens in existence.
balanceOf(account address) - Takes an Ethereum address as input and returns the balance of that account,
transfer() - Function for sending Tokens to other addresses.

1 Like
  1. It is possible to program a token in any way I like using Solidity. However if all the programmers program the token in the same way and they function similarly, then all the exchanges and wallets can easily adopt those tokens from day 1 itself. ERC20 is one of those standards that helps in making the tokens program in the same way.
  2. balanceOf() gives balance of a specific account.
    totalsupply() gives the total supply of token in circulation.
    transfer() allows transfer of tokens.
1 Like

Naming conventions and standards allow for all wallets and exchanges to interact with the smart contract.

There is balanceOf and totalsupply and other naming convention for reading wallet balance and circulating supply

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

It allows exchanges and wallets to support a common standard which is better and more efficient than having to support many different interfaces.

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

totalSupply
Get the total token supply

balanceOf
Get the token balance of an address

transfer
Send tokens to another address

approve
Give another address permission to spend a certain allowance of tokens

allowance
Check the allowance that one address has for another

transferFrom
Spend the allowance that one address has for another

These are the required functions. For a good list of other functions see the following:

2 Likes
  1. the standard of an ERC20 token is that they can interact with all exchanges and all wallets.

  2. ERC20 tokens are fungible and enabled alot of ICOs to be hosted on the Ethereum network.

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

Basic standardization allows for efficient exchange between wallets/other platforms.

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

The following are always present in an ERC20 standard token:

  • balanceOf() = total tokens
  • transfer() = sending/receiving tokens
  • doSomething = vocation of contract/code
  • approve () = allocation of funds from smart contract
  • allowance () = number of tokens dispensed
1 Like
  1. All tokens that using the ERC20 standard follow the same conventions making compatibility easier.
  2. balanceOf() gets the current balance of and address. transfer() sends tokens from the sender to an address.
1 Like
  1. Fungible.
  2. totalsupply(), balanceof(), transfer(), etc
1 Like
  1. It’s much easier to navigate and execute commands through different coins and tokens as long as they have build on that same standard, if I have 5 different tokens that have different standards then i’ll have to build 5 different ways to speak to each of them separately.

  2. Functions like Total supply - Checking what is the maximum supply of this token. Balance - How to check the balance of that token for that user.

1 Like
  1. The benefits of setting a token standard. The token standard such as ERC20 means that all tokens created on the ethereum network that are fungible are programmed, function and execute in the same way/structure. This means that tokens, contracts and wallets are able to communicate with eachother and the ecosystem in the same way including with any existing and new tokens in the future. This allows for the whole token ecosystem to be intergrated and inter-cooperate facilitating a bigger network of connectivity and interaction. It is extremely beneficial in token economics that the constituents of the ecosystem including the end users are able to transact & interact to allow for fluidity between token exchange and therefore the exchange of values. This means that transactions can be quicker and cheaper and less need for additional intermediary like code is needed for different tokens or smart contracts to interact with eachother for example. Ultimately it increases efficiency and stimulates transactions between users/tokens. Great for the network.

  2. Some of the functions in the ERC20 token standard interface are functions such as
    balanceOf() - provides the number of tokens held by a given address
    transfer() - directly transfers a number of tokens from the message sender to another address allowance() - provides the number of tokens allowed to be transfered from any given address

1 Like
  1. It allows a market with less friction. It is easier for exchanges to include one standards than many of them. If it supports ERC20, it can support all the coins programmed in that standard in one go.

  2. balanceOf() gets the balance of an adress. totalSupply() states the total supply of a token.

1 Like

Homework on ERC20 token standard

What are the benefits of setting a token standard like ERC20?
Setting standards allows easier adoption of new tokens on applications that need to integrate with these tokens. If a new token is released, the app or the exchange does not have to alter its practices or code in order to accommodate the new token.

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

There are six main functions on the ERC20 standard namely:

  • function totalSupply() - It is the sole mandatory parameter. It returns the total supply of tokens.
  • function balanceOf() - It returns account balance of the wallet at a given address.
  • function allowance() - It provides the number of tokens allowed to be transferred from a given address by another given address.
  • function transfer() - This function transfers a number of tokens directly from the message sender to another address
  • function approve() - The approve() function allows a token holder to approve the transfer of a certain number of tokens to an address (usually of a smart contract).
  • function transferFrom() - This function allows the transfer of tokens from a specific address to another specific address.
1 Like

1. What are the benefits of setting a token standard like ERC20?
Having a token standard allows the different applications built on the blockchain to communicate efficiently with one another. This reduces friction and unnecessary redundancy in the Ethereum economy.

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

  • balanceOf(): Provides the number of tokens currently held by an address.
  • transfer(): Send tokens from the message sender to another address.
  • approve(): Allows another address to transfer up to a specified amount of the token.
  • transferFrom(): The command for an approved account to transfer funds to itself.
  • allowance(): Determines the limit of the number of tokens that can be transfered in one transaction between two addresses.
1 Like