I am new in blockchain technology and interested to learn more about Ethereum. I have followed some tutorial about creating my own tokens. I have successfully created tokens on test network but I don't seem to be able to find information what to do with ether sent to the smart contract address.

I read some discussion here about how smart contract owner can withdraw from smart contract but I am not sure if that's the right practice.

I want to create tokens not only to raise funds but also to use it for other application. So I would like to reserve some tokens to fund the development but then others can buy/trade tokens.

Any pointer to references about this would be appreciated. Thank you.

  • You have to explicitely add functionality to withdraw of funds, or setup the contract to send funds to an address of your choice. – Ismael Feb 7 '18 at 16:13

EIP-20 specification does not allow smart contracts to reject any token transfers send to them. Effectively this means that a lot of tokens are lost today, because people send them to random smart contracts due to user mistakes. The value might be measured in millions of USDs.

ERC-223 addresses this issue and there is a smart contract function that is called on every transfer. If the target address does not implement this function, the transfer is rejected.

EIP-20 tokens may have a recovery mechanism, but it is not a part of the specification. This means that the token should have an owner and handles the customer support. Because ownership can be related to an issuance and control, this makes the token more securities like and subject to securities regulation. Just a good point to keep in mind.

For ETH transactions it is more clean cut, as unless there is an explicit payable fallback function, which there isn't with current Solidity default compiler settings, the smart contract will reject any ETH transactions.

| improve this answer | |
  • So it is legit to send fund from smart contract to smart contract owner? I am asking this because I use the tokens not only to raise fund (eg. though an ICO) but I will keep using it for some reward system. I think Ethereum tokens are mainly used for ICO. For example TRON uses Eth tokens to raise fund and then they will launch their own cryptocurrency. – Pelangi Feb 7 '18 at 19:54
  • @Pelangi *So it is legit to send fund from smart contract to smart contract owner? * <-- this question doesn't make sense or I do not understand what you think – Mikko Ohtamaa Feb 8 '18 at 15:26
  • I don't know ... it just sounds very easy for the creator to get some money. But probably that's why there are a lot of scam ICO? – Pelangi Feb 10 '18 at 21:11
  • Why would anybody put money in a scam? – Mikko Ohtamaa Feb 12 '18 at 9:50

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