Homework: ERC20

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

Token standards like ERC20 allow wallets and exchanges to support every ERC20 tokens, as the structure within the tokens is the same, and use the same operations.

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

Functions like balanceOf() to get the address balance or transfer() to transfer funds allow to run operations under a given standard, so all of the tokens use the same functions to operate.

1 Like
  1. The standard makes it so they all have the same base coding so they can be exchanged easily and there is less chaos in the cryptocurrency market.
  2. There are many but a few examples are as follows:
    balanceOf() shows the number of tokens in a given address
    transfer() transfers tokens directly from one message sender to another.
    totalSupply() shows the maximum number of tokens that are allowed in circulation
1 Like
  1. the standard increases efficiency among platforms and wallets.
  2. ERC20 standard functions are: balance0f, transfer, approve, transferFrom, allowance
1 Like
  1. What are the benefits of setting a token standard like ERC20?

This is required if you want to standardize default functionality of the of the protocol. e.g. Function names, arguments, return values. This way everyone that implements a token knows what default functionality they need to support in their new token.

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

ERC20 Standard Methods:

function name() public view returns (string) - Retrieves the name of the Token
function symbol() public view returns (string) - Retrieves the symbol of the Token
function decimals() public view returns (uint8) - The number of decimal places needed for Token value
function totalSupply() public view returns (uint256) - The maximum amount of Tokens allowed.
function balanceOf(address _owner) public view returns (uint256 balance) - Current balance of input address.
function transfer(address _to, uint256 _value) public returns (bool success) - Transfer to address
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) - Transfer from
function approve(address _spender, uint256 _value) public returns (bool success) - approval
function allowance(address _owner, address _spender) public view returns (uint256 remaining) - specifiy number of tokens allowed to be used in a transaction.

1 Like

Total supply: the total supply existing in each token
balance Off: gives the balance off of a token account;
Transfer ; the amount transferred to a specific address wallet.
Transfer from: gives the address it comes from, the address of the receiver and the amount transferred. Also gives the outputs of the state of the transfer: success or failed
Allowance the amount allowed to be transferred to each receiver coded in a smart contract

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It allows the space to efficiently communicate, allows people to understand a smart contract and also increases security, as the standards have been rigorously tested and approved.

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

  • TotalSupply() -> shows the total supply of an ERC20 Token
  • AccountBalance() -> shows the amount of tokens a wallet contains
1 Like
  1. Some if the benefits include the easy fro exchanges and o list tokens with just a token address because they all have the same standard.

  2. Balanceof() used in checking the balance of a wallet
    Totalsupply() used in knowing the token supply if the tokens.

1 Like
  1. Reduces admin friction, promotes programming best practices, allows for streamlined interaction with wallets, exchanges, web servers, and other contractors.

  2. Basic functions of the ERC20 Token Standard Interface:

Balance inquiry balanceOf(): notes the balances of a given address (anyone can query any address’ balance, as all data on the blockchain is public);

transfer(): transfers a number of tokens directly from the message sender to another address. Note that there are no checks made on the recipient’s address, so it is incumbent on the sender to ensure that the recipient is as intended;

approve(): a token holder gives another address approval to transfer up to a certain number of tokens known as an ‘allowance’. The token uses ‘approve()’ to provide information;

transferFrom(): takes certain tokens from a sender’s account to carry on its work;

totalSupply(): provides a max number of tokens that exist;

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

1 Like
  1. What are the benefits of setting a token standard like ERC20?
  • It facilitates the creation of new tokens.
  • It allows the implementation of various functionalities.
  • Standardize the interface for creating and issuing new tokens on the network.
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply: Returns the total token supply.
    balanceOf: Returns the account balance of another account with specific address.
    transfer: Transfers value amount of tokens to address X.
    approve: Allows spender to withdraw from your account multiple times, up to the value amount.
    allowance: Returns the amount which spender is still allowed to withdraw from owner.
1 Like

1.) The benefits of setting a token standard are maximizing efficiency by having a set language that all
tokens use. And, also, seamless inter-operation of various tokens.

2.) The functions in the ERC20 Token Standard are:

  totalSupply(): for the total token supply

  balance0f(): for the token balance of a given address

  transfer(): for transferring tokens OWNED BY SENDER to another recipient

  approve(): for approving the transfer of "x" amount of tokens from a given address

  allowance(): for the max number of tokens that can be transferred using the function "approve()"

  transferFrom(): used with the "approve()" function, for sending allowed tokens NOT CURRENTLY OWNED BY SENDER from one address to another.
1 Like

It makes it easier to create products around it, like wallets. It’s easier and more efficient to have 100 tokens that use the same code, instead of having 100 tokens that all have different code.

totalSupply(): total supply of the tokens
balanceOf(): shows the amount of tokens that wallet address has
transfer(): send tokens from 1 wallet to another
approve(): let’s you give approval that another person can use money from yohr account

1 Like

