0

Let's say that I have created a token and this is distributed through a smart contract. Let's assume that this token is not on any exchange and whenever a transaction is executed using this token a specific algorithm in the smart contract is executed as well. I think this algorithm can be specified inside the transfer function in the ERC-20 smart contract.

Now, someone could try to put the token on an exchange anyways and start trading it. Could that prevent the algorithm in the smart contract to be executed? If so, is there a way to avoid this situation? That is, can you force the token to run that algorithm specified in the transfer function even when it is traded on an exchange?

Alternatively, can you prevent a token from being traded on any exchanges?

1

The first one.

You can carefully specify logic inside the token and it will run for each transfer. Exchanges rely on the same transfer and transferFrom functions as everyone else.

Hope it helps.

  • Yes, this is very helpful. Does this imply that the only way to transfer a token is through its transfer and transferFrom functions? – David Oct 23 '18 at 14:38
  • @David Yes, but exchanges might not execute transfer for every operation. They will store tokens in their own wallets and only make transfers when someone wants to withdraw from the exchange. – Ismael Oct 26 '18 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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