A Beginner’s Guide To Decentralized Exchanges (DEXs)

In the past, innovations such as automated market makers that were created to solve the liquidity issues of the crypto market attracted several people toward the decentralized financial (DeFi) system and helped in its growth. The decentralized exchanges, commonly known as DEXs, are used to carry out transactions directly by the crypto dealers.

These decentralized exchanges do not involve involvement and management by any custodian or an intermediate party. However, smart contracts are agreements executed independently to facilitate these transactions. Decentralized exchanges permit peer-to-peer crypto trading. The marketplace responsible for linking sellers and buyers is known as peer-to-peer trade.

Any authority does not look after these marketplaces, and the user has control over the keys of his wallet. He can access his crypto assets using the private key assigned to his wallet. After logging into their decentralized exchanges, the users can get access to their private keys.

The users who do not want to reveal their personal information are of great benefit as they do not need to enter any personal address or name.

These decentralized exchanges were created to eliminate any central authority assigned to look after the trading procedure performed by any exchange. The decentralized platforms have grown to the mainstream as they offer services such as token prices, charges for swapping, etc., at a better rate to the customers than others.

Here is a comprehensive guide article explaining the concept of decentralized exchanges and their working. Moreover, it will also explain the pros and cons of using decentralized exchanges (DEXs).

What are Decentralized Exchanges (DEXs)?

As the central exchanges involve any central body, such as banks, to look after the financial services that are mainly responsible for making a profit. On the contrary, without any involvement of a mediator, smart contracts are used by traders in decentralized exchanges to execute the required orders.

Most of the trading volume in the crypto market is usually owned by centralized exchanges as these platforms are convenient and easier to use, and they also provide security to the assets of the customers, being regulated entities. In addition, in some cases, insurance on the deposited assets is also offered by some of the centralized exchanges.

The centralized exchanges offer almost the same services as the banks. The funds of the customers are kept in custody and looked after by the banks. Moreover, they also provide regulatory assistance to clients that cannot be handled by individuals on their own. This also makes it easier for customers to move their funds to different platforms.

On the other hand, using the smart contracts that back up the trading platforms, the users can directly trade from their wallets in case of decentralized exchanges. The funds are looked after by the traders themselves, and they are responsible for any loss they face in trading. In case the trader loses the private keys to his wallet or sends it to any wrong wallet mistake, he may lose the funds permanently.

The decentralized exchange portals issue an “I Owe You” (IOU) to the funds and assets deposited by the customer, permitting them to trade freely over the network. The IOU has the same value as the underlying asset as it is a token based on the blockchain network. Several blockchain networks that support smart contracts are used to build multiple decentralized exchanges.

These exchanges are directly built on the blockchain network and are integrated at the top of layer one protocol. Usually, the Ethereum blockchain is used to make the most reputable and well-known decentralized exchanges.

Working of Decentralized Exchanges (DEXs)

As the blockchain networks that support smart contracts are used to build most of the decentralized exchanges, the custody of the funds is in the hands of the user himself.

There is a specific transaction fee associated with the trading fee whenever any trade is carried out. Therefore, in order to use the decentralized exchanges, the traders have to use the smart contracts available on that blockchain network.

Types of Decentralized Exchanges (DEXs)

Decentralized exchanges are of three types: the Automated market makers, the Order books decentralized exchanges, and the decentralized exchanges aggregators. Smart contracts are utilized in all kinds of decentralized exchanges to exchange funds.

  • Automated Market Makers (AMM)

In order to solve the liquidity problems of the crypto market, automated market maker (AMM) systems relying on smart contracts were developed.

The developers got the inspiration to create these exchanges from some papers written by the co-founder of the Ethereum blockchain network, Vitalik Buterin. In his writings, he mentioned the methods by which trades can be executed by using blockchains that operate on smart contracts carrying tokens.

The automated market makers are dependent on services that are based on blockchain networks. These services are used to get information from multiple platforms and exchanges in order to set the prices of the assets that are to be traded. These assets are known as blockchain oracles.

