🧨 DeFi Can’t Kill Value- Extracting Robots But Can Learn to Manage Them

Hello Defiers! In this week’s guest opinion piece, Dr. Klaus Kursawe describes how the rise of arbitrage bots has created price distortions in DeFi that are becoming increasingly powerful forces in the marketplace, and could kill the promise of decentraliz...

Hello Defiers! In this week’s guest opinion piece, Dr. Klaus Kursawe describes how the rise of arbitrage bots has created price distortions in DeFi that are becoming increasingly powerful forces in the marketplace, and could kill the promise of decentralized finance. Is implementing a doctrine of ‘fairness’ in blockchain systems the answer?

Klaus rolls up his sleeves and explores how “miner extractable value” is challenging DeFi market participants by creating price discrepancies, and how the Ethereum upgrade in 2022 might address this phenomenon. He also delves into the competing agendas of miners and validators. It’s high-level stuff that any Defier will want to get a handle on, so enjoy!

Klaus is a computer scientist who has worked in the security industry and academia for 20 years. He specializes in critical infrastructure, decentralized (consensus/blockchain) protocols and privacy in a wide field of activities from business development and R&D strategy & implementation to assessments and protocol design and review. He does consensus research with Vega Protcol.

Both paid and free subscribers will receive this guest post, but paid subscribers like you are getting it earlier. Paid subscribers also get complete access to The Defiant content and archive, and access to the subscribers-only Discord chat —here’s the link! If you’re enjoying The Defiant, it really helps if you share it :)

🙌 Together with:

  • Balancer, one of the leading DeFi automated market makers (AMM) for multiple tokens. Dive into their pools at https://balancer.finance/!
  • Kraken, consistently rated the best and most secure cryptocurrency exchange, which can get you from fiat to DeFi
  • Aave, an open-source and non-custodial liquidity protocol where users can earn interest on deposits and borrow assets.
  • Kyber DMM, an automated market maker which prioritizes permissionless liquidity contribution and high capital efficiency
the-defiantthe-defiant

DeFi Can’t Kill MEV But Can Learn to Manage It

By Dr. Klaus Kursawe

The explosion of activity in DeFi markets over the last year highlighted both possibilities and problems inherent to blockchain systems, including the phenomenon of miner—or maximal—extractable value (MEV). Since January of this year, MEV amounts to at least USD $370 million, though some sources say the real value is likely higher.

For the technically inclined, MEV offers a way to profit from transactions before they have been processed by the blockchain and thereby undermines the blockchain’s efficiency and liquidity. If left unchecked, MEV could crush progress in DeFi.

The rise of MEV

A transaction is executed on a DeFi exchange. Prior to its completion, the asset experiences a price uptick. To the transactor, the change is apparent but not its cause. Is the fluctuation due to natural swings in asset pricing? Or is it the result of arbitrage bots exploiting miners’ incentives to prioritize which transactions to execute first on the chain? Increasingly, it’s the latter, which benefits miners but not necessarily DeFi markets.

There are two primary qualities innate to blockchain that drive up gas fees or the pricing value needed to execute a contract in Ethereum. First, transactions naturally represent different economic values. Secondly, public mempools (memory pools) create a waiting period allowing bots to monitor and front-run preferred transactions. The ensuing bidding wars driven by so-called arbitrage bots increase the average price of transactions and clog the network, reducing transaction speeds and throughput (transactions per second).

Researchers long-anticipated MEV as the unintended consequence of the inherent nature of decentralized exchanges, though it has been particularly visible on Ethereum. When an individual buying ETH interacts with a smart contract (e.g., a trader sells an asset within a DeFi derivatives market), the transaction requires miners to create a block including that transaction to add to the chain. Miners select from transactions in the mempool to write to the chain. The transparent nature of Ethereum and the period during which a transaction sits in the mempool creates the perfect environment for price bidding on which transactions are added to the chain first, thus allowing anyone who sees the mempool to front-run the original transaction.

Arbitrage bots are not arbitrageurs

In traditional markets, the exploitation of price discrepancies of similar assets across different markets introduces the opportunity for arbitrageurs to profit from cross-market trade. Because markets are imperfect, arbitrage contributes to increased market efficiency and liquidity. In addition to reducing inefficiencies, arbitrageurs’ trading activities serve to create new markets, which is why most countries embrace the practice. While MEV exists because of arbitrage opportunities within DeFi markets, it’s critical to note that arbitrage bots do not necessarily turn miners into DeFi market arbitrageurs.

