Homework: ERC20

  1. Token standards allow all previous and future tokens to speak the same language and be interoperable.
  2. totalsupply and balanceOf() are basic functions for all ERC 20 tokens. One gives the balance of specific account while other gives ‘total supply’ of all tokens outstanding.
2 Likes
  1. What are the benefits of setting a token standard like ERC20?

It allows wallets to recognize tokens and also exchanges to support these tokens.

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

totalSupply() gives maximum number of tokens

balanceOf(address account) gives a public addresses’ balance of ERC20 tokens

transfer() allows someone to transfer their ERC20 tokens to another public address

2 Likes
  1. What are the benefits of setting a token standard like ERC20?
    A: Easy to use, configure and communicate, creates a standard for wallets, exchanges and platforms, no need for bridges for each token.

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

function balanceOf(address tokenOwner) public constant returns (uint balance);
returns the balance of the given address.

function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
takes the address of the token owner, the address of the spender and checks the if the tokens are allowed to be transferred

function transfer(address to, uint tokens) public returns (bool success);
transfers X amount of tokens to a specific address

function approve(address spender, uint tokens) public returns (bool success);
takes the address that will spend and the token, allowing others to spend from the given address.

function transferFrom(address from, address to, uint tokens) public returns (bool success);
takes the address that will transfer the tokens, the address that will receive the tokens and which tokem.

(LOL who are these people leading the week board hahah! keep it up!)

3 Likes

[quote=“filip, post:1, topic:8440”]

  1. What are the benefits of setting a token standard like ERC20? allow less friction inside services like Exchanges or wallets, the don’t have to know the particularity of each token developed, imagine know things like Balance or the quantity of tokens of more of a thousand 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. -allowance(): provides the number of tokens allowed to be transferred from a given address by another given address.
2 Likes
  1. that everybody uses the same command for a specific action
  2. totalSupply() how many tokens are in circulation.BalanceOF: how much tokens have that balance.
    transfer
2 Likes
  1. The ERC20 token standard allows for efficiency in the economy as there is consistency, ease of access and communication across exchanges and wallets for all tokens deployed on the Ethereum network.
  2. Ther ERC20 Token Standar Interface is composed of the following functions and their purpose:
    function totalSupply() returns total supply of tokens in circulation
    function balanceOf(address tokenOwner) gets token balance
    function allowance(address tokenOwner, address spender) confirms sufficient balance of person spending tokens
    function transfer(address to, uint tokens) transfers the balance from the token owners account to another
    function approve(address spender, uint tokens) approves a token transaction
    function transferFrom(address from, address to, uint tokens) allows a spender to withdraw from your account up to the uint tokens amount
3 Likes

I know, crazy right?! Some superpowers on this patform :mechanical_arm:

1 Like
  • What are the benefits of setting a token standard like ERC20?
    Using a token like ERC-20 makes it easier for anyone to create a compatible chain to wallets and exchanges

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

Total supply gives you a total token in supply
balanceof shows the balance of an account

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

Since it will be easier to add them to available wallets & exchanges.

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

totalSupply()
balanceOf()
transfer()
approve()
etc.

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

having standards allows wallets, exchanges to be able to interact with all tokens built on top of Ethereum protocol. Even interaction between different Ethereum smartcontracts becomes possible.

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

https://docs.openzeppelin.com/contracts/3.x/api/token/erc20#ERC20

