The problem with modern DEX is that a large part of the coins being traded are wrapped tokens.
All wrapped tokens are issued by bridges, that's their essence, if someone issued a wrapped token, it is automatically a bridge. And this bridge can suddenly close because it is centralized.
The bridge's scam will lead to the scam of all the tokens that the bridge has issued.
The risk of scamming bridges and wrapped tokens is highly underestimated.
To estimate the size of the problem, I asked an AI chatbot trained on fresh data "
list of cryptocurrency bridges that have lost users' money in the last 3 years with the amounts of losses".
In response I got a list of 9 bridges that have lost money.
In total, over $2 billion has been lost in cryptocurrency bridge hacks in the last 3 years.
The list is not complete, at least the DEX Waves scam last year, which I watched in real time as a user, was not included.
Waves bridge stopped converting wrapped tokens into original tokens and the price went to hell, estimated users lost about $100M.
Half a year later Waves launched a new bridge, changed the names of all the old tokens that had fallen to almost zero. The new bridge issued new wrapped tokens and DEX continued to work.
Trading on DEX is a great idea, we only trust the smart contract, fully trustless. However, there is a nuance in what exactly you buy on DEX.
If you have ETH and you want to buy BTC, on DEX you can only buy wrapped bitcoin, for example WBTC.
WBTC is an ERC20 standard token issued by the
BitGo bridge that is backed by native BTC 1:1.
BitGo publishes a
list of bitcoin wallets on their website so that everyone can verify that they have exactly as many bitcoins as they have issued WBTC, and so far they are doing fine. However, at any moment these bitcoins can be stolen from their accounts, for example by dishonest employees or under criminal pressure.
As long as you hold the wrapped token you are carrying this additional risk that has occurred due to the centralized issuer of the token.
Vitalik Buterin recommends using atomic swap from time to time, most recently in the post "
Don't overload Ethereum's consensus".
Here is a small quote from it:
Cross-chain bridges: similar logic as oracles, but also, try to minimize how much you rely on bridges at all: hold assets on the chain where they originate and use atomic swap protocols to move value between different chains.First of all, of course, we need to understand what atomic swap is and why it is better than bridge.
Atomic swap allows you to exchange coins issued in different blockchains without trusting the counterparty. You can exchange native coins, for example, native BTC for native ETH.
You can also exchange tokens of any standard, including ERC20, e.g. USDT.ETH to BTC.
You don't need to use a wrapped token, you just buy the asset on the right network. You don't need to trust the seller, it can be an anonymous person on the internet with no reputation.
The deal will either be finalized on both sides or canceled and everyone will be left with their coins.
The deal does not require a guarantor in the form of a person or organization.
In personal conversations, the first objection I've encountered when describing these fantastic features of atomic swap is usually "but that's impossible!".
However, it is possible, implemented even in a couple of working services, but it was done so obscurely or inconveniently that it has not yet become popular.
How the atomic swap works will be discussed in detail in the next article.