Lets say I have made a token with symbol ABC and a user wants to send me token of symbol XYZ. How will I receive such tokens ?

In general, do all the tokens have same economical value?

Can I make a token contract that accepts other tokens? How can I go about it?

1 Answer 1


You could build a contract that can interact with both your own token and someone else's token, but that doesn't have to do with your actual token contract.

A token contract just holds the basic data of the token itself and keeps tracks of who has some balance of it.

You ABC token contract has a balances state variable that keeps track of addresses => amount of tokens.

The same is true for XYZ token.

If you wanted to have people send you XYZ tokens and exchange them for ABC tokens, you would have to build another contract that acts as an exchange for 2 tokens. Someone would send XYZ tokens to this exchange contract, it would calculate how many ABC tokens they should get in exchange and send that to them.

  • So I don't have to make any changes in my token contract eg: MyFirstToken? Dec 29, 2017 at 12:34
  • No, unless you have a very good reason to do so. Dec 29, 2017 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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