April 25, 2023: Tricrypto: The Next Generation ππ
Curve Pools with Three Volatile Assets for Half the Gas
Keep an eye on the Leviathan News YouTube channel this morning for a possible livestream with Tricrypto NG author Fiddy.
Finally, a βbig weekβ that doesnβt involve a sense of existential terror.
Amidst the protracted $crvUSD deployment we spotted bigger and arguably more immediately impactful event: the deployment of Tricrypto Next Generation.
The previous generation of Tricrypto has been a mainstay of Curve Finance since its launch, as demonstrated by this Blockworks dashboard by Dan Smith:
We see the supermajority of Curveβs daily volume comes from 3pool and Tricrypto. DeFi has a number of wonderful assets, but all the trading volume still comes from the top tier. BTC, ETH, USDT, and USDC are four of the top five cryptocurrencies tracked on CoinGecko, and make up 71% of the crypto market cap. Cover these assets and you cover most of crypto.
Tricrypto handles trades among three of these (subbing WBTC for BTC). 3pool snags the two largest stablecoins. Therefore these two pools suffice for most of Curve trading volume, with the remainder of the long tail capturing maybe 20%.
The role of Tricrypto and 3pool in the Curve ecosystem are also quite distinct. Trades between USDT-USDC delivers very slim margins, but as a volume game can still make good fees, particularly during periods of major volatility. Trades among volatile assets (WBTC, ETH, USDT) can generate a bit more in the way of profit.
Since launch, Tricrypto gave Curve a good slice of trades among the top tier of crypto assets. Curve (dark blue) has always captured its steady chunk of trades, though it never displaced Uniswap (pink).
This chart may be frustrating for Curve maxis. Curve v2 pools are theoretically better in terms of slippage, providing the best price quotes. Wen flippening?
Gas efficiency is a major reason. Last summer, a landmark Delphi Digital report covered the absolute state of trades quite well.
The stunning report revealed that Curve Tricrypto generally provided a better quote than Uniswap by $5.81 in about 2/3 of trades.
However, the gas costs of Curve Tricrypto tended to be higher. When factoring in gas costs, smol traders might ultimately save more money by getting $5.81 less value worth of tokens to save a few more bucks on gas. Only whales making large trades, where gas is less of an issue, might preferentially trade via Curve.
Peek over at Arbitrum and you can glimpse how Tricrypto might perform if gas fees were moot. On Arbitrum, Curve quoted better prices inclusive of gas, and utterly dominated volumes. What if this effect came to mainnet?
Why would Curve Tricrypto gas costs be higher if it uses gas-efficient Vyper? A few reasons. For starters, thereβs a question of who pays the costs to rebalance liquidity. On Uniswap v3, this cost is paid by liquidity providers, who must actively reapportion liquidity as prices move. Curve v2 does not require liquidity providers to rebalance liquidity, so the costs of rebalancing instead get paid occasionally by traders executing liquidity operations on the pool (ie trading, or adding or removing liquidity).
Another key factor was simply that the first version of Tricrypto was not terribly gas optimized. The pool used a lot of cutting edge and complex math. Very little time or energy was spent refactoring these equations into their most efficient form, but simply getting them working.
The newest Tricrypto NG involved a lot of theoretical math. Chew on the first page of NGβs white paper with or without the aid of ChatGPT, and youβll gain more appreciation for why Curve devs are best in the business.
Anecdotally, we observe plenty of evidence that high gas fees price out users. Of course, power traders will have no loyalty to either Curve or Uniswap, but to whatever engine delivers the best value in the moment.
At the end of the day, we therefore donβt believe traders should trade directly on Curve or Uniswap. Both protocols should deliver the best quote they can provide, and users should simply source the best rate from the DefiLlama meta-aggregator.
If only Curve could reduce gas fees 1.5-2x!
Enter Tricrypto: the Next Generation.
TNG presents a variety of improvements on the prior Tricrypto, including features like ERC20 compatibility, a permit method for gasless approvals, and better price oracles.
Potentially the most groundbreaking change is simply the remarkable improvements to gas efficiency. The poolβs beloved author, username βFiddyβ, appropriately made it the pool about fifty percent cheaper.
We have a separate article in the works unpacking the mad science that went into these optimizations, but the early test drive suggests it works.
Cherry picking a recent transaction on the old Tricrypto, it cost the user 279K gas:
An early morning test drive of a new pool dropped this to 183K, about 34% cheaper in this test run.
This gas consumption puts it in the same ballpark as Uniswap.
The actual gas price paid using the new TNG is sensitive to a number of factors (ie the pool makes some tweaks in terms of when liquidity gets rebalanced), but its been tested to death in an laboratory setting, and now we finally get to see observe its performance in the wild.
Note that these pools can be useful for volatile trading assets, but trades among stable assets will still see better performance deploying a classic stablecoin pools.
We may also see this trigger a race to the bottom. Perhaps Uniswap releases a gas-optimized version. In my estimation its probably impossible to beat Uni v3 in a head-to-head gas race. Factor in the Curve AMM efficiency, however, and you may have an entertaining horse race.
Hence my seemingly hyperbolic claim that this deployment is potentially bigger than $crvUSD. To be a bit more specific: in the short term I do suspect the Curve ecosystem will see more impact from the new generation of Tricrypto. Over a longer time horizon $crvUSD may reshape the landscape to a greater degree, but I donβt suspect this impact will be realized until $crvUSD begins onboarding other forms of collateral, which may be soon, but it may be SOONβ’οΈ.
I suspect weβll see fruits from the Tricrypto NG contracts very quickly. For starters, we may expect to see more heated competition for on-chain trading of the largest cap crypto assets.
The premise behind veCRV is the promise that Curve will be competitive at capturing trading volume and passing trading fees along to stakers. Curve v2 has always been impressive for its ability to minimize slippage, and now we see gas optimizations that may help actualize even more potential.
Of course, this will probably mean users staked into the current Tricrypto are forced to migrate, so LPs should be prepared to make some moves.
The other impact that will likely be more instantly realized is the fact that Tricrypto: NG also comes with an accompanying factory, which will allow anybody to permissionlessly launch their own gas optimized Tricrypto pool containing three assets.
Weβre already seeing power users brainstorming the possibilities of what they might create using such a factory:
Much of what makes the Curve ecosystem so exciting is how it gets leveraged by the wider DeFi community to launch interesting applications.
In this instance, the fruits of the communityβs imaginations may be unlocked much more immediately than we might see from $crvUSD β which will probably go through a couple of cycles before it becomes the behemoth I expect it ultimately becomes.
However things actually shake out, itβs been an exciting week for this Curve fanzine author.
For users interested in learning more about the specific changes within this pool, Iβd urge readers to peruse the Github repository β the code is well documented. Also, check this early proposed draft of a changelog which describes several of the changes to achieve this efficiency.