Pendle V2 (Part 1/3) — Foundation
Introducing the 1st key component of Pendle V2, a brand new AMM. This post will serve to walk through the various features while the whitepaper is available here for a technical dive into the mechanics.
Pendle V1 settled over notional $350,000,000 worth of yield trades within a year of launch, and we got a chance to experiment with a wide range of assets, from stablecoins to tokens with 80,000% APR. Being able to experience this first-hand provided us with insights that we would never have considered before.
We’ve consolidated all this into V2 and rebuilt the AMM. We are truly excited to bring it to life as a foundational building block for yield markets. We’d also like to credit the Notional Finance team for their novel AMM which enables fixed rates trading, one that we’ve adopted as the baseline model. We’ve conducted a study in the whitepaper which illustrates how significantly it improves on the current popular AMM models.
The V2 AMM introduces multiple features focusing on friendly liquidity provision, capital efficiency and flexibility. Here are some key points:
- Minimal impermanent loss (IL) for LPs
- Up to 200x improvement on capital efficiency from V1
- Low-slippage trades
- LPs earn fees from the trading of 2 assets while only providing liquidity for 1
- AMM can be optimized any specific yield ranges to optimize liquidity
A quick primer to PT and YT 👇
1 Pool, 2 Markets
Say goodbye to liquidity fragmentation, PTs and YTs can both be traded using a single pool of PT liquidity, enabled by utilizing flash swaps!*
This has benefits on multiple fronts:
LPs have better returns with their liquidity working doubly hard. They earn fees coming from 2 markets while only providing liquidity for 1 asset.
Traders benefit from deeper liquidity and a much improved UX as PT and YT swaps can all be executed on Pendle. V1 suffered from fragmentation as it required 2 separate pools for trading PT and YT.
For Pendle as a protocol, PT trades now contribute to protocol revenue (which previously wasn’t the case). PENDLE incentives will also be better utilized as they can be focused on a single pool to improve both PT and YT liquidity.
*Refer to the appendix on how it works.
Specialized for Yield Trading
Introducing 2 concepts to enhance liquidity depth — Concentrated Liquidity and a Dynamic Curve
Yields are often cyclical in nature and typically swing between highs and lows (much like a pendulum!). Typically, the floor and ceiling for the yield of a liquid asset are much easier to predict than its price.
For example, the annual yield of staked ETH is likely to fluctuate in a band of 0.5–12%. Knowing the rough yield range of an asset enables us to concentrate liquidity within that range.
Given the previous example, the V2 AMM can be optimized for such a range on staked ETH. The result is something conceptually similar to UniV3’s concentrated liquidity whereby liquidity is utilized much more effectively, while still retaining fungible LP tokens.
According to our simulation in this yield range, Pendle V2 improves capital efficiency by over 70x, making the liquidity of that pool equivalent to 70x deeper than a V1 pool of the same size.
The AMM model’s curve is specifically designed for yield trading. As time passes, PT and YT prices naturally shift as they approach maturity. The AMM curve automatically shifts to account for these changes, such that one will only trade the interest rate changes and not the prices of the individual assets.
The curve shifts also adjust the model to be more capital efficient as we approach maturity by taking into account the fact that PT trades closer to the underlying asset price (for example, it becomes infinitely capital efficient at the maturity where PT trades 1-to-1 against the underlying asset).
To further enhance the improvements to liquidity providers, the V2 AMM is set up such that IL is not a concern. IL is negligible as LPs provide PT and its corresponding yield-bearing asset, which are closely correlated. On top of that, the maximum IL is deterministic for liquidity provision to maturity.
As a bonus for liquidity providers: the assets provided also generate yield. As such, Pendle V2 LPs will be earning yields from:
- Fixed yield from the PT provided
- Yields from yield-bearing assets provided¹
- Swap fees (from both PT and YT trades)
- PENDLE incentives
With minimal IL alongside these yield sources, there is little downside in providing liquidity in Pendle V2 if the yield-bearing assets are being held as part of a longer-term strategy.
Auto-routing is built into V2, allowing anyone to trade or provide liquidity for PTs and YTs with any major asset. This is key to enable the smooth UX everyone is used to and allow Pendle users to take advantage of the deep liquidity that already exists on major DEXes.
V2 also introduces a dynamic fee rate to improve the trading experience where fees are based on interest rates instead of the absolute amount. This means that the absolute fees per dollar trade will decrease over time, as the same change in interest is equivalent to a smaller change in absolute price. E.g. There will be less swap fee from trading the same yield on a 1-month maturity vs a 1-year maturity.
Significant efforts have also been made to gas optimization to ensure transactions on V2 will be as cost-efficient as possible.
To further unlock the composability of fixed-rate products on Pendle, we’ve adapted a TWAP oracle for interest rates on Pendle’s V2 AMM. The TWAP oracle is adapted from UniswapV3, which allows for querying the TWAP of any duration for up to 9 days with no extra infrastructure needed. We’re beyond excited to see what can be built on top of Pendle, e.g. fixed rate lending/borrowing with PT, leveraged fixed rate, etc.
This first post has shared the key features of the V2 AMM which will act as the foundational infrastructure for yield markets. Part 2 will elaborate on how we will enable open, permissionless access for everyone.
YT Swaps with PT AMM
The V2 AMM is designed specifically for trading fixed rates with PT in focused ranges.
In V2, PT is always traded against its underlying asset. By doing so (e.g. PT-aUSDC / aUSDC pool)¹, IL is significantly mitigated by the high correlation between both assets.
Swapping PT is a straightforward process of swapping between the 2 assets in the pool, while YT swaps utilize flash swaps in the PT pools.
As PT and YT can be minted from and redeemed to 1 unit of the underlying asset, we can express the following price relationship:
P(PT) + P(YT) = P(Underlying Asset)
Note: P(Asset) represents the price of Asset
Knowing that YT price has an inverted correlation against PT price, we made use of this price relationship to route YT transactions through PT pools, effectively making use of one pool for both YT and PT trades.
How does it work? Let’s run through the steps with aUSDC as an example.
- Buyer sends aUSDC into the swap contract (auto-routed from any major token)
- Contract borrows more aUSDC from the pool
- Mint PT-aUSDC and YT-aUSDC from all of the aUSDC
- Send the YTs to the buyer
- The PTs are sold for aUSDC to repay the loan from step 2
- Seller sends YT-aUSDC to swap contract
- Contract borrows an equivalent amount of PT-aUSDC from the pool
- The YTs and PTs are used to redeem aUSDC
- A portion of the aUSDC is swapped to PT-aUSDC to repay the loan from step 2
- aUSDC is sent to the seller (or routed to any major tokens, e.g. ETH, USDC, wBTC, etc)
As shown above, YT trades are executed through PT / ybToken pool. As the pool accommodates both PT and YT swaps, LPs are expected to earn fees from both YT and PT swaps. Even though the pools consist of PTs and SYs, users can trade PT and YT with any major tokens supported, Pendle contracts will automatically route the tokens into the necessary assets.
¹ V2 AMM supports PT-ybToken / sy-ybToken where SY (standardized yield) is a standardized wrapped version of any ybTokens. Read more here. E.g. sy-aUSDC is simply wrapped aUSDC and is used to mint PT-aUSDC and YT-aUSDC.