On a centralized exchange (like coinbase), I understand why we have to deposit money into it in order to trade.

But about decentralized exchange, as I've read about, it has some kinds of "atomic swap", which swaps tokens "cross chain".

So why do we still have to deposit our tokens into the decentralized exchange?


The deposit puts the control of tokens to the smart contract so that the smart contract can fill the orders. Smart contract allows tokens to be used only for this purpose - matching and filling orders. For example, the owners of the exchange cannot take control of user funds for their own purposes.

Usually these smart contracts have trustless backdoor for the user to withdraw their tokens in the case the main website or engine is down.

  • Thanks. So it means that we need to deposit our tokens into a smart contract to protect us? But as in my question, there is "atomic swap", which swaps tokens "cross chain". And in the concept of "atomic swap" that I've read, only when you are trading tokens, the tokens are sent to the smart contract (the mutual safe) automatically, so you don't need to "deposit" tokens directly. Am I misunderstood anything? Nov 19 '18 at 7:55
  • I am not sure if I understood your question. Whether deposit is direct or indirect does not affect the end result - the decentralized exchange must be able to take away those tokens from you to match a trade. Cross chain stuff is so complicated that it needs its own question. Nov 19 '18 at 9:43

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.