Anti-arbitrage attacks will be a new trend in the development of DEX, comparing the three pioneering MEV protection DEX

The Way of DeFi
2021-06-07 15:23:26
Collection
This article conducts a detailed analysis of trading examples for three typical MEV-protecting DEXs: ArcherSwap, CowSwap, and MistX.

This article was published on llamacorn and translated by DeFi Dao.

During last year's DeFi summer, we saw many DEX aggregators, such as 1inch, Matcha, and ParaSwap, which played an important role in our daily trading, allowing us to obtain better prices and lower fees.

By the way, I have always held the view that the value ceiling of tool-type crypto assets is lower than that of infrastructure-type crypto assets, because the value of tool-type crypto assets depends on their ability to prove their irreplacability. This is difficult. Moreover, they are primarily built on infrastructure-type crypto assets, such as trading aggregators for DEXs and interest rate protocols for money markets.

Finding a product that can grow into infrastructure is really difficult; they are more prone to failure, so there is also great fun in exploring innovations in tool-type crypto assets.

A year has passed, and DEX aggregators have evolved into a more powerful and comprehensive stage to address the ++Ethereum is a Dark Forest++ issues of ++MEV (Miner Extractable Value)++, gas, and slippage.

This article will discuss three pioneering innovative DEX aggregators in this field, namely ArcherSwap‌, CowSwap‌, and MistX‌, which I refer to as MEV-protecting DEXs.

The following is illustrated through trading examples.

1. ArcherSwap

As mentioned in this article‌, "Archer Swap provides traders with the absolute best prices for large trades on Uniswap and SushiSwap without worrying about front-running bots." The realization of these features relies on the Archer Relayer. The Archer Relayer can collaborate with miners to find the most valuable trades for them and allow them to submit trades to the Ethereum mainnet. Additionally, it can benefit traders, who only need to pay a small fee to miners, while the Archer Relayer helps them bypass the public mempool to settle trades.

For example, this trade
NGC Cai Yan: Interpreting Innovations in the MEV-Protecting DEX Field

A trade on ArcherSwap

I spent 0.2 WETH to buy 1.418 AAVE. The process: 0.2 WETH was first transferred to the Archer Router address, then 0.0639 ETH was transferred to the ArcherSwap TipJar contract as a tip to the miner (UU pool). The Archer Router address was then routed to Uniswap. Thus, I was able to bypass the public miner pool to complete this trade, with gas fees of 0 but a very high miner tip (automatically set).

On the ArcherSwap user interface, there is also an option to toggle manual tip settings and enter the tip amount yourself. However, if the tip is insufficient, miners are unwilling to package your trade.

Additionally, ETH must be sent to the ArcherSwap contract first, which may lead to some centralization issues. The success of the trade highly depends on the complexity of the contract. My friend Blanker has described some bugs in their contract on Twitter, which left some non-transferable ETH in their contract.

  1. CowSwap

CowSwap is developed by the Gnosis team and is supported by the MEV-protecting Gnosis Protocol V2 (GPv2). GPv2 optimizes for coincidence of wants (CoWs‌), which can be explained as "an economic phenomenon where two parties each hold what the other wants, allowing them to exchange these items directly."

In other words, CowSwap first matches orders for traders off-chain, and if it does not find other demand trades, it submits the trade to other on-chain DEXs.

CowSwap introduces the concept of solvers to achieve this, encouraging solvers to compete with each other to provide the best order settlement for traders in exchange for rewards for each batch. Users submit trade orders with a certain degree of flexibility, as solvers need to find the most optimized way to settle.

Since trades can be settled off-chain, CowSwap does not require external on-chain liquidity, thus reducing trading costs. CowSwap will use a unified price to settle all orders in the same batch, known as the batch auction mechanism.

Before confirming the swap, a signature is required that includes information such as sell/buy type, amount, expiration date, etc., to allow CowSwap to record your order off-chain. Then 'Slovers' start looking for suitable CoWs for you.

For example, this trade

You will find that the trade is recorded in the Gnosis Protocol browser. By clicking on the Transaction Hash, you can see the transaction details.
NGC Cai Yan: Interpreting Innovations in the MEV-Protecting DEX Field

CoWs found in the trade

CoWs were found in this trade, which was conducted off-chain and was not routed to Uniswap. Therefore, you will not find this trade in your address; the actual settlement of the trade was done by their contract.

