Homework: ERC20

Hello

  • What are the benefits of setting a token standard like ERC20?
    Standard is needed to different institutions to be able to read, interact, transfer etc all sort of tokens. If every token would have their own standard then keeping up with their computing language for a wallet would be insane.

  • What functions are in the ERC20 Token Standard Interface and what do they do?
    ERC20 defines the functions ;balanceOf, totalSupply, transfer, transferFrom, approve, and allowance. It also has a few optional fields like the token name, symbol, and the number of decimal places with which it will be measured.

  • totalSupply :Although the supply could easily be fixed, as it is with Bitcoin, this function allows an instance of the contract to calculate and return the total amount of the token that exists in circulation.

  • balanceOF: This function allows a smart contract to store and return the balance of the provided address. The function accepts an address as a parameter, so it should be known that the balance of any address is public.

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

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

  • transferForm: This function allows a smart contract to automate the transfer process and send a given amount of the token on behalf of the owner.

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

Erc20 Tokens are fungible tokens. This means they are identical to each other because they speak so to say the same standart language of Ethereum. By this we don’t have friction and confusion when it comes that one token has to interact with another.

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

The first function is totalSupply() which gives a number as an output. This number is the total supply of the token.
The second function is balanceOf() which takes the address of an owner as the input and gives the balance of the users as output.
The allowance() function takes in the address of the tokenOwner and the spender and gives as output, the number of tokens allowed to be transferred from a given address by another given address.
The transfer() function simply takes in the address of the receiver and the funds which are to be sent to the account. It then gives a boolean output value which is either true or false. True means that the amount was transferred successfully whereas false means the amount could not be transferred.
Then we have the approve() function. You can approve someone to spend from your account. This function takes the address of the spender along with the coins to be spent as the input and tells whether the transaction was a success or a failure.
Last but not least, we have the transferFrom() function. It takes in three inputs — the address of the sender, the address of the receiver, as well as the number of tokens to be transferred. It gives an output to notify the success or the failure of the transfer.
We have also two events Transfer() and Approval() .

