1

I am new and self studying how ERC20 token and smart contract works. After reading through some documents and blogs about creating token and ICO smart contracts. I have questions about how people buy and sell ERC20 tokens through token exchange after successful ICO.

In order to list the token on exchange for trade, I think the token owner must provide token address. What functions must be included in the token contract? I am curious how token exchange validate if token contract works with their buy/sell process?

Thanks.

2 Answers 2

0

I have questions about how people buy and sell ERC20 tokens through token exchange after successful ICO.

The token owners list the tokens on exchange and thus user can start trading the coins and hence the price of tokens become master driven.

In order to list the token on exchange for trade, I think the token owner must provide token address. What functions must be included in the token contract?

Each exchange has different requirements. Most exchanges are not just satisfied with token address. They need a complete code, they need an audit report as well. because any vulnerable token hack causes exchanges to lose the trusts of users.

In order to list the token on exchange for trade, I think the token owner must provide token address. What functions must be included in the token contract?

To solve this challange we have a standard of fungible tokens ( ERC-20). So there is a common method to transfer tokens. Any token implementing ERC-20 standard have the same functions for transfer of tokens. So it is easier for exchanges implementing ERC-20 tokens to support any other ERC-20 token, without worrying about other details.

2
  • Thanks I was puzzling how do different parties in the ecosystem communicate with each other. If I look at some ICO project source code, I found that different ICOs have similar implementation of ERC20 token contract. Some blogs suggest to use openzeppelin. I checked openzeppelin git (github.com/OpenZeppelin/openzeppelin-solidity/blob/master/…). Found that there are more functions (e.g. increaseAllowance and decreaseAllowance) defined. Is it because of newer standard? So, should people use the latest version 0.4.24?
    – A Ng
    Sep 8, 2018 at 16:19
  • Yes, it is advised to use updated code because the approval functionality was suffering from Race conditions and could be attacked. So increase approval is updated version fo erc 20 to avoid such attacks. For backward compatibility, I prefer to add new fn while keeping previous one. But it is recommended to users not to use vulnerable fn. Sep 9, 2018 at 5:27
0

To understand about which functions must be include in the ERC20 token contract, you can refer to EIP repository

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md

1
  • Thanks, with your hints I got more information about ERC20 and EIP.
    – A Ng
    Sep 8, 2018 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.