2

What is "swap" presicely between ERC20 tokens? Is it exchanging one ERC20 token for the other without fees, in the most possible native way?

How is it different from "convert"?

Let's say I want to "swap" my Ethereum for Dai or some other ERC20 token. Can I do it on my own? I'm a programmer, so writing a bit of code, if required, for it would be ok.

3
  • Your question is quite unprecise. In general you can use an exchange like Uniswap to trade certain tokens for each other providing there's liquidity. Please make your question more precise so that people can answer it. What exactly are you asking? How to swap? How to swap feelessly?
    – Philogy
    Commented Jan 19, 2021 at 14:09
  • @MrClottom you see my 1st sentence? What's unclear in it? Commented Jan 19, 2021 at 14:22
  • There is no concrete definition of a "token swap". But generally token swaps can contain fees.
    – Philogy
    Commented Jan 19, 2021 at 14:25

1 Answer 1

2

What is "swap" presicely between ERC20 tokens? Is it exchanging one ERC20 token for the other without fees,

A "swap" is a trade, which may or may not include an explicit fee. By "trade" I mean you are buying one currency or token for another.

As we're talking about ERC20 tokens, and not derivatives*, the term "swap" has been popularised by decentralised exchanges such as Uniswap and Sushiswap. These exchanges charge an explicit fee of 0.3%. And they are just as the name suggests: exchanges, where two or more transacting parties can buy and sell (i.e. exchange) tokens from each other.

...in the most possible native way?

I think by this you mean "without fees, and for the correct current market price".

Which market? There are many markets, and prices aren't static. To get the "best" or "fairest" prices, you need to find the market with greatest liquidity. In general, you can't do this by yourself, you have to go somewhere that this liquidity exists (i.e. an exchange).

How is it different from "convert"?

What do you mean by convert? I would posit that there's no such thing as a currency conversion; there's only a trade.

When you go to a bank or Travelex desk at an airport you are not "converting" one currency for another, you're entering into commercial transaction. The bank or exchange is selling currency to you in exchange for another currency. (In their case they often claim not to charge fees, but in reality they just transact above the market rate in their own favour.) Do they have access to sufficient liquidity to give you a fair price? Probably. Do they? Not in my experience. (Yes, some banks claim to use the Interbank Exchange Rate... )

Let's say I want to "swap" my Ethereum for Dai or some other ERC20 token. Can I do it on my own?

Who will be on the other side of the trade? If you can find someone to trade with, then yes. But as above, you're more likely to get a "fair" price if you trade in a place with sufficient liquidity for fair prices to exist.

(*Not relevant here, but in the world of trading instruments, a swap is a type of financial instrument that defines a sequence of cash flows between parties.)

4
  • Who will be on the other side of the trade? - I will. Namely, I want to swap or convert or trade some of my Eth, to Dai or any other ERC20 token. A trade with on my own and with myself, that is. Can it be done by writing code instead of having to go an exchange? Commented Jan 20, 2021 at 8:30
  • 1
    "convert" --> this may possibly be synonimous with "swap". However, at binance, for instance, there's "convert" which works between different coins, not only ERC20. And at MetaMask there's "swap" between ERC20 tokens only. Do they reffer to the same thing - exchaning one coin for the other, and are synonims? Commented Jan 20, 2021 at 8:34
  • Okay, if you're trading currency A for currency B, with yourself, where will A go when you have traded it? Where will the new B come from? You can't transmute A for B. Trading/swapping/converting is in this sense immutable: the coins or tokens must already exist before the trade and continue to exist after the trade. (You could create your own ERC20 token contract, with your own token, but I don't think that's what you're getting at... ) Commented Jan 20, 2021 at 10:25
  • I would say in this context "convert" is synonymous with "swap", yes. Binance is a cross-currency exchange, so can work with coins outside of the Ethereum ecosystem and "convert" (trade) between many different coins and tokens. Metamask, Uniswap, Sushiswap are all based on Ethereum, so only deal with Ethereum-based tokens (e.g. ERC20, ERC721). Commented Jan 20, 2021 at 10:26

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.