MEV Resistance

An important issue for Automated Market Makers (AMMs) is Miner Extractable Value (MEV). MEV represents the profits that parties controlling the transaction flow, typically miners, can extract. A significant MEV attack vector for AMMs is the sandwich attack. In this attack, a genuine transaction is sandwiched between transactions of the attacker, similar to frontrunning in traditional markets. However, a sandwich attack is unique in that it is either guaranteed to succeed or to fail with minimal cost aside from gas fees. The process works as follows:

  1. The attacker identifies a large trade order, such as one buying ETH with USDC. This order is a "market order," meaning it fixes a USDC amount and takes whatever amount of ETH it can get.

  2. The attacker places a large order buying ETH with USDC immediately before the targeted transaction.

  3. The attacker then places an equal and opposite transaction (selling ETH for USDC) immediately after the targeted transaction.

If executed successfully, the price at which the targeted transaction is filled is artificially inflated due to the price impact of the attacker's initial purchase (step 2). The subsequent sale (step 3) benefits from both the price impact of the initial purchase and the targeted transaction. As a result, the attacker can shift the transaction to a higher price point off-market, pocketing the difference in a risk-free manner.

Carbon addresses this particular attack vector by utilizing asymmetric liquidity and a two-curve pattern with non-overlapping or widely separated curves. While an attacker can still front-run a transaction as described in step 2, the reverse transaction (step 3) would occur on the other curve under vastly different conditions, making this attack vector unprofitable.

Conclusion

Carbon's technical innovations and feature-rich design position it as a significant advancement in the realm of on-chain trading and liquidity management. By offering asymmetric liquidity, customizable spreads, gas-efficient automation, and a diverse range of trading strategies, Carbon empowers traders and liquidity providers to navigate the decentralized finance landscape with greater precision, flexibility, and efficiency. As the DeFi ecosystem continues to evolve, protocols like Carbon will play a pivotal role in driving adoption and fostering innovation within the industry.

Last updated