NGC Cai Yan: Interpretation of innovative experiments in the field of anti-MEV DEX

0

 100 total views

Anti-MEV DEX does not require gas fees because gas is paid in other ways, and ordinary traders need to pay attention to “hidden consumption” when trading in these aggregators.

Written by: Cai Yan (llamacorn), Managing Director of NGC Ventures

When DeFi entered explosive growth last summer, we witnessed many DEX aggregators, such as 1inch, Matcha, ParaSwap, etc., which played an important role in our daily trading life, allowing us to obtain better prices and Pay lower costs.

By the way, I have always had a view: the value ceiling of tool-type encrypted assets is lower than that of infrastructure-type encrypted assets, because the value of tool-type encrypted assets depends on the ability to evolve to prove its irreplaceability-and this is difficult to do To. In addition, they are mainly built on infrastructure-type encrypted assets, such as transaction aggregators for DEX, and interest rate agreements for currency markets.

It is really difficult to find products that can grow into infrastructure, and it is easier to fail. It is precisely because of this that it is also a lot of fun to study the innovation of tool-type crypto assets.

One year later, the DEX aggregator has developed to a more powerful and comprehensive stage, and is considering solving the problems of MEV (miner extractable value), gas fees, and slippage mentioned in the article “Ethereum is the Dark Forest” .

In this article today, I want to discuss three innovative DEX aggregators that are on the forefront of exploration in this field. They are ArcherSwap, CowSwap and MistX-what I call “anti-MEV DEX”.

My personal test transaction case

ArcherSwap

As mentioned in this blog : “Archer Swap provides traders with the absolute best price for large exchanges on Uniswap and SushiSwap, without worrying about being intercepted by preemptive trading robots.” The realization of these functions depends on Archer. Relayer.

Archer Relayer works with miners to find the most valuable transactions for them and let them submit the transactions to the Ethereum mainnet. In addition, it can benefit traders. Traders only need to pay some tips to miners. Archer Relayer will help traders bypass the public memory pool to settle transactions.

In this transaction example :

Example: A transaction on ArcherSwap

I spent 0.2 WETH in exchange for 1.418 AAVE. The process is to first transfer 0.2 WETH to the Archer Router address, then transfer 0.0639 ETH from this address to the ArcherSwap TipJar contract, and pay it to the miner (UU mining pool) as a tip. Then route the Archer Router address to Uniswap.

Therefore, I can bypass the public mining pool to complete this transaction. The Gas fee is 0, but the miner is paid a very high tip (automatically set).

On the ArcherSwap interactive interface, we can also choose to turn on/off the manual tip setting and enter the tip amount by ourselves. But if the tip is not enough, miners will not be willing to pack your transactions.

In addition, ETH must first be sent to the ArcherSwap contract design, which may cause some centralization problems. The success of the transaction largely depends on the quality of the contract. My friend Blanker has described some mistakes in their contract in his Twitter , resulting in some tokens that cannot be transferred out in their contract.

CowSwap

CowSwap is supported by Gnosis Protocol V2 (GPv2) developed by the Gnosis team, which provides protection against MEV. GPv2 is optimized for “Coincidences of Demand (CoWs)”. This coincidence can be explained as: “An economic phenomenon in which two parties each hold items that the other wants, so they can directly exchange these items.”

In other words, CowSwap first matches the order for the trader off-chain, and if no other demand transaction is found, it will submit the transaction to other DEX on the chain.
CowSwap introduced the “Solver” concept to achieve this function. Encourage Solver to compete with each other and provide traders with the best order settlement in exchange for rewards for each batch. Users submit trading orders with a certain degree of flexibility, because Solver needs to find the best way to solve them.

Since transactions can be settled off-chain, CowSwap does not require external liquidity on the chain, thereby reducing transaction costs. CowSwap will use a uniform price to settle all orders in the same batch, which is called a batch auction mechanism.

Before confirming the swap, you need to sign a message containing the type of sell/buy, quantity, expiration date, etc., to allow CowSwap to move your order off-chain. Then “Solver” began to look for CoWs that suit you.

The deal with cases

You will find that the transaction is recorded in the Gnosis protocol browser. And click Transaction Hash, you can actually see the transaction details .

NGC Cai Yan: Interpretation of innovative experiments in the field of anti-MEV DEX Example: CoWs were found in this transaction

This transaction found CoWs and processed the transaction off-chain without routing to Uniswap. Therefore, if you can’t find this transaction in your address, the settlement of this transaction is actually done by their contract.

