Introducing Arbiter v0.1.0
Unleashing the Power of Arbiter for the DeFi Ecosystem
We are thrilled to introduce the beta release of Arbiter, a cutting-edge agent-based analysis tool offering Ethereum Virtual Machine (EVM) parity. Arbiter empowers users with fast and efficient modeling and economic fuzzing, providing precise data on how the EVM state will evolve given a set of inputs.
The Need for Speed and Accuracy in the DeFi Space
Ethereum's EVM has spawned a diverse range of decentralized applications and Decentralized Finance (DeFi) is the most prolific. DeFi users and engineers are challenged with examining complicated economic states against varying market conditions, contract parameters, and agents. Achieving useful results in such a complex simulation environment demands a tool that can deliver results quickly and accurately.
Arbiter uses a completely Rust-based stack in order to leverage the programming language's native speed and memory safety to provide the most highly performant analysis tool. The following concepts led us to developing Arbiter:
- Evaluating the game theoretic and composable security of smart contracts in production environments (e.g., security firms and academics).
- Investigating risk, capital efficiency, rebalancing strategies, and portfolio replication or performance (e.g., LPs, funds, quants, and traders).
- Engineering and testing new financial products that are built on top of more DeFi primitives (e.g., DeFi firms, and academics).
Harnessing The Power of Data
Rich, plentiful, and realistic data is the driving force behind accurate analysis and Arbiter ensures we will yield all three. Before Arbiter, there were a few common approaches to getting data to study EVM applications:
- One approach is to create lightweight, simplistic simulations for general theories or qualitative understanding. While useful in certain cases, this method falls short when applied to more complex scenarios. In general, these types of simulations miss out on realism in favor of being quick to develop.
- When simple simulations aren't enough, one can build replicas of a DeFi app outside of a smart contract language. These simulations take time to build properly and are not meant to be modular. Instead, these simulation environments are ad-hoc creations and rely on additional engineering overhead in development. Also, since these are replicas, they create another spawn point for bugs. Furthermore, a change in a contract doesn't immediately reflect a change in the replica and vice-versa.
Both of the above approaches can yield a large volume of data but is often low in quality and prone to errors. We can improve the richness and realism by:
- Running contracts on a test network and build agents that can make calls to the simulation environment deployed on the network. This of course yields EVM parity, but the interface for doing so still requires building agents that run on this test network. This approach will usually be slower than the previous at the expense of EVM parity;
- Examining accurate onchain data, which can be derived from real-time or historical sources. This method is well-suited for applications that demand parity. However, its main limitation lies in the inability to control the environment or its actors, restricting users to historical data. While this approach offers high-quality data, the quantity is comparatively limited.
Improving DeFi Security Data
Arbiter is developed on a Rust implementation of the EVM called revm which offers an unparalleled solution for studying decentralized applications. This tool assumes a very low level interaction of smart contracts with the EVM execution environment and can generate large quantities of true-to-form EVM data. Compared to a local EVM blockchain like Ganache or Anvil, Arbiter lets us leverage Rust's speed and removes any limitations from block times or I/O. Given the low level implementation of revm, we gain as much control as possible over the simulation environments we build.
Arbiter can also allow for granular backtesting using real onchain state transitions. Both backward and forward testing techniques allow users to analyze DeFi strategies and economic security throughout history and over specifically tailored model-based scenarios. Researchers can identify anomalous behaviors in decentralized applications when interacting with other contracts, providing valuable insights into the ecosystem. Funds, traders, and searchers can develop strategies in a simulation environment that can be ported to an onchain instance with low effort.
Open Source, Accessible, and Community-Driven
Arbiter is open source and free to use. We prioritize maintaining the repository to ensure accessibility, foster learning, and support education in the Ethereum ecosystem. The Primitive Team members responsible for Arbiter's maintenance are Colin Roberts and Waylon Jepsen. Both are available on the Primitive Discord to answer any questions.
Our immediate goals include completing the modeling of various agents and producing a case study that demonstrates Arbiter's power. We are eager to support community contributions and education, and we welcome anyone interested in contributing to or using Arbiter.
Expanding the API and Leveraging Git Submodules
Our work currently exposes two critical interfaces over revm: sending arbitrary call data to contracts and deploying contracts to revm. We have also begun developing numerous agents to model different actors in revm. As these agent models are completed, we will release them as part of the Arbiter API.
We utilize git submodules to enable modular use of any smart contract repository in Arbiter. Users can add any smart contract from a repository not included in the submodules with
forge install. Using smart contracts and a real EVM environment, we open a strong avenue for studying the security of DeFi applications.
By bridging the gap between existing methods, Arbiter empowers users to make well-informed decisions based on accurate simulations and real-time historical data. As an open-source, accessible, and community-driven project, Arbiter paves the way for innovation, collaboration, and growth within the Ethereum and DeFi space. Embrace the power of Arbiter today and stay ahead in the rapidly evolving world of decentralized finance.