Back
Omer Goldberg
Omer Goldberg

Uniswap V3 TWAP Oracle Deep Dive - Pt. 2

Cover Image for Uniswap V3 TWAP Oracle Deep Dive - Pt. 2
  1. Overview
  2. Intro
  3. Why Oracle Price Configuration is Impactful
  4. How Do We Achieve Oracle Price Configuration
  5. Hardhat Capabilities
  6. Storage Layout
  7. What's next? ⏭️
  8. About the Uniswap Grant Program

The initial Uniswap Grants was announced here

Overview

Chaos Labs is a cloud platform that specializes in Economic Security for DeFi protocols. At Chaos Labs we build agent- and scenario- based simulations to battle test protocols in adversarial and chaotic (🤗) market conditions. In our quest to build state of the art simulations and security tooling we also partner with DeFi protocols to build valuable tools for the DeFi developer ecoysystem. This series of posts is a technical deep dive on Uniswap v3 TWAP oracles. Our implementation for configuring Uniswap v3 TWAP return values can be found here. PRs are welcome!

Intro

In our previous blog post, we covered the fundamentals of Uniswap V3 TWAP oracles. This blog post will focus on:

  • TWAP storage layout
  • Hardhat capabilities
  • TWAP architecture and implementation
  • Configuring return values of Uniswap V3 oracles within a forked environment.

But before we deep dive let’s understand why oracle price configuration is a critical component of high fidelity simulations.

Why Oracle Price Configuration is Impactful

DeFi protocols control billions of dollars worth of assets on-chain and require thorough simulation execution, risk evaluation and testing. Protocols and dApps evolve in a variety of ways such as:

  • Protocol launches
  • Parameter updates
  • New functionality introduced via governance proposals
  • New protocol integrations or support for new assets

All on-chain code is extremely sensitive and must undergo thorough evaluation before being deployed to mainnet.

A core belief at Chaos Labs is that an effective simulation environment is as close to the production environment as possible. Assumptions and functionality stubbing create a larger deviation from the condition users and protocols will face on-chain. Deviations decrease reliability and security guarantees while ultimately leaving engineering teams in the dark.

Now let's zoom in on Oracles. Contracts and dApps treat oracle return values as a source of truth and valid application input. Oracle return values are often the decisive factor, in determining internal state transitions and critical control flow execution.

As we aim to test our dApps in an environment that is as close to production as possible we are faced with the challenge of recreating desired states in our simulations. Edge cases or protocol fragility are often the most interesting to simulate. Consider instances of:

  • High market volatility
  • Cascading prices
  • Adversarial interactions
  • Dynamic network congestion
  • Varying transaction pick-up latency

This is especially true for DeFi protocols that often boast heavy protocol and infrastructure dependencies. As we know, oracles are key pieces of infrastructure and stubbing out dApp <> oracle communication as is common in unit tests is insufficient.

To this end, we need to have the ability to configure oracles as they represent a core application dependency. Having granular control over oracle return values will allow us to verify that our protocols performs as expected, even under harsh or adversarial conditions.

So how do we configure Uniswap v3 TWAP Oracle return values price within the context of a fork?

How Do We Achieve Oracle Price Configuration

The Uniswap documentation is a good place to start. Let’s begin by examining the Uniswap pool implementation to understand where and how the price is stored within the contract. The answer to that question is - it depends. It depends on several parameters:

  • The TWAP interval for which we query the price
  • The trading history of the pool
  • The size of the Observations array assigned to the pool.

Let’s start with the most common case of a TWAP interval that is bigger than zero. We’re looking for the average price in the Uniswap pool over a period of X seconds, such that X > 0.

Note: It is usually not safe to use very short or 0-time intervals since it leaves you more susceptible to price tampering

In order to get the average price, we need to know what the price was at two points in time:

  • Now
  • X seconds ago

Our previous post highlighted that we don't save the price itself within the pool. We utilize the tick to derive the price. Two important data structures are used to keep track of the ticks:

  • The Observations array
  • Slot0

struct Observation { // the block timestamp of the observation uint32 blockTimestamp; // the tick accumulator, i.e. tick * time elapsed since the pool was first initialized int56 tickCumulative; // the seconds per liquidity, i.e. seconds elapsed / max(1, liquidity) since the pool was first initialized uint160 secondsPerLiquidityCumulativeX128; // whether or not the observation is initialized bool initialized; } struct Slot0 { // the current price uint160 sqrtPriceX96; // the current tick int24 tick; // the most-recently updated index of the observations array uint16 observationIndex; // the current maximum number of observations that are being stored uint16 observationCardinality; // the next maximum number of observations to store, triggered in observations.write uint16 observationCardinalityNext; // the current protocol fee as a percentage of the swap fee taken on withdrawal // represented as an integer denominator (1/x)% uint8 feeProtocol; // whether the pool is locked bool unlocked; }

Slot0’s main purpose is to maintain the current state of the pool. The main fields of interest for us are:

  • tick
  • observationIndex,
  • observationCardinality

We will see how using these and the observations array we can extrapolate the TWAP.

Some basic concepts we need to understand first:

