Homework: ERC20

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

Having a standard make all tokens programmed in the same way. This allows all exchanges and wallets can support each and every token. And tokens can integrate with each other easily.

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

function totalSupply()

  • the final item that defines an ERC20 token contract, and as mentioned is the sole mandatory parameter

  • equals the sum of all balances.

function balanceOf()

  • provides the number of tokens held by a given address.
1 Like

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

  • Transaction - speed, effective, globalized.
  • Creation - Extremely easy to create.
  • Interaction - Reduce the complexity of token interaction.
  • Contract - The risk of contract breaking is low.
  • Liquidity - Increased token liquidity.
  • Revenue - High revenue because of wide usage & familiarity.

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

ERC20 defines the functions balanceOf , totalSupply , transfer , transferFrom , approve , and allowance . It also has a few optional fields like the token name, symbol, and the number of decimal places with which it will be measured

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    A consistent standard of syntax/functions for developers to code smart contracts. This is help improve the interoperability between applications
  2. What functions are in the ERC20 Token Standard Interface and what do they do?

function totalsupply() - total supply of an ERC-20 token
function balanceof() - balance of an address
function approve() - approval criterion.
function transfer() - tansfer from one address to another

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

Having a token standard allows the growth of an ecosystem where all standardized parts can talk to or relate to each other, like exchanges, dapps, wallets, etc

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

totalSupply - to know the total supply of a token

balanceOf - To get the balance of tokens in an account.

transfer - To transfer tokens from one account to another

and other ones, not mentioned in the video.

1 Like
  1. It give ability to program your own token and execute it on ethereum network.

  2. Show balance, transfer money, show acconts, etc.

1 Like

1 it makes sure that everyone speaks the same ā€œlanguageā€, that the main functions of the code are quickly understood by all parties involved

2 the ERC20 standard set the bases of all fungible token built on the ETH blockchain

1 Like
  1. everything is done the same, same rules apply

  2. (balanceOf) sets balance of amount, (totalsupply) max amount available of amount, but there are more…

1 Like

1.) exchanges and wallets are supported and for coding it makes life easier we all follow the same standards and functions.
2.)count the total amount of tokens (totalSupply)

1 Like
  1. to ensure everything is the same across the board so they work together
  2. total supply- is supply of token, token balance-balance of tokens
1 Like
  1. What are the benefits of setting a token standard like ERC20?

The benefits of having a standard like ERC20 is that it allows for any token following the standard to be compatible with any wallet.

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

totalSupply() - returns the total supply of tokens
balanceOf() - returns the balance of a specific address
transfer() - function will transfer tokens from sender’s address to receiver’s address
approve() - function will approve the transfer request of tokens

1 Like
  1. It makes it easy for wallets to interact with the token since ERC-20 is the standard for token smart contracts, as well as easy accessibility with exchanges.

  2. Totalsupply, balanceof and transfer, these functions ensure the feasibility of a token holding a total supply, wallets checking balances of addresses and transferring tokens from one address to another.

  1. a standardize token standard like ERC20 allows all the dapps running on the same network to behave the same, thus we can use the same code across various dapps autonomously (e.g. between wallets, and from wallet to exchanges and vice versa).

balanceof() - show the token balance of a particular wallet address
transfer() - transfer tokens from sender wallet to receiver wallet
approve() - allows the token holder to approves the transfer of tokens, up to the approve amount from his wallet, usually in form of smart contract
transferFrom() - function called by receiver to transfer approve amount of token from sender wallet
allowance() - function that limits the amount of token transferable from an address to another address

1 Like
  1. Having standards allows wallets and exchanges to add all ERC20 tokens as they have a common naming in their code.

  2. balanceOf() Gives balance of a specific account, totalsupply the number of total fungible tokens.

1 Like

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

The benefits of setting a token standard in ERC20 is that is has all the same naming conventions, parameters and standards to be able to allow all wallets and exchanges to support it without any hassle. If ERC20 standard wasnt in place developers would have to create each function again for example function totalSupply() could be named as function YouBetterGetMySupplyNow()
2.What functions are in the ERC20 Token Standard Interface and what do they do?

totalSupply() returns the total supply of tokens.

balanceOf(address account) Public addresses that show the blanace of tokens.

transfer() Transfer a number of tokens from one account to another.

approve() Gives approval to another account so that the approved account can transfer the tokens from the owner/exchanges account.

transferFrom() Gives permission for another address to transfer from your account
allowance() Provides the number of tokens to be transferred from one account to another.

1 Like

What are the benefits of setting a token standard like ERC20?
By setting a programming standard for tokens it allows all wallets and exchanges to be able to support any token using ERC20 from day one.

What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply() Gives maximum number of tokens that exist.
balanceOf(address account) Gives a public addresses’ balance of ERC20 tokens.
transfer() Allows someone to transfer their ERC20 tokens to another public address

1 Like
  1. Promotes adoption which fuels growth in the space. Attracts developers and makes them easily integratable too for ex. by exchanges and wallets

  2. totalSupply() = returns total supply of the fungible token,
    balanceOf(add) = returns balance of a given token address
    transfer(recipiantAddres, amount) = transfer specified amount of token to specified token address

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

Answer: mainly having a standard solves the problem of interoperability - tokens that follow the same standard can be supported by different applications (wallets) and exchanges.

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

Answer: When issuing an ERC-20 token, there are six functions that are the same within each token that follows the standard:

  • transferFrom() function transfers the tokens from an owner’s account to the receiver account
  • approve () function - e.g. You approve the DEX contract address to spend your USDT tokens
  • allowance
  • totalSupply () function returns the total supply of the token
  • balanceOf () function returns the token balance of the given address;
  • transfer() function is used to transfer the tokens from the owner of the token to some other address
1 Like
  1. The benefit of setting a token standard like ERC20 is increased interoperability. If all tokens follow the same standard, wallets can easily provide balances for all ERC20 tokens and tokens can interact with each other.

  2. ERC20 functions:
    balanceOf() - number of tokens held by a particular address
    transfer() - send tokens from one address to another
    approve() - token holder gives permission to another address to transfer tokens
    doSomething() - carry out instructions
    transferFrom() - take tokens from an account
    allowance() - number of tokens allowed to be transferred from one address by another address
    Transfer() - emits details of transfer of tokens from one address to another
    Approval() - emits details of approvals of tokens from one address to another

1 Like
  1. It increases efficiency because wallets, exchanges and applications can use the tokens as they are all familiar with the standards. There is no friction in the system because contracts are structured the same way.

  2. totalSupply( ): tells you how many tokens of that type are in circulation. balanceOf( ): tells you how many tokens a particular address has.

1 Like
  1. Other smart contracts can interact with your smart contract (by default, no need to write additional contracts with specific function names) for instance DEX, wallet, marketplaces …

function decimals() public view returns (uint8)
function totalSupply() public view returns (uint256)
function balanceOf(address _owner) public view returns (uint256 balance)
function transfer(address _to, uint256 _value) public returns (bool success),
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)
function approve(address _spender, uint256 _value) public returns (bool success)
function allowance(address _owner, address _spender) public view returns (uint256 remaining)

1 Like