Rather, at present, bots exploit off-chain market conditions creating reward incentives that operate outside the ecosystem of a given crypto-market. Consequently, the bidding that occurs prior to on-chain activity effectively weighs down DeFi markets. MEV causes miners to act as censors or impediments to transactions, driving up gas prices and slowing networks, rather than lubricating them—as is the case with classic market arbitrageurs.

As it stands today, MEV could kill—or at least seriously maim—DeFi. Given the nature of DeFi markets, we can’t eliminate MEV and we have a few options to control arbitrage bots. That said, the role of the classic market arbitrageur may provide clues for how to manage MEV going forward.

Some much-needed remedies

The anticipated upgrades to Ethereum, scheduled for 2022, promise to increase network scalability by improving fee predictability and increasing transaction speeds. These changes will help by eliminating the need for mining, which will reduce energy consumption but will not necessarily reduce high fees or eliminate MEV—hence the earlier distinction between miner vs. maximal extractable value. Validators, rather than miners, will still seek incentives, leaving MEV on the table.

So what can be done?

Ultimately, to mitigate the impact of MEV in the long run, protocols need to improve fairness. In DeFi, this needs to go further than in traditional finance. Though the problem there is big enough, the added issue in DeFi is that the flash traders not only try to have the fastest communication to the exchanges, but—through the decentralized nature—get access to part of the exchange itself—akin to a flash trader in the traditional world having access (and operating) some of the servers inside the exchange. Thus, while centralized markets have massively suffered from frontrunning in the past (and, to a too-large extent, resolved the issue by trying to get a share of the profit), the issues in DeFi are of a different nature, as are the conditions under which to achieve fairness.

The term "Fairness" is of course very broad and vague to start with, and different people may come to different conclusions in the same situation on what is considered ‘fair’. To add to the complication, in the Byzantine setting in which blockchains operate, many desirable properties (e.g., a straightforward concept of first-come, first-serve) can be shown to be impossible to achieve, or at least impossible to achieve under all circumstances.

Therefore, we propose an approach where different (technical) definitions of fairness can coexist on the same chain, and markets can choose which approach best suits their need, as well as moving to a different concept on the fly if circumstances change—just in the way different countries have different concepts of fair social security based on culture and ability, and many did temporarily adapt when COVID-19 changed the economic conditions.

In practice, such an approach would add a distributed ‘guardian’ protocol that verifies incoming transactions for potential fairness issues, delays transactions that might be in violation of the policies, and adds a proof to the transactions that their scheduling is valid. This can be integrated into the blockchain itself, run as a separate add on (in the same way as Casper is an add on for Ethereum to add finality), or run independently aside the blockchain, even as a third party service that can be used by an individual smart contract. And while ‘first come, first serve, (i.e., if all honest validators saw a transaction first, it should be scheduled first) can be shown to be impossible to always achieve, there are workarounds to achieve it most of the time and provide an acceptable level of fairness where it's not possible. This fairness approach also can be combined with other approaches, such as dedicated fair mining pools, or the concept of causal order (also known as commit and reveal), where the content of a transaction is encrypted during some of the processing

By utilizing such concepts, a miner or validator will still be able to extract value—as they should, being a vital part of the blockchains infrastructure—but in a managed way that follows the policies set by the community, rather than through an uncontrolled, opportunity-driven incentive with no consideration for the interests of the overall ecosystem.

Recapturing the promise of DeFi

In traditional markets, centralized institutions decide what can be traded and who has access. For DeFi to escape a similar fate, we must check MEV before it’s too late. Yes, Ethereum 2.0’s imminent consensus mechanism swap will phase out GPU mining but it will not eliminate MEV. Configuring markets with relative fairness, however, will limit the impact of MEV and allow miners or validators to function as arbitrageurs rather than censors. We can also expect that this will not be the final word—there are few cases in history where someone who discovered an efficient (albeit destructive) way to make money simply walked away once the defenses caught up with them.

Share The Defiant

The Defiant is a daily newsletter focusing on decentralized finance, a new financial system that’s being built on top of open blockchains. The space is evolving at breakneck speed and revolutionizing tech and money. Spread the word and share!

banner