  • Each Uniswap pool is deployed with an Observation array of length 1, and it can be extended later on through a dedicated function call, where the caller will pay the gas fees for extending the contract's storage.
  • Observations array is a cyclic buffer storing the latest observations up to the current size of the array defined by observationCardinality. Thus increasing the size of the array allows for supporting longer TWAP intervals.

Now lets see what happens when request two ticks with X seconds separating between them through observe function:

function observe(uint32[] calldata secondsAgos) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);

We can see that for each timestamp we get as input we use binary search to find the closest recorded observations in the observations array. We then proceed to extrapolate the observation for the exact timestamp (if there isn’t any) using the two adjacent recordings. Eventually, the observe function returns two extrapolated observations for the exact timestamp requested if there is an observation recording older than the requested time.

With two observations we can obtain the time-weighted average tick which leads us to the time-weighted average price.

Now that we understand how the oracle works, we can get to the fun part :) How do we approach configuring the prices returned?

The approach we have taken with our implementation was to override the Observation recordings in the contract to achieve any price we desire. We can create new recordings by executing trades in the pool, but we want to change only the price returned and not alter the whole state of the contract as it can result in undesired behavior. Instead, we decided to rewrite the contract memory directly with our own chosen values. This requires two operations:

  • Reverse calculating the observation's storage layout and their locations in the array to result in price P for TWAP X.
  • A way to alter the contract storage, where the Observations reside.

The first requirement can be achieved with our newfound knowledge of Uniswap pools. How do we solve for the second requirement? There are several ways to accomplish this. Let's examine a solution which utilizes Hardhat capabilities.

Hardhat Capabilities

Hardhat is a powerful tool for EVM developers. In this article, we will focus on its ability to create EVM network forks. Hardhat exposes control endpoints on the forked node that allows developers to do some really cool stuff. Let's focus on the - hardhat_setStorageAt feature.

Using this API we can set the storage of a contract, given that we know what we want to store and where. But as the documentation mentions, this is not straightforward. That doesn’t deter us though!

Storage Layout

In order to modify contract storage directly, we need to understand Ethereum memory and Solidity variable layout in storage. We will only cover the parts required for our use case with Uniswap oracles, but we highly recommend learning more via the solidity docs.

Going back to the Uniswap pool contract - we know we want to change the value stored in Slot0 and the observations array. Where are they in the contract storage layout?

State variables of contracts are stored in storage in a compact way such that multiple values sometimes use the same storage slot. Except for dynamically-sized arrays and mappings (see below), data is stored contiguously item after item starting with the first state variable, which is stored in slot 0

Slot0 is the first state variable in the contract, and so, as its name suggests - it is stored in slot 0 of the contract storage.

One thing to note is that every storage slot is 32 bytes long. Therefore, if a structure is bigger than 32 bytes it will be stored in multiple slots. However, if a struct is smaller than 32 bytes it can be stored with the next variables into the same slot for memory efficiency. So when we work to place the variables in their respective slots we need to account for two things:

  • Initialization order within the contract
  • Byte size.

Following this process, we conclude that Slot0 is placed at slot 0 (surprise 😅) and as its full size is exactly 256 bits = 32 bytes it ends at slot 1.

As for the observations array, it starts at slot 8 of the contract storage. Each observation is also exactly 32 bytes, and so observation X can be found at slot 8+X of the contract storage.

We can also use the Solidity compiler to make this process easier for us. When compiling the contract we can add flags to the compiler to produce the contract storage layout as part of the compilation output. Below we can see an example of such output:

So we know where there the variables are stored. Are we done? Not quite!

Taking a deeper look into the Observation struct, we see that it contains additional fields. In our case, we only want to change the value of the tickCumulative variable of each observation. The same applies for Slot0. However, we'll focus on the observations for this step:

Each Observation has the following fields with varying bit sizes:

blockTimestamp, tickCumulative, secondsPerLiquidityCumulativeX128,initialized.

With a bit of math, we can conclude the bits in our 32 bytes slots that contain our targeted tickCumulative.

Another concept we must familiarize ourselves which is Endianness - the order or sequence of bytes of digital data in computer memory. We won't dive into Endianness in Ethereum here. However, if you’re interested - this is a great blog post about it!

In short - Ethereum uses the two endianness format depending on the variable type:

  • Big-endian format for strings and bytes
  • Little-endian format for other types (numbers, addresses, etc..).

We finally conclude that tickCumulative for observation X is stored at slot X+8, in bytes 21 to 28 of the slot.

Using the code snippet below we can then override an Observation tickCumulative:

async function OverrideObservationTick(n: BigNumber, index: number): Promise<string> { const slot = 8 + index; const add = `0x${slot.toString(16)}`; const st = (await this.provider.send("eth_getStorageAt", [this.poolAddress, add])) as string; const tickHex = numberToStorage(n, 14); const newSt = "0x" + st.slice(2, 44) + tickHex + st.slice(-8); await this.provider.send("hardhat_setStorageAt", [this.poolAddress, add, newSt]); return newSt; }

What's next? ⏭️

