Homework: ERC20

Benefits is that all wallets can receive and send ERC-20 tokens. Thats not possible if every token is programmed different.

Total supply. Max existing tokens.
Balance. Shows the balance on the accounts and makes it possible to send and receive ERC-20 tokens.

1 Like
  1. The benefits of setting a token standard are that all tokens created using the standard can be supported by all wallets and exchanges from the moment they launch.

  2. balance0f() - Provides the number of tokens held by an address. Public data.

    transfer() - transfers a number of tokens from one address to the other

    approve() - gives a contract an allowance to transfer tokens from whoever is requesting to use the contract.

    transferfrom() another way to transfer tokens from one address to another.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It makes a standard interface which allows all members to communicate the same. Which is easier to scale rather each token have its own personalized code.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Balance function - provides number of tokens held by an address.
    Transfer function - transfers an amount of tokens from one address to another.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Different wallets and exchanges can identify different tokens programmed with the ERC20 standard.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf() - provides the number of tokens held by an address
    transfer() - transfer tokens to a given address
    doSomething() - sets instructions for a smart contract
    approve() - [step1] approves the transfer of tokens (within the set allowance of tokens) in the execution of a smart contract
    transferFrom() - [step2] transfers the tokens as executed by a smart contract
    allowance() - provides the number of tokens allowed to be transferred from one address to another

Is this correct?

1 Like
  1. It’s beneficial to have a standard like ER20 as it ensures that all wallets and exchanges can instantly adapt to the smart contract.
    2)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. We have standards so that every wallet, exchange, etc. has the ability to read every token and interact with it. These Standards made the economy of Tokens in Ethereum frictionless. Which is a huge benefit, all to reach efficiency.

  2. What I learned here was:

Function totalSupply - which gives you how many tokens are in circulation.

Function balanceOf (address account) - which shows the number of Tokens of the address it was given.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    -There is better interaction between systems such as wallets, exchanges, web servers, etc because if the standards and common code uses.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    -balanceOf(): number of tokens held by an address
    -transfer(): transfer of tokens from one sender to another address. Doesn’t work well with tokens that are used to pay for a function in a smart contract
    tansferFrom(): taking tokens from a senders address to work
    allowence():provides number of tokens allowed to be transferred
    doSomething(): to operate things
    approve(): gives approval for one holder to transfer up to a certain amount of tokens.

1 Like

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

Ethereum is a Coin because it represents in itself the blockchain containing all other types of tokens whose normative convention is called ERC20. a part ETH itself, any other token to the standard known as ERC20 is a token operating on the blockchain of Coin ETHEREUM.

This ERC20 standardization makes it possible to create interoparable tokens therefore exchangeable with each other because under the same programming standard making it possible to make their programmability efficient when during their function call (smart contracts) within the Ethereum blockchain.

Dapper Lab with the CryptoKitties invented the ERC 721 standard which only allows the issuance of unique NFT (Non Fongible Token). This standard is not very practical because it does not allow secure exchange, requiring complex programmability because it is weak or difficult to program since it requires as many smart contracts as there are tokens to be issued. You can only issue one token at a time

Conversely, the ERC155 standard, which is a standard created by Enjin with the advantage of being able to program the issuance of tokens in a single smart contract. In addition, these can be NFT, semi fungible, that is to say that we transmute the supply to increase or decrease by transmutation,

The advantage of defining a standard a token standart is that we can create smart contracts allowing to issue transactions by 150 to 200 tokens / second against 30 seconds by Toke for LES ERC 721, which allows atomic token transactions within the ETH network.

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

function totalSupply () = Get the total token supply

function balanceOf () = Get the account balance of another account with address owner

function allowance () = Send value amount of tokens to address to

function transfer () = Send value amount of tokens from address from to address from

function approve () = Allow spender to withdraw from your account, multiple times, up to the value amount. If this function is called again it overwrites the current allowance with value

function transferFrom () = Returns the amount which spender is still allowed to withdraw from owner

1 Like
  1. Having a standard in programming allows the exchanges, wallets and programmers use one language. The tokens can be immidiately be transfered and accepted by exchanges.
  2. totalSupply() gives the max amount of existing tokens
    balanceOf(walletnumber) gives a balance of ERC20 tokens in this adres
    transfer() allows to move the tokens between 2 adresses
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It is a universal standard that the entire network can accept. Wallets and exchanges will have no problem running and supporting these ERC-20 tokens because the infrastructure is built for it.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    There are multiple functions, but one example is “balanceOf( )” which shows the amount amount by any address. Another is “transfer( )” which is a direct transfer of tokens to a specified address. These functions are the commands which essentially run the token system.