( Source https://en.bitcoinwiki.org/wiki/ERC20 plus https://medium.com/@jgm.orinoco/understanding-erc-20-token-contracts-a809a7310aa5 plus https://medium.com/cryptoxtech/erc20-token-standard-a-beginners-guide-5b5f0c87e11f)

1 Like

1- This allows easier deployment and adoption of new tokens by wallets and exchanges. It provides consistent syntax to all developers which removes potential frictions if different smart programs used different implementations

2- Totalsupply returns the total coins or tokens supply. balanceOf (account) returns the balance on a particular account

1 Like
  1. The benefit is that it encourages a uniform standard structure of coding to the token. Devs can build with confidence understanding that their token will be compatible and accepted by most exchanges and wallets that recognise the standard.

  2. totalSupply(). Identifies the total number of ERC20 tokens created.
    balanceOf(). Returns the number of tokens that a particular address has in their account.
    approve(). Once the balance has been checked, the contract owner can give their approval to the user to collect the required number of tokens from the contract’s address.

1 Like
  1. Its helpful for developers to work to a generic standard which helps mass adoption and useability.
  2. Functions such as total supply, balance exist which highlight the market cap of the token and the current supply of the token.
1 Like
  1. ERC20 tokens are fungible, they use the same functions and in this way we avoid frictions.
  2. Few functions in ERC20 token standard:
    a. balanceOf () function provides the amount of tokens held by an adress
    b.transfer() function sends tokens from one adress to another
    c. approve() function gives approval to transfer a certain amount of tokens
    d. allowance () function allows the transfer of a certain amount of tokens from a given adress to another
1 Like
  1. What are the benefits of setting a token standard like ERC20?

Increases interoperability across multiple platforms i.e. wallets, exchanges, web services, other contracts. Also this helps to create a best practice across the industry.

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

The basic functions that every token is expected to support perform the following; balance enquiry, issue/burn tokens, manage ownership, and total supply data.

:blush:

1 Like
  1. Standards make programming much easier as all tokens will be written the same.
  2. totalsupply, balanceOf, transferFrom, they tell show the number of tokens in supply, the balance of a particular address, and ability to transfer from address.
1 Like
  1. The benefits are that everyone knows how every token is built like. It means that wallets, exchanges etc. know how to interact with it.
  2. Every token based on ERC20 standard have the same set of functions like totalsupply() that gives back the total amount of supply, balanceOf() that gives back the balance of given account and so on. It is very useful for developers of wallets and other interfaces to use a standardized set of functions.
1 Like
  1. An industry standard for how tokens are programmed is extremely useful because it ensures fungibility and interoperability with wallets, giving clear reliable conventions that ensure a set of standards recognizeable by all.

  2. ERC20 functions include parameters for the following;
    balanceOf , totalSupply , transfer , transferFrom , approve , allowance
    As well as some optional fields for token name & symbol and number of decimal places.

# The Anatomy of ERC20

1 Like

[quote=“filip, post:1, topic:8440”]
Homework on ERC20 token standard.

1. What are the benefits of setting a token standard like ERC20?
2. What functions are in the ERC20 Token Standard Interface and what do they do?
[/quote]

  1. Token standards are important for wallet and exchange compatibility thereby affecting overall adoprtion.

  2. Functions of an ERC20 contract:

  • balanceOf () number of tokens held by an address
  • transfer () for sending tokens form one user to another
  • doSomething () instruction for depployment of contract
  • approve () and transferFrom () allows the above to deploy in a 2-step process
1 Like

Homework on ERC20 token standard.

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

Benefits of ERC20 Standards:

There are more benefits to ERC20 standards. It makes it possible for developers to develop DApps on the Ethereum blockchain. It also helps establish the whole standardized process.

The list of benefits are:

  • Token implementation and execution become easy for developers.
  • There is a standard protocol to maintain and follow.
  • ERC20 tokens offer high liquidity.
  • Smart-contracts ensure that transactions are risk-free.

Developcoins endows cutting edge Ethereum Token Development Services for businesses, entrepreneurs and start-ups. With years of experience in ERC20 token development, we have become an expertise at creating a custom token on any smart contract standard over the ethereum platform, based on our client’s requirement.

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

The ERC-20 standard is the most widely known and common among Ethereum token standards. It was first introduced about a year after the launch of Ethereum by Vitalik Buterin, the founder of Ethereum, with the help of his colleague Fabian Vogelsteller. Almost all of the major tokens on Ethereum blockchain are ERC-20 compliant. Status SNT, 4.07%, OmiseGO OMG, -1.38%, 0x ZRX, -1.17% are some examples of well-known ERC20 tokens.

The ERC-20 standard defines a set of six functions that the smart contracts within the Ethereum ecosystem use, including how tokens are transferred and how users can access data about a token. Below is a short description of each function:

  • totalSupply() function - determines the total amount of tokens that will be created to be exchanged within a given project’s token economy.
  • transfer() function - distributes tokens to user wallets in the initial distribution, for example in an ICO. A big reason for the popularity of ERC-20 tokens is the ease of sending investors their tokens after the ICO has been completed.
  • transferFrom() function - enables token owners to exchange them with one another.
  • balanceOf() function - keeps a record of the token balance in each user wallet.
  • approve() function - guarantees the constant token supply within token’s economy, it basically prevents users to create additional tokens out of thin air for their benefit.
  • allowance() function - ensures that the transactions are valid before they are added to the blockchain. It checks sending address to verify if there are enough tokens to make a transaction, if there are not the transactions is not valid.

ERC-20 tokens are essentially smart contracts running on top of the Ethereum blockchain, however,they also act as digital assets that can represent a host of things in the Ethereum ecosystem. Token creators decide how their token interacts with their business and how the user interaction with tokens is handled.

1 Like
  1. It creates an environment where everything can communicate efficiently and cuts down on the complexity.
  2. Functions such as balanceof gets the balance of an address and totalsupply the total amount of issuance of a token.
  1. What are the benefits of setting a token standard like ERC20?
    It allows exchanges and wallets and the entire community speak the same code and therefore seamlessly coexist and work together.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply: this tells of circulating supply of token.
    balanceOf: this tells the balance in a particular address.
    transfer: this is another function that probably indicates something to do with the addresses between the sender and receiver…not sure of this one.
  1. standard allows wallets or exchanges to support any token using the standard
  2. totalSupply shows number of tokens
    balanceOf shows available balance of account
    transfer allows to make a transfer
    approve gives a token holder gives another address approval to transfer
1 Like
**1. What are the benefits of setting a token standard like ERC20?**

ERC20 is a standard for fungible tokens. That means it makes it easier for tokens and smart contracts to communicate with each other. Also ERC20 tokens can be much easier to add into exchanges that already have added ERC20 tokens and are more accessible with ERC20 compatible wallets.

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

One of the functions that are in the ERC20 Standard Interface is balanceOf() and that provides the token balance of a given address. There are also two ways of function to send ERC20 tokens, the first one you can use but it works best for sending tokens between users and not in smart contracts is the function transfer(). The other way of sending tokens in smart contracts are the functions approve() and transferFrom() which the first one the holder gives the approval to another address to transfer a certain amount of tokens known as an allowance and then after the allowance has created the transferFrom() function can take the allowed number of tokens from the address. With the function allowance() you can find out the number of token are allowed to be transferred from one address to another. doSomething is a function that operates instructions in the smart contract

1 Like
  1. it makes it easy for the wallets and exchanges to work with this tokens from the start. they all know how to interact with a ERC20 token because they all work the same.

  2. -balanceOf(): gives the amount of tokens owned by that particular address.
    -transfer(): transfers tokens from one address to another address
    -approve(): sending money to a smart contract to be used in it’s actions.
    -doSomething(): commands the smart contract to take a particular action that needs to be provided
    -transferFrom(): Smart contract get command to transfer tokens from allowance to adress.
    -allowance(): the amount of tokens available for the smart contract to spend.

1 Like
  1. It makes it so all ERC20 tokens are immediately compatible with all wallets and exchanges.

  2. -totalSupply() public constant returns (uint);
    Sets total token supply
    -balanceOf(address tokenOwner) public constant returns (uint balance);
    checks balance of specified address
    -allowance(address tokenOwner, address spender) public constant returns (uint remaining);
    Sets number of tokens allowed to be sent to specified address from specified address
    -transfer(address to, uint tokens) public returns (bool success);
    Transfers tokens to specified address
    -approve(address spender, uint tokens) public returns (bool success);
    Approves the transfer of tokens
    -transferFrom(address from, address to, uint tokens) public returns (bool success);
    Transfers tokens from one address to another address

1 Like

Homework: ERC20

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

The benefits of using a standard such as the ERC20 are it defines the rules for communication. It means services can be designed that can interact with each other. Wallets can be designed so they can interact with exchanges and web servers and other contracts even. If these standards didn’t exist and everyone just used their own standard the whole eco-system would become a mess and things would always be breaking and services would constantly have to update their code to adopt new technologies.

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

I have identified a number of functions and their uses in the following list

  1. transfer() function allows a message sender to send tokens to another user but it doesn’t work well for paying for a smart contract.
  2. approve() function sets an allowable number of tokens to be transfered from one address to another.
  3. BalanceOf() function returns the number of tokens held by a particular address.
  4. approve() and transferFrom() provide a means to execute a smart contract. The approve() function accepts the address of a smart contract (usually) and the transferFrom() accepts the account the funds are available from.
1 Like

Homework on ERC20 token standard.

  1. The benefits of setting a token standard like ERC20 is because it defines how all tokens are programed.

  2. totalsupply()= gives how many tokens are in circulation.
    balance()f= gives balance held by a given address.
    transferFrom()= gives back the amount which is still allowed to withdraw from owner
    approve()= when the owner of the cocntract authorizes the given adrdress to withdraw instances of the token from the owners address.
    allowance()= send value amount of tokens to address to.

2 Likes