We're collaborating wiht Uniswap to build a developer tool that eases the usage and testing of v3 TWAP oracles based on our previous work. Stay tuned 😉

About the Uniswap Grant Program

If you want to learn more about the Uniswap Grants Program, check out their blog.


Recent Updates

Cover Image for dYdX Chain: End of Season 4 Launch Incentive Analysis

dYdX Chain: End of Season 4 Launch Incentive Analysis

Chaos Labs presents a comprehensive review of the fourth trading season on the dYdX Chain. The analysis encompasses all facets of exchange performance, emphasizing the impact of the Launch Incentive Program.

Omer Goldberg
Omer Goldberg
Cover Image for Arbitrum STIP Risk Analysis | Case Study #1: Vertex

Arbitrum STIP Risk Analysis | Case Study #1: Vertex

As part of our recent election as the Risk Member on the Arbitrum Research & Development Committee (ARDC), Chaos Labs is excited to share a blog post detailing our first case study for the ARDC: Vertex. This is the first case study of a three-part series that entails an in-depth analysis of the risk and efficiency of the Arbitrum STIP on three major protocols, the first of which is Vertex. As requested by the DAO advocate for the ARDC, L2BEAT, Chaos Labs has begun conducting case studies on STIP recipients. This case study provides an in-depth analysis of the Arbitrum STIP program’s impact on the Vertex Protocol, focusing on its efficiency and associated risks. This analysis is part of a broader series that evaluates the STIP program across three major protocols. We will begin by introducing the STIP program and giving an overview of Vertex, followed by our team's full case study.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Oracle Risk Portal

Chaos Labs Oracle Risk Portal

Chaos Labs is excited to announce the launch of our Oracle Risk Portal. This portal is a public resource designed to offer an accessible overview of oracle feed performance, enabling stakeholders to efficiently assess and compare deviations in oracle data.

Omer Goldberg
Omer Goldberg
Cover Image for Oracle Risk and Security Standards: Price Composition Methodologies (Pt. 3)

Oracle Risk and Security Standards: Price Composition Methodologies (Pt. 3)

This chapter delves into the intricate world of Price Composition Methodologies, a foundational pillar of Oracle risk and security. It encompasses an in-depth analysis of data source selection and validation, an exploration of the limitations of rudimentary pricing methods and opportunities for improvement, concluding with an examination of the tradeoffs between price aggregation techniques grounded in real-world examples. This holistic overview guides readers through the practices and innovations that exemplify the relationship between price composition and Oracle security.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with Jupiter Protocol

Chaos Labs Partners with Jupiter Protocol

Chaos Labs is thrilled to announce our strategic partnership with Jupiter, a non-custodial DEX aggregator and perpetual futures exchange on Solana. Our partnership represents a deep commitment to enhancing protocol resiliency and growth, fortifying Jupiter's market position, and cultivating a safer, more robust trading environment.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with SynFutures

Chaos Labs Partners with SynFutures

Chaos Labs is thrilled to announce our partnership with SynFutures. Our collaboration, which started in February, is centered on evaluating and enhancing SynFutures V3's pioneering Oyster AMM that allows Single-Token Concentrated Liquidity for Derivatives and a Fully On-Chain Order Book.

Omer Goldberg
Omer Goldberg
Cover Image for dYdX Chain: End of Season 3 Launch Incentive Analysis

dYdX Chain: End of Season 3 Launch Incentive Analysis

Chaos Labs presents a comprehensive review of the third trading season on the dYdX Chain. The analysis encompasses all facets of exchange performance, emphasizing the impact of the Launch Incentive Program.

Omer Goldberg
Omer Goldberg
Cover Image for Introducing Aave's Chaos Labs Risk Oracles

Introducing Aave's Chaos Labs Risk Oracles

In the fast-paced and volatile environment of DeFi, managing risk parameters across Aave's extensive network—spanning over ten deployments, hundreds of markets, and thousands of variables such as Supply and Borrow Caps, Liquidation Thresholds, Loan-to-Value ratios, Liquidation Bonuses, Interest Rates, and Debt Ceilings—has evolved into a critical, yet resource-intensive, full-time endeavor. Chaos Labs aims to streamline this paradigm by integrating Risk Oracles to automate and optimize the risk management process, achieving scalability and near-real-time risk adjustment capabilities.

Omer Goldberg
Omer Goldberg
Cover Image for Oracle Risk and Security Standards: Network Architectures and Topologies (Pt. 2)

Oracle Risk and Security Standards: Network Architectures and Topologies (Pt. 2)

Oracle Network Architecture and Topologies provides a detailed examination of how Oracle Networks are structured, data’s complex journey from source to application, and the inherent security and risk considerations within these systems. Through a deep dive into architectures, the data supply chain, and network topology, readers will understand the critical components that ensure the functionality and reliability of Oracles in DeFi, providing context for the challenges and innovative solutions that define the landscape.

Omer Goldberg
Omer Goldberg
Cover Image for Next Generation of NFT Derivatives: Chaos Labs Partners with nftperp

Next Generation of NFT Derivatives: Chaos Labs Partners with nftperp