1 Like
  1. Standards are important because it means global variables can be set and used for all smart contracts on the Ethereum network.

  2. TotalSupply() = Gives the total supply of ETH currently in circulation.
    BalanceOf() = Gives balance of account/wallet
    Transfer() = Allows transfer of ERC30 tokens between addresses.

1 Like
  1. Standards allow the ability to create applications that can communicate with one another, and all wallets and exchanges can support the token from day one.
  2. totalSupply() - calculates/retrieves the total amount of the token in circulation
    balanceOf() - allows the smart contract to store and return the balance of the wallet address
    approve() - authorizes the withdrawal of a given amount of tokens
    transfer() - allows owner of the smart contract to send a specified amount of tokens to another address
    transferFrom() - allows smart contract to automate the transfer process on behalf of the owner
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It allows wallets and exchanges to easily add all ERC20 tokens.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    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. But it doesn’t work well when tokens are being used to pay for a function in a smart contract.

approve(): a token holder gives another address approval to transfer up to a certain number of tokens(allowance).

transferFrom(): take certain tokes from sender’s account and carry on its work.

doSomething(): to operate instructions.

allowance(): provides the number of tokens allowed to be transferred from a given address by another given address.

1 Like
  1. Having same convention allows other developers to develop smart contracts.
  2. 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. It makes it easier for developers to have a common “language” and ensures that every exchange can focus on one standard to support all tokens.
  2. The ERC20 token standard is the standard for fungible tokens, meaning that every token has the same value, unlike the ERC1155 and ERC721 where tokens have different value (which makes it suitable for games etc.)
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Ans : Allow easily in wallets and exchange that token from ERC20 Standard.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Ans :
    balanceOf() - provides the number of tokens held in a specific address.
    transfer() - transfers tokens from one address to another
    totalSupply() - provides the total number of tokens

1 Like

Homework on ERC20 token standard.

  1. What are the benefits of setting a token standard like ERC20?
    *To avoid unnecessary friction and also exchanges and wallet developers will only develop a single structure per standard moving forward.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    *blanceOf= tells you the curent balance of an specific address ; totalsupply= the sum of all created tokens

1 Like
  1. Using this standard makes each Token be exactly the same (in type and value) of another Token. One Token is and will always be equal to all the other Tokens. It also allows wallets and exchanges to easily interact with them.

function totalSupply()
- Returns the amount of tokens in existence.

function balanceOf(address account)
- Returns the amount of tokens owned by account.

function transfer(address recipient, uint256 amount)
- Moves amount tokens from the caller’s account to recipient.
- Returns a boolean value indicating whether the operation succeeded.
- Emits a {Transfer} event.

function allowance(address owner, address spender)
- Returns the remaining number of tokens that spender will be allowed to spend on behalf of owner through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.

function approve(address spender, uint256 amount)
- Sets amount as the allowance of spender over the caller’s tokens.
- Returns a boolean value indicating whether the operation succeeded.
- Emits an {Approval} event.

function transferFrom(address sender, address recipient, uint256 amount)
- Moves amount tokens from sender to recipient using the allowance mechanism. amount is then deducted from the caller’s allowance.
- Returns a boolean value indicating whether the operation succeeded.
- Emits a {Transfer} event.

event Transfer(address indexed from, address indexed to, uint256 value);
- Emitted when value tokens are moved from one account (from) to another (to).

event Approval(address indexed owner, address indexed spender, uint256 value);
- Emitted when the allowance of a spender for an owner is set by a call to {approve}. value is the new allowance.

1 Like

1.) This makes the Ethereum Blockchain compatible, although many very distinct tokens are on it.
2.) Total Supply: Tells the world how many tokens of a certain ERC20 token are in circulation.
Balance Of: Returns the balance of a certain address of an ERC20 token in question, such that it can show up in a wallet or on an exchange.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    • So that different projects can talk with each other and are into interoperable
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    • Balance inquiry balanceOF()
    • totalSupply
    • transfer()
1 Like