Homework: ERC20

  1. Setting standarts makes it possible for wallets and exchanges to accept that token. The system works as whole without friction.

  2. balanceof() provides the number of token held by a given adress
    transfer() transfairs a token directly from one adress to another

a two-step process:
transferfrom() first step a token holder gives another adress approval to trasfer up to a certain number of tokens
approve() the token holder to provide this information.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Allows the growth of the ecosystem while minimizing friction and increasing efficiency, ex : Wallets, exchanges, smart Co tracts can interact in the same way with tokens using same standard.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Some common functions:
  • total supply(), defines supply of tokens
  • balanceOf(), returns the balance of an account
  • transfer(), transfers tokens from one account to other
2 Likes
  1. Exchanges and wallets can adopt tokens much quicker; faster interoperability. It is also easier to create Tokens when they follow a specific standard. Having a standard can help avoid bugs in code which could lead to scams, people losing their tokens; this could be accidental or on purpose.
  2. totalSupply - get the total token supply,
    balanceOf - Gets the account balance of another account,
    transfer - sends specified amount of tokens to a defined address,
    transferFrom - sends specified value of tokens from one address to another,
    approve - allows spender to withdraw from your account, up to the value amount,
    allowance - returns the amount which the spender is still allowed to withdraw from.
2 Likes

1. What are the benefits of setting a token standard like ERC20?
There’s multiple benefits to having this standard, two notable reason is that this makes building and reading tokens faster and easter as the code will be familiar, and that newly created ERC20 tokens will work on day 1 with wallets and nodes that are programmed to already work with this standard.

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

  • name()

    This function is used to return the name of the Token.

  • symbol()

    This will return the symbol of the token (i.e. Ethereum’s symbol is ETH).

  • decimals()

    Returns the number of decimals the Token uses.

  • totalSupply()

    Returns the Token’s total supply.

  • balanceOf(address _owner)

    Returns the balance for a wallet address.

  • transfer(address _to, uint256 _value)

    Sends an amount of the Token to another wallet address.

  • transferFrom(address _from, address _to, uint256 _value)

    Used to withdraw an amount of the Token from a wallet address to another wallet address.

  • approve(address _spender, uint256 _value)

    Used to allow a wallet address to spend an amount of the Token.

  • allowance(address _owner, address _spender)

    Used to define an amount of the Token a wallet address can spend.

1 Like

The benefits of setting token standards are to allow industry systems to better understand and interact with with each other which allows wallets and exchanges to easily add new tokens.

Some of the functions in an ERC20 Token Standard include ‘BalanceOf’ which allows wallets and exchanges to see your public address balance, ‘totalSupply’ which shows the maximum number of Tokens that exist and ‘transfer’ which enables the transfer of ERC20 Tokens to another public address.

1 Like

Answer 1 - A Token Standard ensures that everyone follows it and so it is easy to program and easy to understand by difference interfaces like exchanges to process the same

Answer 2 - Some examples

Functions totalSupply() - this is to declare total supply of tokens
function balanceOff(addressaccount) - this is for checking how much token is balance in a particular account

1 Like
  1. It allows new tokens to be adopted. Plus, it creates a frictionless environment.

  2. There are functions that address the total amount of tokens in circulation, the amount of tokens in an account, the transfer of tokens, etc.

1 Like
  1. Token standard make it easy for wallet and exchange to interact with new tokens and support their functionality instead of each token having it’s own unique syntax.

  2. balanceOf() - Query the number of tokens held by certain address.
    transfer() - transfer tokens from one user to another.
    allowance() - number of token allowed to be transferred from an address by another address.

1 Like

Hello! Late night studying…

  1. The main benefit to setting a token standard like ERC20 is that this creates a streamline consistency across the board for many users to participate in the multitude of potential in various tokens on the same network. This way the economy is efficient.
  2. A few of the functions in the ERC20 Token Standard Interface are balanceOf() which allows you to find the balance of an account, totalSupply() which returns the total supply of a token, and also transfer() which transfers a certain amount to a certain address.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
  • Standards increase efficiency of the system as they define a common list of rules that all can follow and rely an. When a new token has been deployed on the network, any exchange or wallet can immediately start executing the token without the need to be updated to understand the instructions contained in the token.
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • There are 9 functions defined in the ERC 20 standard:

function name : Returns the name of the token.

function symbol : Returns the symbol of the token.

function decimals : Returns the number of decimals the token uses.

function totalSupply : Returns the total token supply.

function balanceOf : Returns the account balance of another account.

function transfer : Transfers an amount of tokens to a specific address.

function transferFrom : Transfers an amount of tokens from address X to address Y.

function approve : Allows the spender to withdraw from your account multiple times, up to a specific amount.

function allowance : Returns the amount which a spender is still allowed to withdraw from the owner.

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

Set standards allows for compatibility and fast development across the blockchain community. Wallets, exchanges, and developers all can build from the same unified standards.

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