For another example, also check the transaction details
NGC Cai Yan: Interpreting Innovations in the MEV-Protecting DEX Field

CoWs not found in the trade

In this trade, no CoWs were found; Gnosis deducted protocol fees and transaction fees of 0.005 WETH from the 0.2 WETH and routed this trade to Uniswap V2.

3. MistX

MistX is a project developed by the Alchemist team, which operates very similarly to ArcherSwap. Additionally, a project called BackRunMe developed by the bloXroute team also operates in a similar manner. ArcherSwap is compatible with FlashBots, while MistX directly uses FlashBots, and BackRunMe is supported by bloXroute. FlashBots, bloXroute, and other similar tools are used as searchers to submit trades to the ETH mainnet.

To be honest, the user interface of MistX looks like a complete copy of ArcherSwap. However, compared to ArcherSwap, the logic of trade routing in MistX has seen significant improvements. This is because it skips the first step of having to send ETH to the ArcherSwap contract, which could lead to some centralization issues.

While both MistX and ArcherSwap can automatically adjust miner tips, MistX performs better with smarter tips.

For example, this trade
NGC Cai Yan: Interpreting Innovations in the MEV-Protecting DEX Field

A trade in MistX

I spent 0.2 WETH to exchange for 1.43 AAVE. The process: 0.00516 WETH was transferred as a tip to the miner address (Ethermine), and 0.000271 WETH was transferred to the MistX address. Then, the MistX Router Address was routed to Uniswap V2. Thus, MistX bypassed the public mempool and published the trade in a bundled form in Flashbot's private mempool.

Reference: Hasu provides a very detailed analysis of trades on MistX in this article‌.

Feature Comparison

The following table compares the core features and differences of various MEV-protecting DEXes:
NGC Cai Yan: Interpreting Innovations in the MEV-Protecting DEX Field

Fee/Revenue Structure: No Gas?

The fee structures of these products are quite vague. They may not want to clarify this because Degens only care about overall trading efficiency.

However, since I have tried each product, I can provide two general conclusions and some detailed explanations.

1. The revenue of these projects mainly comes from your trading funds or miner tips.

2. There is no free lunch in the world. No gas means that gas is compensated in other ways.

In ArcherSwap, they do not charge gas fees because it is included in the miner tips. Miner tips can be adjusted but are generally unfriendly to micro-trades. ArcherSwap can extract some fees from miner tips as revenue, but it seems they do not do so. Traders also need to pay trading fees for Uniswap/SushiSwap.

CowSwap claims not to charge protocol fees during the testing period, but now it seems to charge about 1-1.5% of the trading amount as fees.

Again, let's compare these two trades.

If GPv2 finds CoWs‌, you only need to pay the protocol fee, which is 0.0159 AAVE. However, if GPv2 does not find CoWs‌, I guess users need to pay Uniswap trading fees and protocol fees, totaling 0.005 WETH. This is why the fee accounting for these two trades is different. (0.0159 aave/1.4636 aave=1.08%; 0.005 weth/0.2 weth=2.5%).
NGC Cai Yan: Interpreting Innovations in the MEV-Protecting DEX Field

Additionally, interestingly, in the first trade, CowSwap paid me 0.00498 ETH as gas, so the net income was 0.0159 AAVE-0.00498 ETH≈-0.0028 ETH. In the second trade, CowSwap paid me 0.02 ETH as gas, so the net income was 0.005 WETH-0.02 ETH≈-0.015 ETH. CowSwap lost money in both trades! It seems that micro-trades on CowSwap are unfavorable for both CowSwap and traders.

MistX actually shares tips with miners, which can be seen in the transaction details. Regardless of the trade amount, it charges about 5% of the total tip. In the above example, 0.0002717 ETH/0.005435 ETH=5%). Traders also need to pay Uniswap/SushiSwap trading fees.

Conclusion

We must respect the innovations of these projects, which show us more possibilities for addressing the MEV protection issue, and there is indeed demand for these projects for large trades.

However, all these projects are in the early stages, and there is much to upgrade. Sometimes, we ordinary traders need to be cautious of "invisible consumption" when trading in these aggregators. And to be honest, when gas prices are low, large DEXs and low slippage settings may be more efficient.

Additionally, the tools behind these products, such as flashbots and bloXroute, are amazing infrastructures that can help us safely navigate the Ethereum dark forest and have broad application scenarios in many DeFi products.

Related tags
ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators