Cointime

Download App
iOS & Android

Arcadia Collateral Risk Simulation: Progress Report 2

From LlamaRisk

In last week's progress report, we outlined the methodology we aim to use to define the risk parameters of Arcadia Lending. This week we will dive deeper into the simulation architecture and how we have implemented the methodology.

The report is structured into four parts:

  1. Simulation Architecture: A breakdown of the various modules and classes within the simulation, along with their relationships.
  2. Progress: Summary of the current state of the project, including implemented components and ongoing developments.
  3. Next Week's Goals: Planned tasks and objectives for the upcoming week, focusing on integration, optimization, and testing.
  4. Next Week’s Post: Preview of the content to be covered in the next update, including Simulation Verification and Validation measures.Subscribe

Simulation Architecture

The Arcadia simulation architecture, as depicted in the UML (Unified Modeling Language) diagram, consists of various modules and classes that interact to simulate asset liquidation processes within the Arcadia v2 Lending Protocol.

Figure 1: UML Diagram of the Arcadia Simulation

Below we outline a description of the architecture displayed in Figure 1 between different modules:

  • Asset: This is the fundamental unit, representing various financial instruments. It includes details like its blockchain association, unique identifiers, and other relevant information such as its name and how its price is determined.
  • Chain: This term refers to a specific blockchain, providing necessary details for interaction like its unique ID and URLs for exploration and communication.
  • Asset Metadata: This component stores detailed information about an asset for simulation purposes, including its quantity, ownership share, and risk factors.
  • Asset Value And Risk Factors: This outlines the criteria used to assess an asset's risk, including how it affects borrowing and liquidation processes.
  • Assets In Margin Account: This links assets with margin accounts, indicating the assets held and their details.
  • Auction Information: This includes information on auction processes for assets, such as ownership details, starting conditions, and current status.

Liquidation Process:

  • Lending Pool Liquidation Config & Liquidation Config: These configuration settings outline the rules and parameters for how liquidations are conducted, including fees, the duration of processes, and how prices are adjusted.
  • Liquidation Engine: The core system responsible for managing liquidations, which includes functionalities for updating auction details, placing bids, and carrying out liquidations where required.
  • Liquidator: These are the agents or entities tasked with identifying accounts that can be liquidated and executing the auction processes.
  • Margin Account: Represents the accounts of participants, showing what assets they hold, their debts, and the base currency for their valuations.

Simulation Execution:

  • Pipeline: The framework that coordinates the simulation, setting its timeline, and managing interactions between accounts, liquidators, and the liquidation process.
  • Simulation Time: Manages the timing aspects of the simulation, such as tracking the current block and timestamp, and updating asset prices as needed.

Supporting Components:

  • Slippage Calculator: This tool estimates how a trade's size might affect its price, important for understanding the potential profitability of liquidation actions.
  • Gas Estimator: Calculates the estimated Gas cost for different steps in the liquidation process.
  • Pricing Metadata & Price Strategy Methods: These define how asset prices are calculated, including various methods for price determination, such as using external data sources.
  • Simulation Metrics: Monitors various performance indicators and the simulation's overall health, including tracking the number of accounts in financial distress.

Exception Handling:The system incorporates a variety of exception classes to address particular errors encountered during the simulation, such as issues with account liquidation eligibility, auction status, missing price data, liquidity shortages, and unpopulated price fields. These exceptions help maintain the simulation's integrity and reliability by providing clear error-handling pathways.

Progress

During week 5, we completed the implementation of Orchestrator.py and introduced three different Borrower Models based on Arcadia v1 Borrow data.

Orchestrator

An attentive reader may have noticed that the above simulation architecture displayed in Figure 1 allows a user to execute one simulation run with one set of parameters, yet to find meaningful answers to parameter settings for Arcadia v2, we need hundreds to thousands of runs of different parameter settings.

