Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not have default payable function on a token sale #1

Open
miohtama opened this issue Sep 1, 2017 · 1 comment
Open

Do not have default payable function on a token sale #1

miohtama opened this issue Sep 1, 2017 · 1 comment

Comments

@miohtama
Copy link
Contributor

miohtama commented Sep 1, 2017

I advise against having a default payable function on token sales.

Rationale: People can send in ETH from exchanges (Coinbase, etc.). Those exchanges cannot handle incoming ERC-20 token transfers. Coinbase customer support won't recover your tokens.

This is general industry knowledge. Selling something, taking money and not able to deliver is something that gets you in trouble with angry customers and regulators. I highly advise forcing a data field value (function name), even a fixed one, so that we can be sure the deposit comes from a proper Ethereum wallet and not a shared wallet. Taking steps towards preventing bad transactions is a part of running responsible token sale.

Forcing a high gas limit value and data field filled in limits this problem. This makes it more cumbersome for people to send in ETH, true. But it is much more safer investor wise, as I have not yet encountered problems with exchanges when enforcing data field and gas limit > 200k

More discussion can be found here:

TokenMarketNet/smart-contracts#53

@miohtama miohtama changed the title Do not have default payable function on token sale Do not have default payable function on a token sale Sep 1, 2017
@rstormsf
Copy link

What I also liked is what Kyber did
https://github.com/KyberNetwork/TokenDistributionContracts/blob/6b04dbf730ffc55c3d2850969dbbfb89e69dfcfc/TokenSale/contracts/KyberNetworkTokenSale.sol#L62

enforce gasPrice to be less than some amount in order to stop whales to get ahead of the game

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants