The dark forest of Ethereum spreads, why does DeFi need a privacy version of Uniswap?
This article is sourced from Manta Network.
This is a hidden and manipulated market where high-frequency traders exploit nanosecond (billionth of a second) time differences to capture "prey," quickly buying and selling to reap huge profits. This is the "game" in the "dark pool," where speed is everything.
This is the money game on Wall Street as depicted by Michael Lewis in his book "Flash Boys"—a small group of people, having mastered the resources that create speed, can gain early access to market information and profit from it. To front-run, they even blasted through mountains to build the straightest data transmission cables in history.
In centralized financial systems like Wall Street, due to systemic inequality or lack of transparency, ordinary investors find it difficult to compete with professional traders equipped with top-notch technology, often becoming "prey" that can be easily captured.
With the rise of decentralized finance (DeFi), a plethora of innovative, permissionless decentralized financial tools have emerged, bringing an unprecedentedly rich product experience. Decentralized exchanges (DEX), represented by Uniswap, have flourished, propelling DeFi to grow into a market worth hundreds of billions in a short time.
Current mainstream AMM-based decentralized exchanges seem to be an ideal design, providing more efficient price discovery and fairer trading, with smart contracts ensuring security and avoiding the risks of centralized exchanges running away with users' funds; users' orders are executed via smart contracts and are publicly visible on the Ethereum network.
However, it is precisely these intentions that have turned Ethereum, the largest DeFi fertile ground, into a daunting "dark forest."
The Dark Forest of Ethereum
The "Dark Forest Theory" originates from the famous science fiction novel "The Three-Body Problem." In the novel, Liu Cixin compares the universe to a dark forest, where every civilization is a hunter stealthily moving through it. If one civilization discovers another, it will attack like a hunter shooting at prey, ultimately leading to the destruction of one civilization.
With the onset of last year's DeFi summer, it has become very common for users on blockchain networks like Ethereum to be attacked by "other civilizations" due to their exposed whereabouts.
As early as 2019, Cornell University blockchain researcher Philip Daian pointed out in his paper "Flash Boys 2.0" that, just like high-frequency traders on Wall Street, arbitrage bots on the blockchain can exploit the transparency of DEX and network latency to front-run and harvest other users.
Coindesk columnist Frances Coppola describes the Ethereum network as a "Lit Pool" (as opposed to a dark pool). "Prey can clearly know of the hunter's existence, but they cannot escape."
When you submit a transaction on Ethereum, it waits in the mempool (public memory pool) for miners to package it. This transaction is like a sitting duck, with nowhere to run. Everyone in the pool can see it. The transaction can be copied, front-run, or even stolen.
After a user initiates a transaction on the Ethereum network, the transaction information is broadcast to nodes, and each transaction incurs a fee, known as Gas. Generally, miners prioritize received transactions based on Gas fees from high to low to decide which transactions to include in the block first.
When the transaction volume on the Ethereum chain surges during a certain period, to get a transaction accepted by miners sooner, the sender can increase the Gas for that transaction to incentivize miners. The portion of fees beyond normal transaction costs and block rewards is known as Miner Extractable Value (MEV).
For a long time, Ethereum has been operating in an orderly manner sorted by blocks: users with higher bids get their transactions packaged first, and miners earn more tips, which seems fair.
The Ethereum system includes two types of accounts: external accounts and contract accounts. A regular transaction between external accounts consumes 21,000 Gas; however, executing transactions on contract accounts requires varying amounts of Gas depending on the complexity of the smart contract. A transaction executing a smart contract can consume hundreds of thousands or even millions of Gas.
In the summer of 2020, the explosion of Ethereum's application layer gave rise to a DeFi boom, with a series of innovative products such as AMM, collateralized lending, liquidity farming, and algorithmic stablecoins emerging. The interactions with contracts on Ethereum became increasingly complex, requiring more and more Gas to call these smart contracts, leading to an explosive growth in MEV.
Source: https://explore.flashbots.net/
Various high-quality project IDOs, arbitrage opportunities between different DeFi platforms, and liquidation transactions generated during significant market fluctuations… Every interaction with smart contracts on Ethereum hides enormous wealth. In the pursuit of profit, the DeFi world has seen more players emerge—opportunistic whales, arbitrage bots, liquidation bots, hackers, and front-running bots. They search for their wealth opportunities in Ethereum's dark forest, collectively referred to as "searchers."
As the lifeline of DeFi, DEX has undoubtedly become the focal point of competition among these searchers.
A Transparent GAS Race
On Ethereum or other public chains, anyone can leverage publicly available information and transaction confirmation delays to monitor other users' DEX transactions. Upon discovering another's trading intentions, they can increase Gas fees to push their transactions to the front, thus completing a front-run.
Similar behaviors include back-running and sandwich attacks.
We can understand this process through a simple example: User B listens to the mempool and discovers that User A intends to buy a large amount of ETH on Uniswap, an amount significant enough to potentially drive up the ETH price. Therefore, before this large transaction is completed, User B initiates a faster transaction with higher Gas (front-running), then closely follows User A to sell ETH at a higher price (back-running), successfully earning a profit from the price difference. In this way, User B completes a sandwich attack through a double squeeze.
The pursuit of MEV value has spawned a variety of bot types: front-running bots, back-running bots, liquidation bots… On-chain, they seek every opportunity to "squeeze" profits, and even hackers are not spared. Ironically, in the DODO security vulnerability attack incident that occurred in March this year, hackers were intercepted by front-running bots.
This front-running business is not without risks; the enormous profit margins attract more and more bots to compete against each other. When everyone focuses on a large order, ultimately, there can only be one winner, while most other bots merely serve as runners, and the massive Gas consumed in the process goes to waste.
Many profitable strategies are taken entirely by the winners. When everyone in the market tries to do the same thing, the one who takes all the money is the one who can collect data and respond the fastest using a computer.
------ "Flash Boys"
In the financial game on Wall Street, speed is the fastest weapon. In the dark forest of Ethereum, no matter how fast front-running bots can be, the ultimate top of the food chain remains the miners.
On Ethereum, miners have the authority to control the transaction ordering within the blocks they produce; they are both referees and athletes. As long as this remains unchanged, miners can always front-run. They can replicate the strategies of front-running bots to take profits for themselves or sell their positions in the transaction ordering to share profits with front-runners.
Regardless, front-running is essentially an unfair plunder of DEX users—people pay high Gas fees but face transaction failures or significant losses due to high slippage. Through websites like sandwiched.wtf, anyone can check how much profit has been squeezed away by front-running bots.
Source: sandwiched.wtf
The intensification of front-running competition also occupies valuable block space, causing on-chain congestion, severely affecting the user experience on Ethereum, making ordinary users wary, and ultimately turning it into a paradise for front-runners.
The front-running issue is not only present on Ethereum but is also common on other public chains supporting DeFi.
If the front-running problem is not resolved, it will become a nightmare accompanying DEX: the larger the DEX traffic, the greater the space for front-running, leading to more troubles and injustices for trading users, which in turn will limit the development of DEX.
From another perspective, the expansion of DeFi participants from individuals to large institutions is an inevitable trend, and better on-chain privacy protection is a prerequisite for institutional entry. Therefore, only by solving the privacy issue can DEX scale up, and DeFi can truly "break out."
To address the front-running problem, various solutions have been proposed within the industry. For example, users can use services that limit slippage or utilize privacy transactions that go directly to miners; Flashbots has introduced a solution to eliminate information asymmetry, making arbitrage opportunities public and allowing stakeholders to share in the benefits—MEV-Geth. Decentralized exchanges like IDEX use order book-based DEX protocols to complete order matching off-chain and settle on-chain, but none of these fundamentally solve the front-running problem while ensuring efficiency.
Privacy Version of Uniswap
Due to its simple design, super-efficient Gas efficiency, and capital efficiency, AMM is regarded as one of the most innovative inventions in DeFi in recent years, driving explosive growth in DEX trading volume. To fundamentally solve the privacy protection issue without sacrificing efficiency, we need a privacy version of Uniswap.
Aiming to become the privacy protection infrastructure for the entire decentralized finance ecosystem, Manta Network has developed a decentralized privacy payment protocol—MantaPay, based on zk-SNARK cryptographic technology, and a decentralized privacy token exchange protocol—MantaSwap.
Users can use MantaPay to swap various assets on Polkadot and its Parachains at a 1:1 ratio for corresponding privacy tokens, using these privacy tokens for payments. At the same time, these privacy tokens can be exchanged on MantaSwap without leaking any trader's information.
Source: Manta Network Whitepaper
MantaSwap will be the first decentralized exchange in the DeFi world to use zk-SNARK cryptographic technology to protect users' on-chain privacy, ensuring the privacy of trading users and liquidity providers. Additionally, the LP tokens of liquidity providers are also private and tradable. MantaSwap, like mainstream DEX such as Uniswap, is based on AMM, ensuring higher Gas efficiency and capital efficiency while guaranteeing user trading privacy.
Compared to traditional decentralized exchanges like Uniswap, MantaSwap allows users to trade various mainstream digital assets while ensuring end-to-end privacy for trading users. When users' trading intentions are hidden, front-runners have no means to act.
Manta also covers decentralized privacy payments and decentralized privacy trading for assets in the Polkadot ecosystem, making it irreplaceable for users with a strong need for privacy protection, especially institutional users. Built on Polkadot's parachains, it ensures sufficient decentralization while offering better performance and more customized designs than Ethereum, as well as stronger interoperability than standalone public chains. Manta's vision is to become the leader in privacy protection for the entire decentralized finance ecosystem.
As individual users increasingly value privacy, especially with many institutions entering the cryptocurrency space today, we need a privacy version of Uniswap to return DeFi to a fair and democratic innovation space accessible to everyone, rather than a paradise for front-runners.
References
Ethereum, Dark Forests and the Limits of Transparency
https://www.coindesk.com/ethereum-dark-forests-limits-of-transparency
Front Running: The Achilles' Heel of Decentralized Trading
https://www.chainnews.com/articles/285280126963.htm
Manta Network Whitepaper
https://eprint.iacr.org/2021/743.pdf
Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges
https://arxiv.org/abs/1904.05234
"Flash Boys: A Wall Street Revolt," by Michael Lewis