We are excited to announce the Chaos Labs and nftperp partnership, which aims to pioneer the risk management framework for ongoing parameter optimizations for nftperp’s Perpetual trading DEX.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Elected to Lead Risk for Arbitrum Research & Development Collective

Chaos Labs Elected to Lead Risk for Arbitrum Research & Development Collective

In a significant stride toward enhancing the Arbitrum ecosystem's resilience and efficiency, Chaos Labs has been elected to spearhead Risk Management for the Arbitrum Research and Development Collective.

Omer Goldberg
Omer Goldberg
Cover Image for dYdX Chain: Launch Incentives Season 3 Mid-Season Review

dYdX Chain: Launch Incentives Season 3 Mid-Season Review

Chaos Labs presents the mid-season 2 review of full trading on the dYdX Chain. All aspects of the exchange performance are covered with a focus on the impact of the launch incentive program.

Omer Goldberg
Omer Goldberg
Cover Image for Oracle Risk and Security Standards: An Introduction (Pt. 1)

Oracle Risk and Security Standards: An Introduction (Pt. 1)

Chaos Labs is open-sourcing our Oracle Risk and Security Standards Framework to improve industry-wide risk and security posture and reduce protocol attacks and failures. Our Oracle Framework is the inspiration for our Oracle Risk and Security Platform. It was developed as part of our work leading, assessing, and auditing Oracles for top DeFi protocols.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with USDV for Genesis Risk Assessment and Strategic Growth

Chaos Labs Partners with USDV for Genesis Risk Assessment and Strategic Growth

Chaos Labs is thrilled to unveil our strategic partnership with Verified USD, a leap forward in our commitment to innovation within Tokenized Real World Asset (RWA) backed stablecoins.

Omer Goldberg
Omer Goldberg
Cover Image for dYdX Chain: Concluding Season 2 Launch Incentive Analysis

dYdX Chain: Concluding Season 2 Launch Incentive Analysis

Chaos Labs is pleased to provide a comprehensive review of the second trading season on the dYdX Chain. This analysis encompasses all facets of exchange performance, emphasizing the impact of the Launch Incentive Program.

Omer Goldberg
Omer Goldberg
Cover Image for USDC Liquidity Optimization Framework for OP Mainnet

USDC Liquidity Optimization Framework for OP Mainnet

Chaos Labs introduces a comprehensive analysis and strategic framework designed to enhance liquidity incentives and streamline the transition from bridged USDC.e to native USDC on the OP Mainnet, aiming for a seamless and efficient migration process.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with Optimism Foundation

Chaos Labs Partners with Optimism Foundation

Chaos Labs is excited to collaborate with the Optimism Foundation to optimize liquidity incentives and facilitate the migration from bridged USDC.e to native USDC on OP Mainnet.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with Avantis

Chaos Labs Partners with Avantis

Chaos Labs is excited to announce our new partnership with Avantis, marking a significant step forward in our journey toward innovating the world of on-chain trading. Over recent months, our collaboration with Avantis has focused on developing a genesis risk framework and the initial setting of parameters for their protocol.

Omer Goldberg
Omer Goldberg
Cover Image for dYdX Chain: Launch Incentives Season 2 Mid-Season Review

dYdX Chain: Launch Incentives Season 2 Mid-Season Review

Chaos Labs presents the mid-season 2 review of full trading on the dYdX Chain. All aspects of the exchange performance are covered with a focus on the impact of the launch incentive program.

Omer Goldberg
Omer Goldberg
Cover Image for Protocol Spotlight: Bluefin V3

Protocol Spotlight: Bluefin V3

Bluefin, the backbone of Sui's derivative exchange ecosystem, drives over 90% of on-chain trading volume. It has undergone a transformative journey from V1 to V2, fine-tuning its codebase for the Sui blockchain. In Q2 2024, Bluefin is set to unveil V3, a highly optimized iteration offering reduced feed, improved latency, and cross-margin trading accounts.

Omer Goldberg
Omer Goldberg
Cover Image for dYdX Chain Launch Incentives Program: Wash Trading Detection

dYdX Chain Launch Incentives Program: Wash Trading Detection

Chaos Labs has developed a sophisticated wash trading detection algorithm designed for the dYdX Chain Launch Incentives Program. To enhance the program's effectiveness and encourage genuine long-term activity, Chaos Labs has implemented a robust detection process that identifies and disqualifies traders generating inorganic flow from receiving incentives.

Omer Goldberg
Omer Goldberg
Cover Image for dYdX Chain: End of Season 1 Launch Incentive Analysis

dYdX Chain: End of Season 1 Launch Incentive Analysis

Chaos Labs presents the end-of-season 1 review of full trading on the dYdX Chain. All aspects of the exchange performance are covered with a focus on the impact of the launch incentive program.

Omer Goldberg
Omer Goldberg
Cover Image for The Imbalance Score: A Novel Metric for Ostium's RWA-Focused Perpetual DEXes

The Imbalance Score: A Novel Metric for Ostium's RWA-Focused Perpetual DEXes

Exploring risk mitigation levers and methodologies for weakly correlated assets, a key feature of the Ostium Perpetual DEX.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with Bluefin

Chaos Labs Partners with Bluefin

Chaos Labs is thrilled to announce our partnership with Bluefin, a leader in decentralized derivatives trading. This collaboration marks a significant milestone in our mission to blend the robustness and security of blockchain technology with cutting-edge trading solutions. We aim to revolutionize how on-chain trading is experienced, ensuring a seamless and secure bridge to off-chain asset offerings.

Omer Goldberg
Omer Goldberg
Cover Image for Seamless Risk Monitoring and Alerting Platform

Seamless Risk Monitoring and Alerting Platform

Chaos Labs is excited to share our partnership with Seamless, centered around risk management and optimization, following their successful launch on Base.

Omer Goldberg
Omer Goldberg
Cover Image for sBNB Oracle Exploit Post Mortem

sBNB Oracle Exploit Post Mortem

Chaos Labs summarizes the snBNB oracle exploit affecting the Venus LST Isolated Pool. The post-mortem focuses on the event analysis and risk management efforts following the exploit.

Omer Goldberg
Omer Goldberg
Cover Image for dYdX Chain Analytics and Risk Monitoring Portal

dYdX Chain Analytics and Risk Monitoring Portal

Chaos Labs is thrilled to introduce the dYdX Chain Analytics and Risk Monitoring Portal, a significant development in our continued partnership with the dYdX community. This portal encompasses the emerging dYdX Chain, providing valuable insights and risk assessment capabilities. Additionally, it features a dynamic leaderboard that offers real-time tracking and visibility into traders' points, providing transparency and clarity regarding their positions in the Launch Incentives Program.

Omer Goldberg
Omer Goldberg
Cover Image for dYdX Chain: A Comprehensive Overview of the Launch Incentives Program

dYdX Chain: A Comprehensive Overview of the Launch Incentives Program

In collaboration with dYdX, Chaos Labs is excited to announce a $20 million liquidity incentives program to mark the launch of the new dYdX Chain. This initiative, a significant step towards enhancing user experience and liquidity, is tailored to transition users to the dYdX Chain seamlessly. It's not just a program; it's an invitation to be at the forefront of dYdX's vision, shaping the future of decentralized finance.

Omer Goldberg
Omer Goldberg
Cover Image for The Role of Oracle Security in the DeFi Derivatives Market With Chainlink and GMX

The Role of Oracle Security in the DeFi Derivatives Market With Chainlink and GMX

The DeFi derivatives market is rapidly evolving, thanks to low-cost and high-throughput blockchains like Arbitrum. Minimal gas fees and short time-to-finality make possible an optimized on-chain trading experience like the one GMX offers. This innovation sets the stage for what we anticipate to be a period of explosive growth in this sector.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with Liquity Protocol

Chaos Labs Partners with Liquity Protocol

Liquity and Chaos Labs have announced a strategic collaboration centered around the development of Liquity v2, an upcoming, new Reserve-backed stablecoin protocol.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with Ostium

Chaos Labs Partners with Ostium

Chaos Labs will work closely with Ostium Protocol to improve their mechanism design and create a risk modeling and monitoring system. The partnership will prioritize the system's robustness and secure functioning, helping bridge the gap between on-chain trading and off-chain asset offerings.

Omer Goldberg
Omer Goldberg
Cover Image for GMX V2 Risk Portal Product Launch

GMX V2 Risk Portal Product Launch

Chaos Labs is excited to launch the GMX V2 Synthetics Risk Hub, expanding our existing V1 GLP Risk Hub to provide complete coverage, including all protocol versions.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with Ethena Labs for Mechanism Design, Economic Security and Risk Optimization

Chaos Labs Partners with Ethena Labs for Mechanism Design, Economic Security and Risk Optimization

Chaos Labs is partnering with Ethena Labs to fortify mechanism design and develop risk frameworks for the novel protocol. This collaboration is set to amplify the economic security and robustness of Ethena's innovative stablecoin, USDe.

Omer Goldberg
Omer Goldberg
Cover Image for crvUSD Risk Monitoring And Alerting Platform

crvUSD Risk Monitoring And Alerting Platform

Chaos Labs launches the crvUSD Risk Monitoring and Alerting Platform, providing thorough analytics and visibility and serving as a central hub for the crvUSD community to access a wealth of data and risk insights related to the protocol.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Risk Portal 2.0 Launch

Chaos Labs Risk Portal 2.0 Launch

Chaos Labs is proud to announce the official launch of the latest version of our Risk Hub.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with Nexus Mutual for Economic Security and Risk Optimization

Chaos Labs Partners with Nexus Mutual for Economic Security and Risk Optimization

After an extensive RFP process, the Nexus Mutual Foundation selected Chaos Labs as an economic security and risk partner. This collaboration is set to fortify the future of the Ratcheting AMM (RAMM) design, a critical component of the Nexus Mutual protocol.

Omer Goldberg
Omer Goldberg
Cover Image for Radiant Risk Monitoring and Alerting Platform

Radiant Risk Monitoring and Alerting Platform

Chaos Labs launches the Radiant Risk Monitoring and Alerting Platform, providing thorough analytics and visibility and serving as a central hub for the Radiant community to access a wealth of data and risk insights related to the protocol.

Omer Goldberg
Omer Goldberg
Cover Image for Venus Risk Monitoring and Alerting Platform

Venus Risk Monitoring and Alerting Platform

Chaos Labs launches the Venus Risk Monitoring and Alerting Platform, providing thorough analytics and visibility and serving as a central hub for the Venus community to access a wealth of data and risk insights related to the protocol.

Omer Goldberg
Omer Goldberg
Cover Image for Compound Multi Chain Risk Monitoring Hub

Compound Multi Chain Risk Monitoring Hub

Chaos Labs has partnered with Compound via the Grants program, launching a state-of-the-art Compound Cross-Chain Analytics and Observability platform.

Omer Goldberg
Omer Goldberg
Cover Image for dYdX Risk Parameter Recommendation Portal

dYdX Risk Parameter Recommendation Portal

Chaos Labs and Considered.finance are excited to present our collaboration, the dYdX Risk Parameter Recommendation Portal 4. This dashboard provides real-time parameter recommendations informed by market liquidity and objective order book liquidity measures.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with TapiocaDAO for Risk Management and Optimization

Chaos Labs Partners with TapiocaDAO for Risk Management and Optimization

Chaos Labs is thrilled to announce a strategic partnership with TapiocaDAO, centered around risk management and parameter optimization for the imminent launch of the omni-chain money market protocol and USDO.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Launches the Aave Asset Listing Portal to Streamline New Collateral Onboarding

Chaos Labs Launches the Aave Asset Listing Portal to Streamline New Collateral Onboarding

Chaos Labs has launched the Aave Asset Listing Portal, a tool that will streamline onboarding new collateral to the Aave protocol. The portal automates collecting and analyzing key market data around assets, enabling the community to make informed decisions and enhance risk management.

Omer Goldberg
Omer Goldberg
Cover Image for GMX GLP Risk Hub: A Public Derivative Risk Monitoring and Analytics Platform

GMX GLP Risk Hub: A Public Derivative Risk Monitoring and Analytics Platform

Chaos Labs is proud to partner with GMX, a leading DeFi perpetual platform, to launch the GMX GLP Public Risk Hub (Version 0), a cutting-edge platform designed to provide real-time user metrics, margin-at-risk analysis, alerting, and market simulations to assess the value at risk (VaR) in fluctuating markets.

Omer Goldberg
Omer Goldberg
Cover Image for Uniswap V3 TWAP: Assessing TWAP Market  Risk

Uniswap V3 TWAP: Assessing TWAP Market Risk

Assessing the likelihood and feasibility of manipulating Uniswap's V3 TWAP oracles, focusing on the worst-case scenario for low liquidity assets.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Partners with Compound for Cross-Chain Risk Analytics Grant

Chaos Labs Partners with Compound for Cross-Chain Risk Analytics Grant

Chaos Labs, a cloud-based risk management platform for DeFi applications, has been awarded a Compound Grant to build a Cross-Chain Risk and Analytics platform.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Risk Dashboard Launches Live Alerts for Real-Time Risk Management

Chaos Risk Dashboard Launches Live Alerts for Real-Time Risk Management

Chaos Risk Dashboard has rolled out new functionality that provides real-time alerts covering crucial indicators on the Aave v3 Risk Dashboard and BENQI Risk Dashboard.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs USDC Depeg - War Room Summary

Chaos Labs USDC Depeg - War Room Summary

Chaos Labs summarizes the USDC depeg event and risk management efforts following the collapse of SVB.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Launches the BENQI Parameter Recommendations Platform

Chaos Labs Launches the BENQI Parameter Recommendations Platform

Chaos Labs launches the BENQI Parameter Recommendations Platform to streamline risk parameter recommendations for the BENQI protocol.

Omer Goldberg
Omer Goldberg
Cover Image for Introducing the GHO Risk Monitoring Dashboard by Chaos Labs

Introducing the GHO Risk Monitoring Dashboard by Chaos Labs

Chaos Labs unveils a new version of the Aave v3 Collateral At Risk Dashboard monitoring the GHO deployment on the Goerli testnet in preparation for mainnet launch.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Raises $20M in Seed Funding to Automate On-Chain Risk Optimization

Chaos Labs Raises $20M in Seed Funding to Automate On-Chain Risk Optimization

Chaos Labs raises Seed funding led by Galaxy and Paypal Ventures to automate on-chain risk optimization.

Omer Goldberg
Omer Goldberg
Cover Image for AAVE v3 Collateral At Risk Dashboard Expands Deployments Support to Ethereum v3

AAVE v3 Collateral At Risk Dashboard Expands Deployments Support to Ethereum v3

Following the successful launch of the AAVE v3 Collateral At Risk Dashboard, we're proud to announce expanded support for Ethereum v3.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Unveils Parameter Recommendation Platform.

Chaos Labs Unveils Parameter Recommendation Platform.

After becoming full-time contributors to the Aave protocol in 2022, Chaos Labs has been working on all fronts to deliver tools that will increase the community’s understanding of Aave and its potential. We’re proud to publish V0 of the Chaos Labs parameter recommendation platform to the community!

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Selected by Uniswap Foundation for TWAP Oracle Research Grant

Chaos Labs Selected by Uniswap Foundation for TWAP Oracle Research Grant

Preceded by earlier V3 TWAP oracle research, the Uniswap Foundation announces a Chaos Labs grant.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs & Hathor Nodes launch platform to optimize Osmosis incentive distribution

Chaos Labs & Hathor Nodes launch platform to optimize Osmosis incentive distribution

Funded by the Osmosis Grants Program, the pair launches an open-sourced incentives model and community dashboards.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs receives a Uniswap Foundation grant for LP strategies for V3

Chaos Labs receives a Uniswap Foundation grant for LP strategies for V3

Chaos Labs has been awarded a grant from the Uniswap Foundation to test and simulate sophisticated LP strategies.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs helps navigate DeFi volatility with an expanded Aave V2 risk partnership

Chaos Labs helps navigate DeFi volatility with an expanded Aave V2 risk partnership

Chaos Labs announces further collaboration with Aave to include Aave V2 risk coverage.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Osmosis Liquidity Incentives Portal Update

Chaos Labs Osmosis Liquidity Incentives Portal Update

An update on the Osmosis Liquidity Incentives Portal collaboration with Hathor Nodes.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Launches Benqi Risk Dashboard

Chaos Labs Launches Benqi Risk Dashboard

Chaos Labs is launching the Benqi Risk Dashboard, utilizing real-time user metrics to understand the value at risk across volatile markets as well as yield earned and paid over time.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Asset Protection Tool

Chaos Labs Asset Protection Tool

Chaos is unveiling a new tool to measure price manipulation risk and protect against it. Introducing the Chaos Labs Asset Protection Tool

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Joins AAVE as Full-Time Contributor

Chaos Labs Joins AAVE as Full-Time Contributor

After a successful governance vote, Chaos Labs is joining Aave as a full-time contributor to focus on risk management and parameter recommendations for all Aave v3 markets.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Receives Osmosis Grant

Chaos Labs Receives Osmosis Grant

Chaos Labs has received a grant from the Osmosis Grants Program and will partner with Hathor Nodes on optimizing the Osmosis incentives program.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs <> Benqi veQI Calculator

Chaos Labs <> Benqi veQI Calculator

Chaos Labs, a cloud security platform for DeFi applications, announces the launch of the Benqi veQI calculator.

Omer Goldberg
Omer Goldberg
Cover Image for Maker Simulation Series: Auction Price Curve & Keeper Gas Strategies (Pt. 4)

Maker Simulation Series: Auction Price Curve & Keeper Gas Strategies (Pt. 4)

Chaos Labs, a cloud-based simulation platform for smart contract applications, has collaborated with Maker to model and simulate how Keepers with competing gas strategies impact the Auction Price Curve for liquidations.

Omer Goldberg
Omer Goldberg
Cover Image for Benqi veQI Economic Analysis

Benqi veQI Economic Analysis

Diving deep into Benqi's veQI tokenomics and utility.

Omer Goldberg
Omer Goldberg
Cover Image for Maker Simulation Series: Peg Stability Module (Pt. 3)

Maker Simulation Series: Peg Stability Module (Pt. 3)

Chaos Labs, a cloud-based simulation platform for smart contract applications, has collaborated with Maker to model PSM simulations.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs launches AAVE v3 Risk Bot

Chaos Labs launches AAVE v3 Risk Bot

The AAVE v3 Risk bot will provide monitoring, notifications and daily summaries for risk related activity across all v3 deployments.

Omer Goldberg
Omer Goldberg
Cover Image for Maker Simulation Series: Flapper Surplus Dai Auctions (Pt. 2)

Maker Simulation Series: Flapper Surplus Dai Auctions (Pt. 2)

Chaos Labs, a cloud-based simulation platform for smart contract applications, has collaborated with Maker to model and simulate Flapper Surplus DAI auctions.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Launches AAVE v3 Risk Application

Chaos Labs Launches AAVE v3 Risk Application

Chaos Labs, a cloud security platform for DeFi applications, has launched an AAVE v3 collateral at risk and real-time user metrics dashboard.

Omer Goldberg
Omer Goldberg
Cover Image for Maker Simulation Series: Flipper Black Thursday (Pt. 1)

Maker Simulation Series: Flipper Black Thursday (Pt. 1)

Chaos Labs, a cloud-based simulation platform for smart contract applications, has collaborated with Maker to model and simulate Flip Auctions, liquidations and auctions.

Omer Goldberg
Omer Goldberg
Cover Image for AAVE Simulation Series: stETH:ETH Depeg (Pt. 0)

AAVE Simulation Series: stETH:ETH Depeg (Pt. 0)

A simulation series focused on economic security for the AAVE protocol. Let's examine the effect of a stETH:ETH depeg.