Another example , check the transaction details .

NGC Cai Yan: Interpretation of innovative experiments in the field of anti-MEV DEX Example: No CoWs were found in this transaction

No CoWs were found in this transaction. Gnosis deducted the contract fee and transaction fee 0.005 WETH from 0.2 WETH, and routed the transaction to the Uniswap V2 protocol.

MistX

MistX is a project developed by the Alchemist team, and its working principle is very similar to ArcherSwap. In addition, a project called BackRunMe developed by the bloXroute team runs in a similar way.

ArcherSwap is compatible with FlashBots, MistX uses FlashBots directly, and BackRunMe is supported by bloXroute. FlashBots, bloXroute and other similar tools are all used as searchers to submit transactions to the ETH mainnet.

To be honest, the UI of MistX looks like a complete copy of ArcherSwap. However, the logic of MistX exchange routing is greatly improved compared with ArcherSwap. Because it skips the first step of having to send ETH to the ArcherSwap contract, this may cause some centralization issues.

Although both MistX and ArcherSwap can automatically adjust the tip amount to miners, MistX performs better and tips more intelligently.

Take the following transaction as an example:

NGC Cai Yan: Interpretation of innovative experiments in the field of anti-MEV DEX Example: a transaction on MistX

I spent 0.2 WETH in exchange for 1.43 AAVE. The process is, 0.00516 WETH is paid to the miner address (Ethermine) as a tip, and 0.000271 WETH is paid to the MistX address as a tip. Then the MistX router address is routed to Uniswap V2. Therefore, MistX bypasses the public memory pool of Ethereum and publishes transactions exclusively in the form of bundles in the private memory pool of Flashbot.

FYI: Hasu has conducted a very detailed analysis of transactions on MistX in this article.

Functional comparison of the three projects

I drew a table to record the core features of anti-MEV DEX so that readers can better understand their similarities and differences.

NGC Cai Yan: Interpretation of innovative experiments in the field of anti-MEV DEX Function comparison

Cost/income structure: No need to spend Gas?

The cost structure of these products is rather vague. Perhaps these items do not want to be presented clearly, because traders only care about total transaction efficiency.

But after I tried each product, I came to two general conclusions and some detailed explanations:

  • The income of these projects mainly comes from transaction funds or miner tips.
  • There is no free lunch in the world. No gas fee is required because gas is paid in other ways.

ArcherSwap does not charge Gas fee because it is included in the miner tip. Miner tips can be adjusted, but they are usually not friendly to small transactions. ArcherSwap is able to extract some fees from miner tips as income, but it looks like they have not collected fees yet. Traders also need to pay Uniswap/SushiSwap transaction fees.

CowSwap claims that it does not charge agreement fees during the test period, and now seems to charge 1-1.5% of the transaction amount.

Take these two transactions as an example again for comparison.

NGC Cai Yan: Interpretation of innovative experiments in the field of anti-MEV DEX

If GPv2 finds CoWs, only the agreement fee is required, which is 0.0159 AAVE. But if GPv2 does not find CoWs, I guess users need to pay Uniswap transaction fee and agreement fee at the same time, totaling 0.005 WETH. This is why the cost calculations for the two transactions are different. (0.0159 AAVE/1.4636 AAVE=1.08%; 0.005 WETH/0.2 WETH=2.5%).

Another interesting thing is that in the first transaction, CowSwap paid me 0.00498 ETH as a gas fee, so its net income was 0.0159 AAVE-0.00498 ETH≈ -0.0028 ETH. In the second transaction, CowSwap paid me 0.02 ETH as a gas fee, so the net income was 0.005 WETH-0.02 ETH≈ -0.015 ETH.

CowSwap lost money in both transactions! Small transactions on CowSwap seem to hurt CowSwap and traders at the same time.

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

to sum up

We must respect the innovation of these projects, and let us see more possibilities for dealing with anti-MEV issues. Some large transactions do have demand for such projects.

But all these projects are in the early stages, and there are many things that need to be upgraded. Sometimes our ordinary traders need to pay attention to “invisible consumption” when trading in these aggregators. To be honest, when the gas price is lower, the efficiency of large DEX and low slippage settings may be higher.

In addition, the Flashbots, bloXroute and other tools behind these products are excellent infrastructure to help us safely traverse the dark forest of Ethereum, and have broad application scenarios in many DeFi products.