Know Your Playground: The Essential Guide to Algorand for MEV Enthusiasts



This content originally appeared on HackerNoon and was authored by EScholar: Electronic Academic Papers for Scholars

Abstract and 1. Introduction

  1. Background
  2. Related Work
  3. MEV Discovery
  4. MEV Extraction
  5. Conclusion and References

2 Background

In this section, we provide background information required for the working principals of the Algorand blockchain, DeFi activity on it with a focus on DEX protocols, and an overview of Automated Market Makers (AMMs).

\

2.1 Algorand Blockchain

For the detailed analysis and evaluation of MEV searching in FCFS, our focus is on the Algorand blockchain [8, 11, 10], introduced by Silvio Micali in 2017. Algorand utilizes a consensus mechanism called Algorand Byzantine Fault Tolerance Protocol (BA), providing instant finality, scalability (in the number of nodes and transactions per second), and avoiding soft forks [8, 11, 10]. It employs the Pure Proof-of-Stake (PPoS) for Sybil resistance, allowing anyone with at least one ALGO (the native token of Algorand) to join the consensus. Unlike Ethereum, Algorand does not reward consensus participants with fixed block rewards or transaction fees. However, discussions about changing incentives are ongoing[2].

\ Regarding high-level specifications, the system can handle around 8000 transactions per second and publishes blocks every 3.3 s in the v3.19.0 release[3]. The network consists of approximately 1100 nodes (relay and participation nodes)[4]. Participation nodes connect via relays, each connected to four randomly selected relays. The relays, in turn, forward messages to four relays and all incoming peers. Default connections on a relay are set to 2400. Configuration parameters may vary for each peer, as they are not enforced. Regular clients not participating in consensus also rely on connections via relays, but the number of such clients is unknown. It is expected that in the next year, Algorand will switch from the relay structure to a gossip-based Peer-to-Peer (P2P) layer similar to Ethereum[5].

\ Algorand handles scaling in the number of consensus participants by selecting a subcommittee from the total number of active participation nodes. One consensus round involves block proposer selection, soft vote, and certify vote, with a new committee selected at each step. Committees have varying sizes with 20 block proposers, 2990 parties in the soft vote, and 1550 in the certify vote [6]. The likelihood of selection correlates with stake amount, and members are unknown until they cast votes. The proposer selection step is crucial for MEV extraction, as the selected proposer’s transaction sequence determines the extracted value. Fast connections to relays can aid MEV searching, but challenges arise with up to 20 proposers being eligible at every round. FCFS ordering is not protocol-enforced but comes with the official Algorand node implementation.

\ Algorand transactions include payments for native token transfers, Algorand Standard Asset (ASA) transfers for other token types, and Algorand Smart Contract (ASC1) application calls, which can be split up into 256 inner transactions depending on the application complexity. While assets are managed by ASA transactions, ASC1 applications deploy functions on the Layer-1 network that are written in Transaction Execution Approval Language (TEAL), an assembly-like language interpreted in the Algorand Virtual Machine (AVM), with each having a unique ID. Transaction cost is a fixed minimum of 0.001 ALGO per transaction, charged only for successfully executed transactions. The fee strategy shifts to a dynamic cost model per byte during network congestion, which every node determines for itself based on the number of transactions in its local mempool—leading to increased fees if a node is congested. Using multiple clients is crucial to gauge network capacity and adapt fees when congestion occurs over the whole network.

\

2.2 Decentralized Finance

Financial applications built on blockchains, often referred to as Decentralized Finance (DeFi), represent an emerging collection of applications that emulate services found in the traditional finance sector. By employing smart contracts, these applications on blockchains encompass a wide array of services, ranging from decentralized exchanges and options markets to lending protocols and tokenized assets. According to DefiLlama [1], as of December 2023, Algorand’s DeFi ecosystem holds a Total Value Locked (TVL) of 82 million USD. This valuation has shown stability on an annual basis but exhibits growth over a longer period. Key indicators of blockchain activity include daily volume and the number of daily active addresses. Over the past year, the average daily volume was 5 000 000 ALGO, with around 36 000 daily active addresses, both metrics maintaining consistency year-over-year. In the realm of Algorand’s DEX ecosystem, Tinyman[7] and Pact[8] each reported a TVL of 15 million USD. HumbleSwap[9], though smaller, also made a significant impact with a TVL of 3 million USD. Focusing on transaction volumes for December 2023, Tinyman (versions 1 and 2) showed an average daily volume of 729 000 USD, followed by Pact with 418 000 USD, and HumbleSwap at 41 000 USD [1].

\

2.3 Automated Market Makers

Conventional centralized cryptocurrency exchanges process over 80 billion daily in spot-volume[10], using Central Limit Order Book (CLOB) architecture. In CLOBs, a centralized entity controls customer asset custody and trade settlement, maintaining an enumerated order list for real-time buyer-seller matching. Orders are processed sequentially, with the central operator acting as an intermediary. In contrast, DEXs usually utilize smart contracts and an AMM model instead of onchain order books due to their simplicity and efficiency in order matching without an intermediary, even in illiquid markets. AMMs manage liquidity pools, balancing various token reserves, while facilitating P2P trading at preset rates determined by mathematical formulas called swap invariants. Constant Product Market Maker (CPMM), a common swap invariant variant used by popular DEXs such as Uniswap[11] on Ethereum and Tinyman, ensures the product of the assets reserves’ in the liquidity pool remains constant unless there is liquidity provision or withdrawal, enabling automated price discovery. Users trade tokens with AMMs, paying a fee to liquidity providers (usually 0.3%) and receiving purchased tokens from the pool’s reserves. When trading on DEXs, price slippage refers to the difference between the expected and actual execution prices of the trade. Expected price slippage is the predicted price change based on a trade’s volume and AMM’s liquidity and swap invariant. However, as expected slippage is calculated using historical blockchain data, fluctuations between transaction submission and execution can lead to unexpected slippage. Together, expected and unexpected slippages determine a trade’s overall market impact.

\

:::info Authors:

(1) Burak Oz, Technical University of Munich;

(2) Jonas Gebele, Technical University of Munich;

(3) Parshant Singh, Technical University of Munich;

(4) Filip Rezabek, Technical University of Munich;

(5) Florian Matthes, Technical University of Munich.

:::


:::info This paper is available on arxiv under CC BY 4.0 DEED license.

:::

[2] https://github.com/algorand/go-algorand/pull/5740

\ [3] https://github.com/algorand/go-algorand/releases/tag/v3.19.0-stable

\ [4] https://metrics.algorand.org/

\ [5] https://github.com/algorand/go-algorand/issues/5603

\ [6] https://github.com/algorandfoundation/specs/blob/master/dev/abft.md

\ [7] https://tinyman.org

\ [8] https://www.pact.fi

\ [9] https://www.humble.sh/

\ [10] https://www.coingecko.com/en/exchanges

\ [11] https://uniswap.org


This content originally appeared on HackerNoon and was authored by EScholar: Electronic Academic Papers for Scholars