This is where the need for the orchestrator class arises. The Orchestrator is responsible for setting up various risk scenarios in which collateral assets and numeraire pairs are exposed to different market conditions and allows the execution of simulations in parallel.

class Orchestrator(Base): """ Brute force implementation of orchestrator, has no optimization """ start_timestamp: int end_timestamp: int simulation_time: SimulationTime liquidation_engine: LiquidationEngine liquidators: List[Liquidator] no_of_margin_accounts: int debt_init_model: Any asset_ranges: Dict[Asset, Ranges] exposure_range: range | list numeraire: Asset def prepare_simulation(self): ... return parameter_sets @staticmethod def worker(params): ... pipeline.event_loop() def execute(self): ...

Attributes:

The Orchestrator manages the simulation's timeframe, environment, liquidation mechanics, and the agents executing liquidations. Additionally, it configures the simulation's scope, including the number of margin accounts, the value and risk exposure ranges of assets, and the base currency (numeraire) used for valuation.

Methods:

To be able to run the simulation in parallel, the Orchestrator has three key methods:

  • prepare_simulation(): Sets up the simulation by creating all combinations of asset risk factors and exposures for margin accounts, using combinations of collateral_factor and liquidation_factor and exposure.
  • worker(): A static method that organizes and carries out the simulation for specific parameters, designed for parallel execution through multiprocessing.
  • execute(): Initiates the simulation in parallel with Python's multiprocessing capabilities, spreading out parameter sets to various processes that each run a simulation instance.

Overall, the Orchestor is responsible for setting up the different risk scenarios by combining market scenarios with key asset parameters. This allows us to efficiently run different scenarios in parallel.

Borrower

We retrieved borrower data from v1 data and created borrow distributions. By assuming fixed strategies, we can arrive at the collateral distribution of a potential collateral portfolio at the initiation of the borrower accounts. We then can sample from the borrow amount and assume the maximum borrow based on the available collateral factor for a simulation run.

We are currently in the process of retrieving additional borrow data on Base and ETH for more alternative borrow models as suggested in last week’s methodology.

Goals for Week 6

The team's goal for the current week 6 can be broadly categorized into three buckets:

  1. Refinement of the Simulation: This entails integrating additional components (i.e. Slippage and Gas in the Liquidator Profit Calculation) and testing additional optimization algorithms during the liquidation.
  2. More Borrower Data: We aim to gather more borrower data
  3. Verification & Validation Testing: We plan to test more verification and validation scenarios on real-world test cases.
Comments

All Comments

