Most of the exchanges do not accept utility tokens from a contract. Is there a way to validate/check if the target address is/belongs to a exchange?
1 Answer
If you want to check the address during the execution of a contract function on the Ethereum network, then no, not at the moment.
I can think of two ways this may be accomplished in the future:
- One or more organizations that curate an on-chain registry of exchange addresses (these may be the exchanges themselves)
- Exchanges would have to vanity-gen their address to include some sort of identification code
Both methods don't exist yet, and even if they did, would not be 100% fool-proof.
If you want to check the address outside a contract, for example from a web server, you could query a website like http://etherchain.org . They add special names for important addresses. For example, you can see that this address belonged to the BTC-e exchange:
https://etherchain.org/account/0x91337a300e0361bddb2e377dd4e88ccb7796663d
And this address belongs to the Kraken exchange:
https://etherchain.org/account/0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0
-
1I would expect many/most exchanges produce disposable addresses for deposits. The methods above could work for cold wallets for exchanges and any merged hot wallets, but it looks like OP is trying to write software that avoids sending tokens from a contract to a deposit address; I don't think either method here is suited for that particular purpose.– lungjSep 13, 2017 at 14:12