This repository contains simulations of economic exploits in Decentralized Finance (DeFi) using Agent-Based Modeling (ABS). We'll be adding new simulations of various DeFi exploits using the ABS approach over time.
Chainrisk specializes in economic security, offering a unified simulation platform designed for teams to efficiently test protocols, particularly in challenging market conditions. Our technology is anchored by a cloud-based simulation engine driven by agents and scenarios, enabling users to create tailored market situations for comprehensive risk assessment.
Our team comprises experts with diverse backgrounds in Crypto, Security, Data Science, Economics, and Statistics, bringing valuable experience from institutions such as Ethereum Foundation, NASA, JP Morgan, Deutsche Bank, Polygon, Nethermind, and Eigen Layer.
The Chainrisk Cloud simulation platform mirrors the mainnet environment as closely as possible. Each simulation runs forks from a specified block height, ensuring up-to-date account balances and the latest smart contracts and code deployed across DeFi. This holistic approach is crucial for understanding how external factors such as cascading liquidations, oracle failure, gas fees, and liquidity crises can impact a protocol in various scenarios.
More about Chainrisk here: chainrisk.cloud
ABM represents individual actors, or agents, with specific economic motivations and decision-making abilities, mirroring real-world participants in DeFi. By simulating interactions among these agents, ABM unveils emergent phenomena, such as unintended consequences, which may not be evident through traditional analytical methods.
Agent-Based Simulation (ABS) is a bottom-up simulation technique where we analyze a system by its individual agents that interact with each other. In Chainrisk's ABS, individual actors, or agents, are represented with specific economic motivations and decision-making abilities, mirroring real-world participants in DeFi.
By simulating interactions among these agents, ABS unveils emergent phenomena, such as unintended consequences, which may not be evident through traditional analytical methods.
The components of ABS Model are:
- Agents
- Scenarios
- Observers
- Assertions
- Contracts
ABS provides a powerful tool for DeFi developers to proactively identify and mitigate economic exploits. Below are a few features of ABS:
-
Exploit Detection: allows for the exploration of a wide range of attack scenarios, uncovering potential vulnerabilities before they can be exploited in the real world.
-
Stress Testing Protocols: Simulations can be used to push the DeFi protocol to its limits, identifying weaknesses that might not be apparent under normal operating conditions.
-
Quantified Risk Assessment: By analyzing the outcomes of simulations, developers can gain a quantitative understanding of the potential impact of different exploit scenarios.