You’re probably familiar with traditional cryptocurrency exchanges like Coinbase or Binance. And, you probably know that these exchanges are run by central authorities which hold your funds in custody while you trade. This puts your money out of your control and at risk of theft.
But did you know that many decentralized exchanges or DEXs allow you to make trades directly from your wallet? In fact, in many cases when you trade on a DEX, the funds never leave your wallet which means you avoid paying withdrawal fees on money that’s yours to begin with. But how does that work?
DEXs are smart contracts
Decentralized exchanges are smart contracts that exist on the blockchain. These smart contracts enable peer-to-peer trading by connecting buyers and sellers. There are several ways that decentralized exchanges can provide liquidity to traders. One popular method is to have users supply the coins, tokens, or liquidity necessary for the smart contract to perform trades on demand. These funds are held in the smart contract.
Another way is to keep an orderbook of proposed trades to be submitted to the blockchain later. Users can either propose a trade and sign a transaction or order saying they are willing to trade a set amount of tokens at a set price. Or, you can take an order off the books by signing the other half of a proposed transaction. When the buyer and seller are matched, the transaction signed by both parties is submitted to the blockchain and the funds are swapped between the two users’ wallet.
In both cases, the funds either never leave your wallet or are securely held in a smart contract instead of some company holding your money. And, user like yourself that provide liquidity to a DEX earn a cut of the fees that would usually go to an exchange.
Smart contracts are open for anyone to use
When you think of an exchange or DEX, you’re probably thinking of a website. And while it is true, you usually use a web interface to interact with DEXs; the smart contract behind the website you use to “trade on a DEX” is what actually makes the magic happen.
Think of an interface like a keyboard; your computer doesn’t care what type of keyboard your using. The only thing that matters is that the keyboard is inputting the correct data. Smart contracts are like your computer in this case. They don’t care how you interact with them as long as you input the right information into the DEX. And so, this means that you can use any interface you want to trade using these DEX smart contracts.
Get the best-priced trades with DEX.AG
If you have the choice to use any interface, why not choose one that is convenient and saves you time and money? That’s what DEX.AG was built for. In the past, you would have had to run around to each DEX and compare prices, but those days are over. DEX.AG checks 10 different decentralized exchanges to find you the best price so you don’t have to.
How does it work?
You start by picking whether you’re trying to buy or sell a token at the top of the screen. Next, select the token and the amount you’re looking to trade. And then, hit the Find Trades button.
The exchange found at the top of the list will be the best trade available on the market for the trading pair and amount you’ve chosen. Click the ‘Buy Now’ button and MetaMask will walk you through submitting your trade to the DEX. However, if you haven’t previously interacted with the DEX, you’ll be required to send an approval transaction to the smart contract first.
After hitting submit, your trade will be complete as soon as your transaction is confirmed. Well would you look at that, you’ve completed your first trade on a DEX in just a few clicks!