What are the benefits of setting a token standard like ERC20?
so that all tokens in the ecosystem/ERC20 as well as wallets and exchanges can understand and communicate with each other

What functions are in the ERC20 Token Standard Interface and what do they do?
there are loads, eg Totalsupply is how many tokens in circulation, balanceOf which is balance of a specified token

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    The wallets and exchanges that support ERC20 also can support every token created on these
    standard are supported by default. The tokens use the same operations so its easy to understand
    them and therefore the secutity and efficiency is increased.

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

    approve(address spender, uint256 value) = approve to give allowance usually to be agaiable for use
    of smart contract

    allowance(address spender, uint256 amount) = allowance to another address for transfering or
    spending tokens from the owners adress.

    balanceOf (address owner) = Get the balance of specific address.

    totalSupply() Returns total Supply circulation of the token

    transfer(address receiver, uint256 value) = transfer the token to address/addresses

    transferFrom(address spender, address receiver, uint256 value) = transfer from address to another address

1 Like
  1. Standards allow communication to be much easier in the community, because all wallets and exchanges and contracts use the same defined naming conventions, and everything works together from day 1 of being ERC20.

  2. totalSupply() - gets total supply of tokens
    balanceOf() - gets balance of account
    transfer() transfers coins
    etc

1 Like
  1. It makes it easy for wallets or exchanges to support new tokens of that type rather than having to manually patch to support each new one
    2:

balanceOf() - fetches the token balance of a specified address
transfer() - sends tokens from one address to another
approve() - token holder allows up to a certain amount of tokens to be taken from his/her wallet
transferFrom() - transfers tokens from the address that has approved the transfer to another address
allowance() provides the number of tokens that may be transferred

1 Like
  1. The benefits of setting a token standard like ERC20 helps to propel the entire industry forward as productivity and efficiency are realised with everyone working to the same standards to program, develop and deploy in a standardised way. Interoperability with exchanges, wallets etc is more fluid and efficient.

  2. Functions in the ERC20 Token Standard Interface are uniformed encapsulated
    code such as totalSupply(), balanceOf() etc and what these functions do is specify and provide the total supply of and balance of a fungible token for example.

1 Like
  1. Standards encourage efficiency in the community as they allow for everyone to communicate in a known and expected manner and allows for interoperability between tokens.
  2. 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

What are the benefits of setting a token standard like ERC20?
Standards, especially in code are important for so many reasons; not to mention
readability, design and presentation.
With blockchain, defining a standard token would allow wallets to interact
with ERC tokens in exactly the same manner. By defining a standard, a wallet
has a defined set of calls to make in order to perform certain behaviours on
the token. If other tokens don’t follow the standards, then a wallet will not
be able to interact with them. It will have to implement a new way of
communication specifically for that token. While that is doable, it adds to the
cost (maintenance and development), the robustness (or lack thereof) of the
smart contract, as well as many other factors. Imagine having to implement
each token interaction in a wallet in different ways depending on the token. It
would not only add to the amount of work, but bugs will increase the wallet
program will become much bigger, harder to maintain and also run on various
platforms.
A standard will set the interface up front so that new tokens can just implement
them. A wallet will then always call the same function to do a specific task and
if a new token is released, the wallet will likely already support it; and if
not, only minimal changes may be required.

What functions are in the ERC20 Token Standard Interface and what do they do?
ERC20 has the following functions:
name() -> returns the name of the token.
symbol() -> returns the symbol of the token (the three character symbol)
decimals() ->
totalSupply() -> returns the total supply of the token.
balanceOf(address) -> returns the balance of an account.
transfer(address, value) -> transfers value to an address.
transferFrom(…) -> extension on transfer allowing for the definition of
the source address.
approve(address, value)
allowance(address, address)
ERC20 also has two events. An event is a function which gets called whenever an
event happens (ex: once a payment is made).
Transfer(…)
Approval(…)

Source: https://ethereum.org/en/developers/docs/standards/tokens/erc-20/
(will come back to these in more detail later of course)

1 Like

It allows for easier interoperability as all ecosystem participants (exchanges, contract developers, info services such as Etherscan, etc.) will know what to expect. It brings confidence to investors because they have some assurances that some rules will be respected.

Just to name a few:

balanceOf() - It checks how many tokens are available in a given address
transfer() - Sends tokens from the sender to the receiver
totalSupply() - Returns the total token supply, that is to say, the sum of balances in all addresses.

You can see all the functions available at https://eips.ethereum.org/EIPS/eip-20#specification

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Clear guidelines how we program and deploy new tokens on the network. Greater interoperability with difference exchanges and wallets. Similar analogy could be used for a different versions of internet, more knowledge and more people can be reached if everyone uses the same protocol.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf() - how much tokens certain address has got
    transfer() - sends token from sender to recipient
    approve() - sets allowance of a spender
    transferFrom() - transfers token from another address
    allowance() - provides the number of tokens allowed to be transferred from a given address by another given address

1 Like