Introducing Arbiter v0.1.0
Waylon Jepsen
Colin Roberts
Arbiter,Security,Economics,Research
No table of contents available
Introducing Arbiter v0.1.0
Waylon Jepsen
Colin Roberts
Arbiter,Security,Economics,Research
<h2 id="unleashing-the-power-of-arbiter-for-the-defi-ecosystem">Unleashing the Power of Arbiter for the DeFi Ecosystem</h2>
<p>We are thrilled to introduce the beta release of <a href="https://github.com/primitivefinance/arbiter">Arbiter</a>, a cutting-edge agent-based analysis tool offering Ethereum Virtual Machine (EVM) parity. <a href="https://github.com/primitivefinance/arbiter">Arbiter</a> 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.</p>
<h3 id="the-need-for-speed-and-accuracy-in-the-defi-space">The Need for Speed and Accuracy in the DeFi Space</h3>
<p>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.</p>
<p>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:</p>
<ul>
<li>Evaluating the game theoretic and composable security of smart contracts in production environments (e.g., security firms and academics).</li>
<li>Investigating risk, capital efficiency, rebalancing strategies, and portfolio replication or performance (e.g., LPs, funds, quants, and traders).</li>
<li>Engineering and testing new financial products that are built on top of more DeFi primitives (e.g., DeFi firms, and academics).</li>
</ul>
<h2 id="harnessing-the-power-of-data">Harnessing The Power of Data</h2>
<p>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:</p>
<ul>
<li>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.</li>
<li>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.</li>
</ul>
<p>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:</p>
<ul>
<li>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;</li>
<li>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.</li>
</ul>
<h3 id="improving-defi-security-data">Improving DeFi Security Data</h3>
<p>Arbiter is developed on a Rust implementation of the EVM called <a href="https://github.com/bluealloy/revm">revm</a> 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.</p>
<p>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.</p>
<h2 id="open-source-accessible-and-community-driven">Open Source, Accessible, and Community-Driven</h2>
<p>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 <a href="https://github.com/Autoparallel">Colin Roberts</a> and <a href="https://github.com/0xJepsen">Waylon Jepsen</a>. Both are available on the <a href="https://discord.gg/primitive-168831573876015105">Primitive Discord</a> to answer any questions.</p>
<p>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.</p>
<h3 id="expanding-the-api-and-leveraging-git-submodules">Expanding the API and Leveraging Git Submodules</h3>
<p>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.</p>
<p>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 <code>forge install</code>. Using smart contracts and a real EVM environment, we open a strong avenue for studying the security of DeFi applications.</p>
<p>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.</p>