Omer Goldberg
Omer Goldberg
Cover Image for Maker Simulation Series: Introduction (Pt. 0)

Maker Simulation Series: Introduction (Pt. 0)

Chaos Labs, a cloud-based simulation platform for smart contract applications, has collaborated with Maker to model and simulate liquidations and auction mechanisms.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Dives Deep Into AAVE v3 Data Validity

Chaos Labs Dives Deep Into AAVE v3 Data Validity

Chaos Labs, a cloud security platform for DeFi applications, has discovered

Ron Lev
Ron Lev
Cover Image for Chaos Labs Collaborates with Benqi For Liquid Staking Analytics

Chaos Labs Collaborates with Benqi For Liquid Staking Analytics

Chaos Labs, a cloud security platform for DeFi applications, announces a partnership with Benqi to support Liquid Staking on the Avalanche network.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Receives AAVE Grant

Chaos Labs Receives AAVE Grant

Chaos Labs, a cloud security platform for DeFi applications, has been awarded an AAVE Grant to build a collateral at risk and real-time user metrics dashboard.

Omer Goldberg
Omer Goldberg
Cover Image for Pushing Economic Security Boundaries with MakerDAO Pt. 2

Pushing Economic Security Boundaries with MakerDAO Pt. 2

Chaos Labs, a cloud security and testing platform for smart contract applications, has created a cloud platform for Maker to test their liquidation and auction mechanisms.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Open Source Uniswap v3 TWAP Hardhat Plugin

Chaos Labs Open Source Uniswap v3 TWAP Hardhat Plugin

Chaos Labs, a cloud security platform for DeFi applications, has open source a utility package for interfacing with Uniswap v3.

Omer Goldberg
Omer Goldberg
Cover Image for Uniswap V3 TWAP Oracle Deep Dive - Pt. 2

Uniswap V3 TWAP Oracle Deep Dive - Pt. 2

An in depth look at Uniswap v3 TWAP architecture and usage in development.

Omer Goldberg
Omer Goldberg
Cover Image for dYdX Maker Liquidity Rewards Distribution Report

dYdX Maker Liquidity Rewards Distribution Report

Chaos Labs releases the dYdX Market Maker Liquidity Rewards Distribution Report.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Receives Chainlink Grant to build Terra Oracle Infrastructure

Chaos Labs Receives Chainlink Grant to build Terra Oracle Infrastructure

Chaos Labs, a cloud security platform for DeFi applications, has been awarded a Chainlink Grant to build tooling and infrastructure for Terra Oracles.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs releases the dYdX Perpetual Funding Rate App

Chaos Labs releases the dYdX Perpetual Funding Rate App

Chaos Labs releases the dYdX Perpetual Funding Rate application for the dYdX ecosystem.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Open Sources Chainlink Price Feed NPM Module

Chaos Labs Open Sources Chainlink Price Feed NPM Module

Chaos Labs, a cloud security platform for DeFi applications, has open source a utility package for interfacing with Chainlink price feeds.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Open Sources dYdX Trading CLI

Chaos Labs Open Sources dYdX Trading CLI

Chaos Labs, a cloud security platform for DeFi applications, has open sourced a trading tool for the dYdX ecosystem.

Omer Goldberg
Omer Goldberg
Cover Image for Pushing Economic Security Boundaries with MakerDAO

Pushing Economic Security Boundaries with MakerDAO

Chaos Labs, a cloud security and testing platform for smart contract applications, has created a cloud platform for Maker to test their liquidation and auction mechanisms.

Omer Goldberg
Omer Goldberg
Cover Image for Uniswap v3 TWAP Oracle Tooling and Deep Dive Pt. 1

Uniswap v3 TWAP Oracle Tooling and Deep Dive Pt. 1

Chaos Labs, a cloud security platform for DeFi applications, has released open source tooling for developing with Uniswap v3 TWAP Oracles.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Receives dYdX Grant

Chaos Labs Receives dYdX Grant

Chaos Labs, a cloud security platform for DeFi applications, has been awarded a dYdX Grant to build analytics and tooling for the dYdX ecosystem.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Receives Uniswap Grant

Chaos Labs Receives Uniswap Grant

Chaos Labs, a cloud security platform for DeFi applications, has been awarded a Uniswap Grant to build tooling for Uniswap v3 TWAP Oracles.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Adds Chainlink Oracle Cloud Integrations

Chaos Labs Adds Chainlink Oracle Cloud Integrations

Chaos Labs receives grant to enhance Chainlink Oracle Cloud Testing Environment.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs joins Maker SES

Chaos Labs joins Maker SES

Chaos Labs, a cloud security and testing platform for smart contract applications, has recently joined the SES incubation program.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Receives Chainlink Grant

Chaos Labs Receives Chainlink Grant

Chaos Labs, a cloud security platform for DeFi applications, has been awarded a Chainlink Grant.

Omer Goldberg
Omer Goldberg
Cover Image for Chaos Labs Mission Statement

Chaos Labs Mission Statement

Chaos Labs is a cloud security and testing platform for smart contract applications. Mission statement coming soon 🎉 🥳

Omer Goldberg
Omer Goldberg