Our Work

Home · Projects · Ethos · Contact

dYdX v4: With Great Decentralization Comes Great Responsibility

Published on October 2023

In anticipation of the launch of dYdX v4, Xenophon Labs has prepared a comprehensive report on some of the features we are most excited about going into the dYdX Chain. In this report, we cover dYdX's migration from dYdX v3, the DEX built on an Ethereum Layer 2 rollup, to its own sovereign Cosmos blockchain with dYdX v4. We also discuss the responsibilities faced by the dYdX community in operating dYdX Chain, from slashing misbehaving validators to performing market risk management and managing trading rewards.

Why the Safety Module's Slashing Percentage Costs the Aave DAO Millions.

Published on July 2023

The safety module is a form of decentralized insurance: stakers deposit AAVE in a pool to earn yield, giving governance the right to slash the deposits to cover potential liabilities. The slashing percentage determines the percentage of deposits that can be slashed by governance. It currently sits at 30%. In a report sponsored by the Aave Grants DAO, we provide a quantitative analysis for why the current slashing percentage of 30% costs Aave between 39,000 and 56,000 AAVE (approximately $2.75M-$3.9M in USD) annually in cost of capital to stakers. Based on our findings, we recommend the AAVE DAO raise the slashing percentage, and accordingly lower emissions to the module.

We expect our initial changes to result in annual savings of $2M USD to the DAO, without compromising insurance.

Designing Quantitative Metrics for Protecting Curve LPs from Depegs.

Published on June 2023

A core concern of Curve`s liquidity providers is the risk of depeg for the LP`d assets. In our first engagement with Curve, Xenophon Labs has designed quantitative metrics for detecting asset price depegs to help protect Curve's liquidity providers. We developed a Bayesian Inference model for detecting changepoints in our metrics to alert LPs of potential depegs. By backtesting our models on 2022 and 2023 depegs, we identify which metrics are leading indicators of potential price depegs and show that some of our metrics detected major stablecoin depegs several hours before prices dipped below 99 cents. This is the first of hopefully many steps in identifying how to protect LPs from stable asset price volatility.

Formalizing the Value of Nontoxic Orderflow for the Uniswap Protocol.

Published on January 2023

We formalized a definition for the value that Uniswap LPs should ascribe to orderflow, based on that orderflow's information theoretic properties. We provide multiple models that the Uniswap protocol can utilize when determining how it should value orderflow, and we provide practical guidance for the implementation of an orderflow incentivization program. In this analysis, we also discovered that over 13% of the orderflow on top Uniswap V3 pools comes from sandwich attacks, and we curated the a comprehensive sandwich attack dataset.

Advising the Elimination of dYdX's Safety Staking Module, Resulting in More Than $20M in Savings Over Next 4 Years.

Published on November 2022

We conducted research that led to the discovery of critical economic inefficiencies in the dYdX Safety Staking Module. We advised that the module be wound down, and we carried out a successful vote to eliminate it. This change will save the protocol nearly 20M DYDX over the next four years, which was over $30M in value at the time the proposal passed.

Designing an Auction to Process Billions in Volume for CoW Protocol.

Published on December 2022

We formalized a second price auction for the cow protocol solver competition, and we backtested the new mechanism on historical data to project its impact on the solver competition, demonstrating that it would save the protocol over $500K per year if implemented. There is currently a governance proposal for implementing an extended version of this mechanism.

Saving dYdX $3M Monthly Through Game Theoretic Analysis of Trader Rewards.

Published on March 2022

A game-theoretic approach to understanding issues in the dYdX trader rewards mechanism, showing traders how to optimize their rewards and showing dYdX how to increase trading revenues by over $3M per month. We proposed our changes in dYdX governance, and these changes were implemented.