Functions are standard instructions that execute specified commands. For example balanceOf( ) will display the number of tokens in a specified address.
function name( ) returns the name of the token
function symbol( ) returns the token symbol
function totalSupply( ) returns the token’s total supply

2 Likes
  1. What are the benefits of setting a token standard like ERC20?
    The benefits of standardization include: (1) using the same conventions (e.g., naming conventions, parameter conventions) (2) EFFICIENCY (an economy is efficient when you have less friction, so everybody is writing in the same way and not having their own structure or naming conventions) (3) allows the entire space with the ability to communicate with each other.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    These functions allow users to find out the balances of accounts as well as to transfer them from one account to another. The functions are:
    totalSupply(): Returns the total circulating amount of tokens.
    balanceOf(): Returns how many tokens exist in an account.
    There are 2 ways to send tokens from one address to another.
    transfer(): Transfer an amount of tokens from the token owner’s account to another account. This can be dangerous as there are no checks made on the recipient address, so the sender needs to ensure that the recipient is the intended recipient.
    Although transfer() is fine for sending tokens from one user to another it doesn’t work so well when tokens are being used to pay for a function in a smart contract. This is because at the time the smart contract runs it has no access to details of which addresses transferred funds where and so the Smart Contract cannot determine if the user calling the contract has paid the required amount of funds to operate the contract.
    approve() and transferFrom() work together as a 2-step process. In the first step a token holder gives another address (usually of a smart contract) approval to transfer up to a certain number of tokens, known as an allowance(). The token holder uses approve() to provide this information.
    approve(): A token owner can approve for the recipient to transferFrom() tokens from the token owner’s account.
    transferFrom(): Allows a recipient’s account to transfer an amount of tokens on behalf of the token owner to another account.
    allowance(): Returns the amount of tokens approved by the owner that can be transferred to the recipient’s account.

2 Likes
  1. What are the benefits of setting a token standard like ERC20?
    Ecosystem is not as divided. It’s easy for exchanges to add all tokens with the same standart to their portfolio. Wallets can also add all tokens and dapps with the same standart.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Balanceof() - to check an address’ balance
    Transfer() - send coins from one address to another but not for smart contracts
    Approve() - approve an allowance
    Allowance() - how much can another address can transfer from the address that approved the allowance
    Transferfrom() - a function to transfer funds from the wallet that approved the allwoance
2 Likes

1.) the benefits are that all exchanges and wallet know exactly how the speak with an erc 20 token.

2.) total supply, balanceOf, transfer…

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

A standard creates less friction since everybody is following the same language for creating the token. That means that all wallets only need to now how to read that language to interact with the token, instread of having to learn a many different ones. Easier for the community to learn how to make a token that can actually be used by the systems allready in pleace.

  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • There are 9 functions defined in the ERC 20 standard:

function name : Returns the name of the token.

function symbol : Returns the symbol of the token.

function decimals : Returns the number of decimals the token uses.

function totalSupply : Returns the total token supply.

function balanceOf : Returns the account balance of another account.

function transfer : Transfers an amount of tokens to a specific address.

function transferFrom : Transfers an amount of tokens from address X to address Y.

function approve : Allows the spender to withdraw from your account multiple times, up to a specific amount.

function allowance : Returns the amount which a spender is still allowed to withdraw from the owner.

2 Likes
  1. The benefits of having a standard such as ERC20 is the inter-operability of all tokens on all wallets, no matter the token. Without a standard tokens could not be exchange between wallets.

  2. Functions included in the the standard ERC20
    ‘Total Supply’ total tokens in circulation
    ‘Balance O()f’ available tokens in a given wallet
    ‘Transfer()’ function that facilitates transfer of tokens between wallets

2 Likes
  1. What are the benefits of setting a token standard like ERC20?
    Ensures cohesiveness in the network which allows for interoperability and less friction in the network so the network can run as efficiently as possible
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    “totalsupply” function gives how many tokens are in the supply
    “balanceOf” function allows balances of wallets to be checked by exchanges etc.
    “transfer” function allows tokens to be transferred from one wallet to another
2 Likes
  1. What are the benefits of setting a token standard like ERC20?
  • Having a standard which all smart contracts of a type follow lets them communicate and work together seamlessly, efficiently. If each were written without any standard, they’d have to be modified for each other individually to work together.
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
    Some standard functions mentioned are:
    _totalsupply;-- Total of tokens in circulation
    balanceOf(address account)-- tells the balance that account has
    transfer(address recipient, uintxxx amount)-- for transferring
2 Likes
  1. There are standardized functions and not every token will have to create their own different ones. This makes it possible to write tools, such as liquidity pools and wallets, that work with all ERC-20 tokens
  • transfer tokens from one account to another
  • get the current token balance of an account
  • get the total supply of the token available on the network
  • approve whether an amount of token from an account can be spent by a third-party account
2 Likes
  1. What are the benefits of setting a token standard like ERC20?

To give all programmers a common language that can be used as standard rather then lots of bespoke code.

  1. 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.

2 Likes