YieldBasis Rebalancing Risks
The flash crash of Oct-10 resulted in both gains and losses for YieldBasis LPs. In this post we explain the reasons why this happened and highlight some of the risks.
Key takeaways:
- Between 21:00 and 22:30 UTC the pools handled over $50m in volume, making >$500k in trading fees
- The LEVAMM couldn't be profitably arbitraged against the Cryptopool due to high gas costs, meaning that leverage rebalanced in a timely manner
- crvUSD traded off-peg, which also meant that leverage was skewed
- As a result some LPs were overexposed to the downward BTC price move
YieldBasis Rebalancing Mechanics
YieldBasis removes classic AMM impermanent loss by fixing compounding leverage at 2×. In practice, the system targets a 50/50 split between debt and equity in the BTC–USD LP. When that ratio holds the position tracks BTC nearly 1:1 instead of along a sub-linear AMM curve. In theory, the BTC balance for LPs earning trading fees should be up only.
When price moves, the debt to equity ratio drifts. If BTC rises, LP value increases while debt is unchanged, so the position becomes under-levered and must add debt; if BTC falls, it becomes over-levered and must repay debt. The rebalancing AMM (LEVAMM) prices LP<>crvUSD on a BTC-USD oracle-anchored, constant-leverage curve so that the correcting trade (i.e. adding or removing LP and adjusting debt) gets a slightly better quote than the opposite side.
These rebalancing swaps are executed via the Virtual Market, which bundles an LP mint/burn, a flash loan, and CDP mint/repay into a single transaction. Once the deviation from 2× is large enough to costs, arbitrageurs take the trade and the system rebalances toward the 50% debt target.
The following diagram shows an example of this arbitrage should work in a scenario where BTC price decreases from $100k to $90k:

Importantly, 'no IL' is conditional on the timely rebalancing of the system. This assumes that arbitrageurs will be able to make a profit by executing rebalances when needed. Moreover, when targeting the oracle's BTC-USD price it is assumed that 1 crvUSD = $1. This means that deviations in the crvUSD peg can cause leverage to become skewed. As we will see, in extreme scenarios these assumption may not hold, creating risks for the system.
Flash Crash
To better understand what happened during the flash crash, we used Pangea Studio to gather and analyse several related datapoints. Our analysis shows multiple factors at play which resulted in a temporary overexposure to the downward BTC price move. The below diagram shows how these factors relate by plotting them the same time axis:

The first plot shows the spread between the price of the Virtual Market and the Cryptopool. Under normal conditions we do not expect the spread to grow large, as it should be arbitraged away through swaps in the Virtual Market. However, we see that as the BTC price begins to fall the debt to equity ratio grows without being rebalanced effectively, causing the system to become overleveraged.
The second plot shows the price, volume, and relative size of YieldBasis swaps. We've highlighted Virtual Market rebalance swaps with a green or red outline, depending on whether the LP was being bought or sold. During the drop in BTC price there were relatively few rebalances despite the spread widening, and these didn't always restore the balance in a single transaction. Around 22:16 we see multiple buys of the cbBTC LP at steeply discounted prices, followed by similar swaps for WBTC and tBTC which eliminate the spread, marking a point at which the arbitrage had suddenly become profitable to execute.
The third plot shows the price, volume, and relative size of all swaps in the crvUSD/USDC pool. Note that crvUSD first trades below-peg as BTC falls, before then having several spikes over-peg, almost reaching 1.05 USDC. It's noteworthy that these fluctuations in the crvUSD peg occur around the same time as the fluctuations in the Virtual Market spread.
Lastly, we see that following the initial crash the effective gas price shot up suddenly and stayed elevated, gradually tailing off as queued transactions were processed. At the peak, the cost of making a simple swap could reach as high as $3k, which raised the hurdle for profitable arbitrages in the Virtual Market.
Putting this all together, we conclude that at least two different edge cases were realised during this period. Firstly, high gas prices meant that the cost of rebalancing outweighed the profits, leading to the system becoming overleveraged. Secondly, the fluctuation in the crvUSD peg caused the leverage factor to become skewed, as the system was trying to target a BTC-USD oracle price under the assumption that 1 crvUSD = $1. The combination of these two factors magnified the fall in BTC price for LPs, resulting in losses.
The losses were not evenly distributed across the pools. For example, cbBTC remained more balanced due to the work of efficient MEV bots, whilst some pools received more volume - and thus fees - than others. Calculating the exact profit and loss for the pools is challenging as not all fees are counted as profit, but Mich has shared this plot which suggests that WBTC was the worst hit, whilst cbBTC actually made significant profits. Were it not for the leverage imbalance, the volatility of this flash crash would have likely proven very profitable for all pools.

The lack of profitable arbitrage under high gas is an unfortunate side effect of the $10m pool cap that was ironically intended as a safety measure. Larger pools would have facilitated larger rebalance swaps, with proportionally lower gas cost compared to the overall trade size. They also would have captured significantly more volume and fees from the volatility. This risk may be somewhat mitigated now that pool caps have been raised to $50m.
The interaction with crvUSD however deserves further scrutiny. A more detailed analysis is needed to understand how exactly crvUSD trading off-peg can skew leverage in YieldBasis. Moreover, as the total crvUSD minted to YieldBasis becomes an increasingly large proportion of the overall circulating supply, the effect of the rebalancing system on the crvUSD peg stability itself needs to be analysed in detail. Here it is necessary to parse out of the correlation what is cause, what is effect, and what is mere coincidence.
Conclusion
True to the 'test in prod' approach, the Oct-10 flash crash was trial by fire for YieldBasis which has provided rich data for improving the system and better understanding edge cases and risks. Spiking gas and a drifting crvUSD peg temporarily broke the arbitrage loop that keeps debt/value at 50%. With rebalances uneconomic, leverage drifted above 2× and LPs were overexposed to a downward price movement.
Our key lesson learned is that 'no IL' is conditional. YieldBasis removes AMM curvature if (and only if) rebalancing clears in real time. Crypto markets are complex systems and volatile moments can cause chain reactions which impact multiple seemingly unrelated variables in subtle and sometimes unanticipated ways. In this instance, key assumptions about execution cost and stablecoin basis were simultaneously violated, causing returns to diverge from expectation.
Raising pool caps is likely to help mitigate against the risk of high gas costs by enabling fewer, larger rebalances with lower gas per notional. As it turns out, YieldBasis is a protocol that is designed to work at a certain economy of scale. The dynamics of the protocol, its interactions with Curve, and how changes in scale may affect certain assumptions are all critical points to analyse to mitigate risk and optimise the protocol as it scales. In particular, more work is needed to analyse the interaction between YieldBasis and the crvUSD peg.
Here at Pangea, we will continue to closely monitor YieldBasis its place within Ethereum's DeFi ecosystem. You can read our other research pieces, including a detailed analysis of how YieldBasis generates volume on Curve, over at our blog. If you are interested learning more, you can get in touch by joining our Discord.