πThe 2sAMM
"Two AMM Curves??!? What's next, Re-Re-Re staking?" - SBF from Jail.
Last updated
"Two AMM Curves??!? What's next, Re-Re-Re staking?" - SBF from Jail.
Last updated
This gives a lite technical overview of the Two-Sided AMM. Before diving into its mechanics, it would be helpful to understand what Automated Market Making and Automated Market Taking accomplish.
Automated Market Making was a momentous step for Decentralized Finance. Anyone could now permission-lessly trade tokens on a decentralized exchanged backed by a decentralized pool of market makers through a single smart contract.
Exactly how these AMM smart contracts decide which price traders get to trade at depends on the algorithm it employs. There have been a number of different algorithms based on unique curves, but the most popular algorithm that has stood the test of time is the constant product formula based AMM. So let's review the history of that before getting to Itos's big upgrade.
The first full-range AMMs were simple, comparatively safe and easy to use. Concentrated Liquidity AMMs allowed for much higher returns but were comparatively way more difficult to use properly. It was like adding a gas engine to your bicycle. You went much faster, but you could easily get hurt in the process.
At Itos, this third generation is like adding airbags, brakes, GPS, helmets and more to your AMM. We recognize that you can go farther and faster by adding a few safety measures. Safe yield farming is smart yield farming!
We rebuilt the Uni-V3 style AMM (CLAMM) from the ground up with the ability to short sections of the liquidity curve.
Now the AMM has both Liquidity Providing positions which earn fees and Liquidity Taking positions that pay fees.
The Liquidity Taking positions earn impermanent gain, are totally customizable, have no lockup and are as simple to use as liquidity providing positions.
By combining Liquidity Providing and Liquidity Taking, we can hedge the risks that come from normal concentrated liquidity provisioning and then take advantage of liquidation-free leverage to boost yields even further.
Once we add other positions (like token deposits, borrows, perps, and more) into the mix with our Universal Cross-Margin-er, we can create custom and powerful new DeFi primitives.
At a high level, the 2sAMM is composed of two sides, the liquidity providing side and the liquidity taking side. The liquidity providing side's curve is identical to a Generation 2 AMM. The liquidity taking side has an opposing curve and introduces the concept of Automated Market Taking. More details about the concept are found on the dedicated page. Here we'll go into depth about the operational mechanics.
The key concept of Liquidity Taking is that it reserves liquidity away from the public swapping functionality of the AMM to be swapped against privately. So Liquidity Taking also chooses a price range and a liquidity amount to reserve. Because it gets the privilege of swapping privately (essentially guaranteeing an average execution price), it pays both the swap fees and the borrow cost of those underlying tokens.