Homework: ERC20

  1. Using a token standard like ERC20 has huge benefits because existing wallets and applications are already programmed to work with ERC20 tokens. The existing functions of ERC20 tokens are universally known and used throughout the crypto industry.

  2. Some functions in ERC20 are totalSupply(), which tells us the circulating supply of the token. And balanceOf(), which tells us the balance of a specific address within the Blockchain.

1 Like
  1. What are the benefits of setting a token standard like ERC20? Reduces friction and makes it to where your token will be compatible with all exchanges and erc 20 wallets on day one. Pretty much anything erc 20 friendly will be compatible with the token
  2. What functions are in the ERC20 Token Standard Interface and what do they do?They are functions every compliant token must support and are Total supply, balance inquiry, issue/burn tokens, manage ownership.
1 Like

1: It increases interoperability between tokens meaning they can integrate with seamlessly with existing wallets and exchanges.
2: 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 to
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

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

Yes sir, but could you please describe what those functions do?

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

What are the benefits of setting a token standard like ERC20?
Answer: Some benefits of token standards like ERC20 include:

  • Programming best practices are able to be developed.
  • You have access to a wider pool of developers with understanding of how to build on that standard.
  • Wallets that are using the ERC20 standard can read the supply of every token using that standard in that wallet.
  • Interoperability and efficiency with smart contracts.

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

  1. balanceOf() - provides the number of tokens held by that address…all data on the blockchain is public.
  2. transfer() - transfers tokens directly fro me the sender to another address. Note that no checks are made with this option, so the sender must make sure the address is correct
  3. doSomething() - operating instructions
  4. allowance() - provides the number of tokens allowed to be transferred
  5. transferFrom() - token holder can select an address to transfer from