The smart contracts that are associated with these decentralized exchanges utilize the pools of assets that are funded beforehand, known as liquidity pools, instead of matching the sell and buy orders in the market. Some other users also add their funds to the pool by paying the transaction fee demanded by the platform. The required price has to be paid whenever the particular pair is traded.

Moreover, to earn interest on their crypto assets, an equivalent value of each asset has to be deposited by the liquidity providers. This process is known as liquidity mining. The transactions will be invalidated by the smart contract at the back of the pool if the user deposits more value of one asset than the other.

To earn interest in a trustless manner that does not require any permission or to execute the trade orders on time, the traders can conveniently utilize the liquidity pools. It is the total locked value (TLV) is the number of funds that are locked in the smart contracts that decide the rank of these exchanges.

Slippage is a downside of automated market makers when there is insufficient liquidity in the crypto market. When the market lacks liquidity, the buyer is compelled to pay the prices for their orders higher than the usual market prices.

This phenomenon is known as slippage. The slippage gets higher for larger orders without deep liquidity. This prevents wealthy and professional traders from investing in these platforms, which may lead to loss.

When two assets are deposited for a specific trading pair, this may directly result in an impermanent loss for most of the liquidity providers. If the volatility related to one of the assets is more than the other, this may result in a decrease in one of the assets in the liquidity pool because of trade at the exchange.

The amount that is held by the liquidity providers drops as the price of the highly volatile asset increases, causing an impermanent loss to the liquidity providers.

As the trade on the exchange can balance the ratio of trading pairs and the asset’s price can again be moved upward, the loss becomes more impermanent. The proportion of each asset held in the liquidity pool is described by the ratio of pairs. However, the loss faced over time can be overcome by the fee collected during the trading process.

  • Order Books Decentralized Exchanges

To sell or buy assets for specific asset pairs, the records of all the open orders are compiled by order books. When a trader is willing to bid or buy an asset under consideration at a specific price, it signifies the buy order.

On the other hand, when the trader seeks to sell or ask for a set price for an asset, it indicates the sell order. The market price on the exchange and the spread of the order book is determined by the spread between these prices.

There are two types of Order books decentralized exchanges. These two types are explained below.

On-chain Order Books: While storing the funds of the users in their wallets, the decentralized exchanges that utilize the order books provide access to order information on-chain. By using the funds that are borrowed by traders on their platform, the traders are allowed to leverage their positions by these exchanges.

As the earning potential of the trader increases by the leveraged trading, at the same time, it also increases the liquidation risk as the size of the position with borrowed funds goes up. This is still a rapid process, even if the bet is lost by the traders.

Off-Chain Order Books: The order books are held by decentralized exchanges off the blockchain and only provide the benefits that are given by centralized exchanges to the traders while trading over the blockchain.

The costs for trading can be reduced, and the speed can be increased by using off-chain order books. However, this makes sure that the trade is carried out at the prices that are usually demanded by the customers.

Moreover, the users are also allowed to lend their funds to other traders in the market in order to provide leveraged trading options. Interest is earned by the funds that are gained as loans, and the liquidation mechanism of the exchange secures them too. This helps ensure that even if the lenders lose funds, they get paid.

However, it is essential to note that most of the time, liquidity issues are faced by order books decentralized exchanges. Due to their competition with the centralized exchanges, the extra fees incurred to carry out the transaction on-chain, usually centralized platforms, are preferred by the traders.

On the other hand, these charges are reduced by the decentralized exchanges having off-chain order books but then risks related to smart contracts increase as the traders need to deposit some funds in them.

  • Decentralized Exchange Aggregators

To solve the problems related to liquidity, several different protocols and mechanisms are used by decentralized exchange aggregators. Many issues, such as optimizing swap fees and prices of tokens, decreasing slippage on large orders, and offering the traders with best possible prices, are solved by these platforms by gathering liquidity from several decentralized exchanges.

