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?