Homework: ERC20

  1. This encourages everyone to build with the same standard to reduce friction and allow the most efficiency and interoperability within the economy. This also allows exchanges and wallets to support any tokens created with these standards.
  2. totalSupply: how many tokens are in existence
    balanceOf: gives the balance of a specified wallet
    Transfer: allows the transfer of ERC20 tokens to another address
1 Like
  1. Having a standard means there are no deviations when creating a new token. Wallets, Dapps or any other application will be able to function the same exact way every time. Creating less friction and the ecosystem can move seamlessly.

  2. The functions tell wallets and other applications how to read the Tokens inner workings.
    totalSupply() - gives the total supply of the entire token ecosystem.
    balanceOf(address account) - will find the balances of a wallet.
    transfer(address recipient, uint256 amount) - will transfer tokens between wallets.

1 Like
  1. It allows for an economy based on the erc20 token to have the same standard and confluence in coding across the network.

  2. It allows tokens built on the erc20 token to have fungibility meaning it will be built of the same commands as Ethereum.

1 Like
  1. Standardization makes sure that the creation and deployment of tokens from Ethereum are similar. This in turn makes it so that wallets and other applications that work with ERC20 tokens have an easier time with adoption every time a new one springs up.

  2. There are many functions. balanceOf() provides the token supply of a given address. transfer() is used to send tokens from one person to another.

1 Like
  1. So that all wallets and exchanges can interact with a token seamlessly and new tokens don’t create confusions in the code.

  2. 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. The allowance() function provides the number of tokens allowed to be transferred from a given address by another given address.

1 Like
  1. a token standard sets the framework and rules for the smart contracts that want to build on a certain network, ie Ethereum with ERC20 token.

2.balanceOf(): # of tokens of an address
transfer(): move tokens from one address to another
approve(): approval to transfer tokens
allowance(): # allowed to be transferred to another address

1 Like
  1. All the contracts can be read and understood with one standard program. Wallets, exchanges, users, programmers can efficiently and effectively use them by understanding the standard.
  2. Total supply, balance, etc.
1 Like
  1. It allows all programmers to be on the same wavelength, which makes interoperability much easier. For example, wallets, applications, games, exchanges etc are all much more able to work together through standards like ERC20.

  2. Some examples are “totalsupply”, (sets the total supply of tokens), “balanceof” (used in querying balances in any address) and “mint” (used in actually putting new tokens onto the blockchain).

1 Like
  1. All tokens created on the network will have the same standard which makes for a frictionless economy.
  2. One of the functions is balanceOf() which will fetch the balance of an account, another is totalSupply() which will denominate the total supply for that token. There are many more.
1 Like
  1. The ERC20 token standard allows for all participants in the Ethereum network to interact together using the same set of rules and not worrying if someone will start using a different standard.

  2. totalSupply gives the total supply of tokens that exist
    balanceOf give the balance of any ERC20 token

1 Like

Homework on ERC20 token standard – Questions

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

Benefits of standards like the ERC20 one include:

  • More cohesive and intelligible structure that can be more easily communicated between developers, other tokens, contracts, wallets, exchanges, and web servers.
  • Faster deployment on a majority of wallets and exchanges if follows the same standards (as more interoperable)
  • Promotes programming best practices
  • Reduces administrative friction (which would bear a cost on the overall network’s economy)
  • Standardized naming/parameter conventions

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

The ERC20 Token Standard Interface lists all the functions that fungible tokens are expected to support. Some examples include the totalSupply(), balanceOf(), transfer(), approve() and transferFrom() functions, which accomplish the following:

  • totalSupply(): retrieves the total number of tokens in circulation.
  • balanceOf(address account): retrieves the ERC20 token balances of a particular wallet based on its address.
  • transfer(address to, unit tokens): allowing the transfer of ERC20 tokens from one public address to another.
  • approve(address spend, unit tokens): approving spending from an account
  • transferFrom(address from, address to, unit tokens): gives a boolean output as to the success or failure of a transfer.
2 Likes
  1. What are the benefits of setting a token standard like ERC20?
    Setting a token standard like ERC20 provides a common framework from which developers use to build applications.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    -balanceof() function can be used to read the balance of any account.
    -transfer() function sends tokens between accounts.
    -approve() function allows allowance transfer of a specified number of tokens.
    -allowance() function provides given number of tokens to an account.

1 Like
  1. The standards for ERC20 tokens provides order to obtain the same naming conventions (functions) and permits wallets and exchanges.
  2. function _totalSupply() - gives # of tokens & function _balanceOf (address account) - gives available balance of token for the account.
1 Like
  1. By setting standards we make sure that we all can communicate in the same way, reduce friction in the economy we are creating and making our smart contracts interoperable and compatible since day 1.

  2. There are many functions set in the standard, such as: balanceOf(), transferFrom()… And a lot more.

1 Like

1 - The primary benefit of an ERC20 token is interoperability with other compliant tokens and decentralized applications on Ethereum.

2 - TotalSupply: provides information about the total token supply
BalanceOf: provides account balance of the owner’s account
Transfer: executes transfers of a specified number of tokens to a specified address
TransferFrom: executes transfers of a specified number of tokens from a specified address
Approve: allow a spender to withdraw a set number of tokens from a specified account

1 Like
  1. Benefits are all tokens function in the same way making it easy to integrate all ERC20 on to exchanges and wallets.
  2. Functions such as totalSupply, tokenTransfer all have their specific purpose and are present in all ERC20 tokens
1 Like
  1. What are the benefits of setting a token standard like ERC20? Less messy when there is a standard compared to when everyone builds token without adhering to the ethereum standards.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    There are more than a few but one of them is balanceOf(account) which returns the balance of a specified account
1 Like
  1. This allows services to interact with the token. As the token follows a standard the services know what to expect and how to interact with said token, even if the token is completely new and unfamiliar to them.
  2. a. totalSupply: returns total amount of tokens in circulation.
    b. balanceOf: returns the balance of the provided address.
    c. approve: called when the owner authorizes a given address to withdraw tokens from owners address
    d. transfer: transfers token from onwers address to another address.
    e. transferFrom: automated transfer.
1 Like

1: Because there are standards such as ERC20, wallets, exchanges, and other mediums can easily add the tokens cause they have a common naming in the code.

2: balanceOf() indicates balance of a specific account; totalSupply is the number of total fungible tokens in circulation.

1 Like
  • Compatability - It is easier for wallets and exchanges to read the ERC20 codes due to its standardized code/functions.
  • Cost-effective - It is low in cost for creation.
  • Easy creation/easy coding - For the developers, it is easy to create for this token.
  • Create in less time - ERC20 token creation time is less compared to others.
  • Easy usage - The traits of this token is user-friendly.
  • Secured with a smart contract - To ensure the security measures, smart contracts are default developed with this token.
  • Deployed with wallet - The cryptocurrency wallet is deployed with it to store and assure the token safety.
  • Automatic Transaction - Because on the terms of the contract, once it’s done then currencies or assets are automatically transferred to the crypto wallet.
  • Quick fundraising - Because of its gained trustworthiness in the crypto world, many peoples will be pleased and excited to invest.
  • TotalSupply(): provides information about the total token supply
  • BalanceOf(): provides account balance of the owner’s account
  • Transfer(): executes transfers of a specified number of tokens to a specified address
  • TransferFrom(): executes transfers of a specified number of tokens from a specified address
  • Approve(): allow a spender to withdraw a set number of tokens from a specified account
  • Allowance(): returns a set number of tokens from a spender to the owner
2 Likes