Other two significant goals of decentralized exchange aggregators include the protection of users from the pricing effect and decreasing the chances of transactions being failed.

Moreover, to provide a better experience to the users, liquidity from centralized platforms is also aggregated by some of the decentralized exchange aggregators. When integration with the centralized exchanges is leveraged, it is done while being non-custodial.

How Can Decentralized Exchanges be Used?

One does not require any email to use these decentralized exchanges as these platforms do not need any signup procedure. However, on the exchange network, the traders will require a wallet that is compatible with smart contracts.

From the financial services that are offered by the decentralized exchanges, anyone can seek advantages if he owns a smartphone and a good internet connection.

The first step to using decentralized exchanges is to decide the network that one wants to use, as there will be a transaction fee integrated with every trade. After selecting the network, choose a compatible wallet and then add the native tokens to it. The token used for the payment of fees whenever a transaction is carried out in a specific network is known as a native token.

The interaction with decentralized applications such as decentralized exchanges has been made easier by using wallet extensions as the funds can be accessed by the user directly from their browsers.

Like other extensions, the users can install them and then use a seed phrase to import any existing wallet or create a new one through a private key. Moreover, the password further ensures the security of the wallet.

Traders can also conveniently use these DeFi protocols as mobile applications are available for these wallets. There are browsers that are built into the networks for interacting with smart contracts. Wallets can be synchronized by the users by importing them between the devices.

Pros of Using Decentralized Exchanges

Although trading over the decentralized exchanges may prove expensive for traders, however, there are multiple advantages integrated with using DEXs.

  • Availability of Tokens

Any token can be included by the decentralized exchanges that are minted on the blockchain on which they are built. Therefore, any new project will be first listed on these platforms before being accessible to centralized exchanges. This helps the traders to access the projects efficiently, but all kinds of scams are also present on the decentralized exchanges.

  • Anonymity

The anonymity of the user is preserved while using decentralized exchanges while the cryptocurrency is exchanged between the users. There is no need for the user to undergo the KYC procedure as in centralized exchanges. Therefore, decentralized exchanges grab multiple users’ attention who do not want to reveal their identities.

  • Reduction in Security Risks

While using decentralized exchanges, the risks of being hacked are reduced as the funds are in the custody of the user himself. In case of any illicit activity, the liquidity providers will be harmed only.

  • Reduction in Counterparty Risks

When the other party involved in a transaction does not fulfill the demands of the deal and the conditions set initially, it leads to counterparty risks. As there are no mediating bodies involved in decentralized exchanges, it eliminates this risk. The user might carry out research related to the audits of smart contracts offered by the exchange and the experience of the trader before finalizing one.

Cons of Using Decentralized Exchanges

There are certain vulnerabilities attached to smart contracts that add up to the disadvantages of decentralized exchanges. Some of them are mentioned below.

  • Requirement of Specific Knowledge

One can access decentralized exchanges through crypto wallets integrated with smart contracts. Therefore, it is essential for users to know about using these wallets and the concepts related to the security of the wallet.

  • Smart Contract Risks

As smart contracts on many blockchains are accessible to everyone, and any person can review the code, large, decentralized exchanges audit their smart contracts via reliable firms so that their code remains preserved. However, the audits or the code reviews may be skipped due to any bug or problem.

  • Unvetted Token Listing

On decentralized exchanges, tokens can be listed by anyone to provide liquidity to other currencies. However, this may add to the susceptibility of scams for the investors by making them believe that they are buying a unique token for their wallet.

Therefore, in some decentralized exchanges, the users are asked to verify their smart contracts for the tokens they are seeking to buy.

Conclusion

The decentralized exchanges have enabled users to earn passive income and leverage their positions to add to the liquidity of the crypto market.

As smart contracts are used for building decentralized exchanges, there is a possibility that in the future, more applications will be discovered. The experts are of the view that by using decentralized exchanges, multiple services and products can be created that have not been possible in the past.