1 Like
  1. setting a token standard like ERC20 eliminates industry “friction” --> that is unifies routines on how to create new applications/new smart contracts/new tokens and allows for efficiency and way easier integration in the crypto world (among wallets, exchanges and other crypto applications).

  2. i. totalSupply() --> gives how many tokens are in circulation
    ii. balanceOf(address account) --> returns the token balance of the account specified in the argument
    iii. `transfer() --> transfers a number of tokens directly from the message sender to another address.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It creates less friction in the industry by allowing all Programmers/ Crypto Institutions to reuse their code. The deployment of new ERC20 token can be done quickly very efficiently.

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

  • BalanceOf : returns the balance of an address.
  • TotalSupply: returns the total supply of the token.
  • Transfer: defines the transfer of token to one address.
  • Approve: gives another address approval to transfer up to a certain number of token.
  • TransferFrom: defines the transfer of token from one address to another one after using the Approve function.
    -Allowance: provides the number of tokens allowed to be transferred from a given address by another given address.
1 Like
  1. it creates efficiency within the smart contract economy. This way smart contracts that are similar in nature can easily be integrated by different application. standardized smart contracts also make it easier for developers to build a routine for developing specific smart contracts.

  2. totalSupply gives us the total unit of supply of a specific token. balanceOf returns account balance of a certain address. transfer allows us to transfer to an address from the owner of contract. approve allows a token holden to approve an address to transfer up to certain amount of tokens. allowance gives the number of tokens allowed to be transferred by a certain address.

2 Likes
  1. Everything runs on a set of standards. This means wallets, for example, can quickly interoperate with ERC20s because they all use the same set of standards. Utilizing standards is also a more efficient way to use your time because so many “features” are already built in. This allows you to spend your time more efficiently on other things rather than building things that can be standardized for everyone.

  2. Returning the total supply and returning your balance are a few functions built into the ERC20 Token standard. These standards allow exchanges, for example, to quickly see total token supplies and the available balance for all ERC20s.

1 Like

“it creates efficiency within the smart contract economy.”

This is exactly what I was trying to say in my homework response. Great job!

2 Likes

This is awesome, Seblife. Thanks! I plan to dive into blockchain development soon and your response is very helpful.

1 Like

1.Having specific standards like ERC20 allows for wallets, exchanges, etc to have easier interoperability so they communicate in a known and expected way (fungible).

2.totalSupply(): shows the number of the tokens in circulation
BalanceOf(address account): gives a public addresses balance of ERC20 tokens
transfer(): allows the transfer of ERC20 tokens to another public address

1 Like

1. What are the benefits of setting a token standard like ERC20?
it allows all wallets and exchanges to talk to eachother smoothly
2. What functions are in the ERC20 Token Standard Interface and what do they do?
balanceOf(account num) allows you to see the account balance of the account
totalSupply() shows you the total of all tokens that exist

1 Like

1.- By using an Standard, wallets and exchanges can interact with all the tokens that use the same standard the same way.Which makes it more scalable.

2.- balanceOf (gives the balance of an account. totalsupply (total supply of tokens in circulation), transfer (transfer tokens to an specified address)

1 Like

The benefit of setting a token standard like ERC20 is so that there is a common set of templates and rules for interaction/communication. This helps to make integration with wallets, smart contracts, websites, crypto exchanges, other ERC20 tokens etc more seamless, efficient etc.

The functions in the ERC20 Token Standard Interface are:

  • totalSupply()
  • balanceOf(address account)
  • transfer(address recipient, uint256 amount)
  • Allowance()
  • Approval()

Total supply informs of the total number of tokens in the specific new token.
Balance of informs of the balance of specific accounts.
Transfer is a simple transaction for sending ETH to an account.
Allowance is a function that permits a contract to transfer from an account up to a pre-determined maximum amount.

2 Likes
  1. There are many benefits, including allowing wallets to provide token balances for hundreds of different tokens and creating a means for exchanges to list more tokens by providing nothing more than the address of the token’s contract.

The balanceOf() function provides the number of tokens held by a given address. Note that anyone can query any address’ balance, as all data on the blockchain is public.

The transfer() function transfers a number of tokens directly from the message sender to another address. Note that there are no checks made on the recipient address, so you need to check that you have typed the correct address.
This function 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 cannot assert that the user calling the contract has paid the required amount of funds to operate the contract.

approve() gives another address (usually of a smart contract) approval

transferFrom() allows for transfers to go from one place to another

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

1 Like
  1. The benefits of a token standard like ERC20 are that they offer different groups, developers and coders a common set of features and interfaces for token contracts in Ethereum.

  2. ERC20 Functions are:

balanceOf()- returns number of tokens held by a given address.
transfer() - transfers a number of tokens directly from the message sender to another address.
approve() - gives approval to another address.
transferFrom() - permits transfer particular address.
allowance() - number of tokens to be transferred between particular addresses.

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

    Having a standard when it comes to tokens helps to insure that the
    tokens, which represent smart contracts and their own currency, will
    execute predictably within the Ethereum and other smart contract
    based platforms.
    Another benefit is that all exchanges and wallets can support the coins
    with the standard way programming the tokens.

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

    The functions in the ERC20 Token Standard Interface are:
    balanceOf(), transfer(), totalSupply(), transferFrom(), approve(), and
    allowance().

    The balanceOf() function shows how many tokens are held by a
    particular address.

    The transfer() function transfers a specified amount of tokens from one
    address to another address.

    The totalSupply() function identifies the total number of ERC-20
    tokens created.

    The transferFrom() function allows a users to transfer tokens to
    another user.

    The approve() function checks a TX against the total supply of tokens.

    And the allowance() function checks the account balance of a user and
    cancels the TX if there are not enough tokens.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Ethereum is a global ecosytem. Having a standard like erc20 unites developers and communities together and allows for effective communication and integration within the ethereum ecosystem. Integration leads to better performance.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    The functions of an ERC20 token standards are keeping balance of tokens of an address and being able to transfer tokens from one address to another.
1 Like
  1. Every exchange and wallet support my tokens from day one.
  2. They make sure that every smart contract is build in the same way and can be read.
1 Like