Recommended for you

  • Trump: Bombs Will Explode if Ceasefire Agreement Expires

    On April 20, according to PBS, U.S. President Trump stated on Monday that if the ceasefire agreement with Iran expires on Tuesday, there will be a large number of bombs exploding. Trump made this remark during a call with White House reporter Liz Landers, focusing on the issue of the Iran war, while a U.S. delegation was preparing for further peace negotiations. When asked whether Iran would still participate in the talks scheduled to take place in Islamabad, Trump replied, "I don't know. I mean, they should show up. It's arranged. We'll see if they come. If they don't, that's fine too." When asked about his expectations for the negotiations, Trump stated, "Very simple, Iran absolutely cannot have nuclear weapons."

  • U.S. Vice President Vance and Delegation to Arrive in Islamabad Today

    On April 20, according to the New York Post: U.S. Vice President Vance and the American delegation will arrive in Islamabad today.

  • BitMine Increases ETH Holdings by Over 100,000, Total Holdings Exceed 4.97 Million ETH

    As of April 19, Eastern Time, BitMine's total cryptocurrency and cash holdings, including the 'Moon Landing Plan,' amount to $12.9 billion. BitMine holds 4,976,485 ETH (an increase of 101,627 ETH from last week), which represents 4.12% of the total Ethereum supply of 120.7 million ETH. Additionally, it holds 199 BTC, shares in Beast Industries worth $200 million, $107 million in Eightco Holdings (NASDAQ: ORBS), and $1.12 billion in unsecured cash. As of April 20, 2026, the total amount of staked ETH by BitMine is 3,334,637 ETH, valued at $7.7 billion based on a price of $2,301 per ETH.

  • Strategy Acquires 34,164 Bitcoins for $2.54 Billion Last Week

    On April 20, Strategy purchased 34,164 Bitcoins last week for a total of approximately $2.54 billion, at a unit price of about $74,395, achieving a 9.5% return on Bitcoin from 2026 to date. As of April 19, 2026, Strategy holds a total of 815,061 Bitcoins, valued at approximately $61.56 billion, with a unit price of about $75,527.

  • Binance Wallet to Launch 46th TGE Project OpenGradient (OPG)

    On April 20, Binance Wallet will launch the 46th exclusive TGE project OpenGradient (OPG). The subscription period is from April 21, 17:00 to 19:00 (UTC+8), and users must participate using Binance Alpha Points and meet the corresponding qualifications. According to the official announcement, OPG tokens will be available for collection and trading starting at 19:00 (UTC+8) on the same day. Additionally, 23,000,000 OPG tokens are reserved for future activities, with specific rules to be announced later.

  • CoinShares: $1.4 Billion Inflows into Digital Asset Investment Products Last Week

    On April 20, CoinShares reported that inflows into digital asset investment products reached $1.4 billion last week, marking the highest weekly inflow since January and achieving positive growth for the third consecutive week. Bitcoin saw inflows of $1.116 billion, bringing the total inflows for the year to $3.1 billion. The price of Bitcoin has surpassed the $76,000 mark, indicating a significant technical breakthrough after two months of range-bound trading. In contrast, inflows into Bitcoin short products were only $1.4 million, suggesting that while there is still hedging demand, it remains limited. Ethereum attracted $328 million in inflows, the strongest week since January, bringing its total inflows for the year to $197 million, while XRP and Solana recorded outflows of $56 million and $2.3 million, respectively.

  • Sources: Bank of Japan Unlikely to Raise Interest Rates in April Meeting

    On April 20, sources familiar with the Bank of Japan's thinking revealed that the central bank is unlikely to raise interest rates next week. The diminishing hope for a swift end to the Middle East conflict has left Japan's economic and price outlook fraught with uncertainty. Although the final decision still carries some uncertainty and will depend on the progress of peace negotiations between the U.S. and Iran, the sources indicated that the bank prefers to maintain the status quo this month to allow more time to assess the impact of the conflict. One source stated, 'Given the current level of uncertainty, the Bank of Japan may consider it feasible to hold steady this month.' Another source echoed this sentiment. A third source noted that the Bank of Japan is unlikely to raise rates, as the market has already fully priced in the possibility of no rate hike this month. These sources mentioned that even if the Bank of Japan keeps rates unchanged next week, it is likely to signal readiness to raise rates as early as June, given the escalating inflationary pressures.

  • Hong Kong SFC Announces New Regulatory Framework for Trading Tokenized Investment Products in Secondary Market

    On April 20, the Hong Kong Securities and Futures Commission (SFC) announced a new regulatory framework to promote the trading of tokenized investment products recognized by the SFC in the secondary market, aiming to enhance digital asset trading activities in Hong Kong and support the further development of the ecosystem. The first batch of products is expected to primarily consist of tokenized money market funds. The SFC will review the operation of these products and will consider expanding the range of products in due course.

  • Hackers impersonated eth.limo team to hijack its domain: Post-mortem

    EasyDNS CEO Mark Jeftovic said the social engineering attack was highly sophisticated and the company is conducting further investigation to determine how the breach occurred.

  • Saylor teases 'bigger' BTC buy days after floating semi-monthly dividends

    Strategy’s Michael Saylor posted “Think Even Bigger” on Sunday, coming just a week after it disclosed $1 billion of Bitcoin buying.