Kaiko Launches Data+: The Ultimate Crypto Research Tool

USDC’s Depeg or: How I Learned to Stop Worrying and Trust the Bots

DeFi

Curve

Stablecoin

Uniswap

Written by Riyad Carey

16/03/2023

Welcome to Deep Dive!

While the market seems to have shrugged it off, crypto – and DeFi in particular – survived an existential risk over the weekend. USDC was caught up in the turmoil that hit U.S. banks and depegged amidst fears it was no longer fully backed. We covered the reaction in centralized markets in the week’s Debrief, but given that USDC’s primary use case is in DeFi, this week we’ll examine how the depegging played out on-chain, examining trading, liquidity, and lending and borrowing, with a particular focus on the role that bots played.

  • Bots made huge sums arbitraging DEX pools

  • USDC dipped below $0.90

  • Cheap USDC was used to repay loans

  • Demand for USDT spiked

Trading

Curve maintained its lead on March 12; Uniswap V3 took top spot on March 13, with $1.5bn in volume to $1.3bn. Uniswap V2’s stablecoin-stablecoin volume also surged, though it reached just $40mn on March 11.

This flurry of activity created plentiful opportunities for arbitrage. Zooming in on the hours leading up to USDC’s depeg, Curve and Uniswap V3’s USDC-USDT price follows the same general trend with some differences.

Uniswap V3 allows for the creation of multiple pools for the same pair of assets, each with a different fee, giving liquidity providers (LPs) greater control over their risk and reward. This also has the effect of creating slight divergences in prices across pools: many of the trades that executed at worse prices were being routed through the USDC-USDT 0.05% fee pool, while the trades with better execution went through the 0.01% fee pool. Curve swaps did not exhibit this kind of divergence because USDC-USDT trades were routed through one pool: the 3pool.

The second order effect of the different prices between Uniswap V3 pools is that it creates opportunities for arbitrage (which can boost volumes significantly). Below is charted every USDC-USDT swap on Uniswap V2, V3, and Curve during the depeg.

Uniswap V2 moves in a uniform fashion, sticking closely to the line dictated by its AMM formula. There are few outliers except for an unfortunate user who was the victim of a sandwich attack and swapped 50,000 USDC for 30,549 USDT, a price of just $0.61, which seems to be the lowest registered anywhere on- or off-chain. Curve, too, has few outliers as it followed its AMM formula. Meanwhile, Uniswap V3 has numerous outliers and a wide spread – including swaps at a price of $1 while USDC was depegged everywhere else – as bots performed complex transactions to arbitrage between pools.

Never Miss a Deep Dive.

Liquidity

JIT liquidity still remains mostly isolated to the ETH-USDC 0.05% pool. Despite significant volumes, there was no evidence of any significant JIT liquidity in the other ETH-USDC pools or any USDC-USDT pools. In the case of these pools, it’s likely that the smaller 0.01% swap fee makes it too difficult for JIT providers to turn a profit.

Meanwhile, the 3pool shrunk from $525mn to under $400mn in a few hours as USDC’s price slumped and users pulled their liquidity. 958 of the 1,416 of users that interacted with the pool between March 10 and 14 only completed one transaction.

The top address by transaction count was submitting extremely complex transactions that utilized the 3pool to arbitrage across Uniswap V3, though these transactions were much smaller than JIT transactions.

Lending & Borrowing

Lending and borrowing protocols also provided some insight on how users were reacting to USDC’s depegging. The supply rate for USDC began to increase as its peg shook after users disproportionately borrowed/removed the stablecoin. Borrowers sought to short USDC while suppliers removed it from the protocol, likely to swap to a different token.

Just before USDC’s price bottomed, the USDC supply rate on Aave topped out at over 2% before falling back to 1% as loans were repaid. Meanwhile, DAI’s rate tumbled below 0.5% as it depegged and users were able to repay loans at a discount.

DAI’s rate decrease compared to USDC’s increase is confounding considering they had both depegged, but the story becomes clearer when looking at the hourly activity (with flash loans removed to better see flows). In the selected time period as both were depegging, $535mn DAI was deposited compared to just over $225mn borrowed. Meanwhile $621mn USDC was deposited, $1bn borrowed, $1.12bn repaid, and $752mn withdrawn.

USDC repayments were evenly spaced by hour, lending credence to the idea that users were taking advantage of cheap USDC to repay their loans at a discount.

The supply rates of unaffected stablecoins surged as users rushed to borrow them. While we don’t know the end goal of users borrowing these stables, an effective trade would have been to deposit collateral (probably ETH), borrow USDT, buy USDC at a discount with the USDT and wait for USDC’s price to return to the peg.

conclusion

Data Used In This Analysis

More From Kaiko Research