English module on
Decentralized Exchanges
Powered by Zft
Powered by likha

Safety and Risk Management when using DEXs

Co-written by Raphael Bustamante, James de Jesus, and Gabriel Paningbatan
Key Takeaways
  • Make sure your DEXs have proper smart contract auditing to avoid code vulnerabilities.
  • Be wary of Impermanent Loss when providing liquidity to liquidity pools.
  • Be aware of the regulatory risk when using DEXs.
  • It is important to practice risk management when using DEXs such as securing your devices with Two-Factor Authentication (2FA), hiding your private keys, and avoiding trading low liquidity pairs.

Although DEXs provide a lot of benefits and alternative features to those of TradFi, let's be smart about it. Let’s dive deeper into these so that we don’t unnecessarily put ourselves at risk.  

Smart Contract Auditing

Smart contracts are amazing for automating transactions, but they are crafted by humans, and sometimes the code will have vulnerabilities that hackers can exploit. This is why it’s important to stick to reputable DEXs with properly audited smart contracts. If you don’t know how to read the code, do your own research and see how other auditors rate it to see if a DEX behaves as it was intended to. The last thing you want is to connect your wallet to a compromised DEX and expose yourself to the risk of losing your funds.

Impermanent Loss

Another thing you should look out for when using DEXs is the concept of impermanent loss. Deposit crypto in a liquidity pool, and you might face impermanent loss. This refers to temporarily losing value in the assets you provided as compared to simply holding them outside the pool. What’s that? 

Imagine Vince deposited $1,000 worth of BNB (10BNB) and $1,000 worth of USDT (1,000 USDT) in a liquidity pool. Since liquidity pools require you to place the exact amount of each asset, we can conclude that the current price of BNB is $100. Now, assume the price of BNB rises to $150. Do  you think Vince can just simply withdraw his initial deposit (1000 USDT and 10 BNB) and sell his BNB to make money, right? Not necessarily. 

Due to the complex nature of liquidity pools, Vince might not get back the exact ratio of crypto in his initial deposit. Take note that liquidity pools operate using an Automated Market Maker (AMM). It essentially acts as an algorithm that prices the assets in a liquidity pool in relation to how much of it is left. (e.g., If a liquidity pool has 10 BNB, buying 1 BNB costs $100, but now that 9 BNB is left, buying another BNB would cost $111, after which only 8 BNB will be left, and buying another BNB would now cost $125, and so on). AMMs are a bit of a complex topic but the main point is that they will cause fluctuations in the amount liquidity providers will receive once they choose to withdraw.

Let’s do a bit of math here (Hooray!). 

Going back to Vince, the AMM of his liquidity pool could cause him to withdraw 9.5 BNB and 1020 USDT instead of his initial deposit (10 BNB and 1000 USDT). If he sold his 9.5 BNB he would get $1425 ($150 current price x 9.5 BNB) + $1020 USDT = $2445, in total. Since he initially deposited $2000, he made a $445 profit. Sounds great, right? However, had he just held his initial deposit, he would have had $1500 ($150 current price x 10 BNB) + $1000 USDT = $2500. That $55 that Vince could’ve made more had he just held his crypto, is his impermanent loss ($2500 amount made by holding - $2445 amount made = $55 impermanent loss). 

Hope the math wasn’t too hard! 

The thought that it’s a ‘loss’ might sound intimidating. But here’s the lowdown, this loss is impermanent because the assets’ value is dynamic based on the amount of liquidity in the pool. Should you withdraw your funds while at an impermanent loss, it becomes a permanent loss. But it is also possible to just wait for the value of your assets in the pool to rise again. If Vince waited a bit longer, the liquidity in the pool could change, and the AMM could give him back his exact initial deposit, no loss at all. However, there’s no guarantee when this will happen or if it will happen, so take it with a grain of salt. Should you plan to be a liquidity provider, understanding impermanent loss is crucial! 

Regulatory Risk

With DEXs still being a relatively new form of technology, the regulatory framework around them is still in its infancy stage. There are scrutinies on their decentralized nature and the lack of compliance with TradFi systems. Some regulators criticize DEXs for the following reasons:

  • Lack of know-your-customer (KYC) and anti-money laundering protocols;
  • Cryptocurrencies on DEXs are being considered as securities; and 
  • DEXs have total inclusivity, meaning there’s a high chance for criminals to use them. 

Some regulators may consider actions like banning DeFi protocols or imposing sanctions on those involved. Just with any financial tool we engage in, it is always important to keep a watchful eye on regulatory developments to navigate the space responsibly and mitigate legal risks.

A Few Risk Management Guidelines

Just like with CEXes, there are also some practices you should regularly do to ensure security. Some of these include securing your devices with Two-Factor Authentication (2FA) and hiding your cryptocurrency wallet's private keys to avoid having your wallet compromised. You should also try to avoid trading low liquidity pairs since these are prone to manipulation. Safety first! 

Overall, when trading with DEXs, having a plan and sticking to it is crucial to be able to react properly to whatever happens in the DeFi and DEX space.

Decentralized Derivatives Trading at your Fingertips

Trade major pairs with advanced trading tools, low fees, and exciting campaigns today.

Visit KTX.Finance here →

ZFT is home for the new gen of Wealth Builders.

Learn how to trade with ZFT →

Think you've mastered "

Safety and Risk Management when using DEXs

" now?

Take the quiz!