2 Likes
  1. What are the benefits of setting a token standard like ERC20?
    Interoperability, Consistency, and Adaptability

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

  • totalSupply (provide information about the total token supply)
  • balanceOf (provide account balance of the owner’s account)
  • transfer (execute transfer of a specified number of tokens to a specified address)
  • transferFrom (execute transfer 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 (return a set number of tokens from a spender to the owner)
2 Likes

1. What are the benefits of setting a token standard like ERC20?
So all wallets and exchanges can adopt the token from day one

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

  • balanceOf() balance held by and address
  • transfer() transfers from one address to another
  • doSomething() functions requires tokens to operate
  • approve() and transferFrom() is a two step process a token holder gives another address approval to transfer up to a certain number of tokens usually in a smart contract
2 Likes
  1. It allows all tokens on the Etherium network to understand each others’ code. It also allows for all wallets and exchanges to read the code easily since they are all coded within that standard,
    • balanceOf() retrieves the balance of a specific account’s ERC20 tokens
    • totalSupply() gives the total supply of a token
    • transfer() - transfers a specified amount of tokens from one address to another
      Those are some of the functions inside the ERC20 standard
2 Likes

Homework on ERC20 token standard.

  1. What are the benefits of setting a token standard like ERC20?
    Tokens with the same standard can be used in multiple wallets and exchanges.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply – equals the sum of all balances
    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.

2 Likes

Same as above and Transfer: Allows the transfer of erc20 tokens to other people (addresses public) and allowance: shows the number of tokens that are allowed to be transferred from an address to another address

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

To reduce friction in the market so everyone who is creating something on the network can easily communicate with each other. Basically keeps everyone on the same page for simplicity and efficiency.

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

Balances in each wallet. Total supply (the total of all wallets added together). Minting: creation of new tokens (increasing total supply). Burning: destruction of tokens (decreasing total supply). Decimals: to make it readable to humans since the actual protocol only deals with integers and not decimals.

2 Likes

What are the benefits of setting a token standard like ERC20?
Having a standard like ERC20 allows wallets and exchanges to be programmed to support any token using that standard. This is much simpler and scalable than each token having its own personalized code.

What functions are in the ERC20 Token Standard Interface and what do they do?
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

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

setting a token standard allows communication between applications which makes them operate efficiently and are interoperable.

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

  • totalSupply() Returns the number of the total supply of tokens that exist.

  • balanceOf() Will tell how many tokens are owned by the address.

  • allowance() Returns the remaining number of tokens that the spender will be allowed to spend on
    behalf of the owner.

  • transfer() Moves tokens from a senders account to a receivers account.

  • approve() Allows authorization to transfer tokens to another address.

  • transferFrom() Transfers the tokens from the sender to the receiver and deducts the amount from the senders address.

2 Likes
  1. efficiency. it allows different tokens to operate seamlessly on wallets and exchanges or platforms

  2. balanceOf - “This function allows a smart contract to store and return the balance of the provided address”
    totalSupply - “this function allows an instance of the contract to calculate and return the total amount of the token that exists in circulation.”
    transfer - “This function lets the owner of the contract send a given amount of the token to another address just like a conventional cryptocurrency transaction.”
    transferFrom - “This function allows a smart contract to automate the transfer process and send a given amount of the token on behalf of the owner.”
    approve - " When calling this function, the owner of the contract authorizes, or approves , the given address to withdraw instances of the token from the owner’s address.
    allowance - " Returns the amount which _spender is still allowed to withdraw from _owner "

2 Likes

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

The standardized ERC-20 protocol has a number of benefits, I suppose standardization, in general, is a quality control mechanism but specifically I can say:

  • It means all the tokens share in Ethereums network effect which compounds value and security in the ecosystem.

  • It means there are no exclusive technical barriers to using one token over another, they all use the same interface so wallets and exchanges can adopt new tokens easily.

  • The standard serves as a roadmap for implementation by developers, it includes the interface and sets a bar for functional requirements such as " Note Transfers of 0 values MUST be treated as normal transfers and fire the Transfer event."

  • Developers benefit from the open-source nature of the standard because the community of users are more easily able to identify vulnerabilities and develop solutions, a good example of this is ERC-777 which is a solution for a bug in ERC-20, see token oops for more insight https://twitter.com/TokenOops

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

A description of the standards functions and requirements and open-source implementations from Consensys and OpenZeplin can be found here: https://eips.ethereum.org/EIPS/eip-777

It includes things like “transfer” which is an address to address exchange and “transferFrom” which is a delegated transfer where one address transfers on behalf of another if I understand correctly. It also has access to public fields such as “name” (Bitcoin), “symbol” (XBTC), “totalSupply” (21,000,000).

2 Likes