🌊Core Concepts
Poolside is a composable AMM that introduces liquidity segmentation. On Poolside, the liquidity of an asset pair exists in pockets of active liquidity (pools) and inactive liquidity (reservoirs). This segmentation allows yield, such as staking rewards, to accrue inside reservoirs. This protects LPs from unnecessary losses due to arbitrage and maintains an accurate pool price. LPs can later add tokens from reservoirs to the pool under some constraints. This means yield that would have been lost in other AMMs is preserved and becomes productive in Poolside.
Token & AMM Design
Understanding Poolside requires a basic understanding of both token and AMM design. Although Poolside can trade any token pair, it works best for LSTs, LRTs, and other yield-bearing assets. Protocols that issue value-accruing tokens must decide how the yield is distributed to token holders. In DeFi, the prevailing token designs for this have been rebase tokens or ones based on cTokens. While these token designs achieve similar outcomes and work fine for entering and exiting positions through the token issuers, they both suffer inside liquidity positions. This is because AMMs don't have a way of understanding when yield, like staking rewards, is distributed.
Rebase Tokens
LSTs and yield-bearing assets that rebase update supply to map 1:1 with an underlying asset. The usage of rebase tokens in this manner was pioneered by AAVE's aTokens and Lido's stETH. stETH is a receipt token for an amount of the original ETH collateral and the accrued ETH rewards. stETH being a rebase token, when rewards are distributed, the entire supply of stETH changes to match the underlying ETH.
The problem with rebase tokens inside AMMs stems from the volatility in the supply. Since AMMs use the balance of reserves as one of the inputs to determine price, any fluctuation of the token supply will render a new price calculation. So when stETH earns staking rewards, the supply of stETH in a pool goes up, which means that stETH will become cheaper against the other token. This leaves the pool vulnerable to arbitrage. LPs will lose their expected staking rewards and earn less in swap fees as their deployed liquidity has been undervalued.
Poolside uses this rebase to our advantage. This helps our AMM understand that value is changing and accrues the staking rewards into reservoirs.
cTokens
Yield-bearing tokens based on cTokens can be minted or burned according to a floating exchange rate. The majority of LSTs and LRTs use a form of this design. rETH, for example, is also a receipt token for an amount of staked ETH collateral and accrued ETH rewards. When ETH rewards are distributed to rETH holders, the supply of rETH remains constant. However, what changes is the exchange rate, so the amount of ETH that rETH can redeem with the primary issuer becomes larger.
While this token design is more straightforward to integrate, it does introduce some quirks. Because rETH is not pegged to ETH and is continually representative of more staked ETH, it will experience divergences in price over time. These divergences are vulnerable inside liquidity positions, especially inside AMMs for pegged assets.
When staking rewards are distributed to rETH holders, the token becomes intrinsically more valuable, as rETH can claim more ETH than before. This creates value leakage inside AMMs because the price between a pair doesn't change despite the value of rETH increasing. Again, AMMs need help understanding when a token's value has changed outside of the pool. LPs lose their yield to arbitrage as the market price doesn't reflect the value change. Inside AMMs that optimize for pegged assets, less liquidity facilitates more potent trading, but all this means for yield-bearing tokens is that this arbitrage occurs more efficiently.
Poolside Wrappers
Poolside Wrappers turn fixed-supply assets that accrue value, like LSTs based on cTokens, into wrapped rebase tokens that benefit from Poolside's design. These wrapped rebase tokens track an exchange rate through an oracle or a ratio of queryable balances. This exchange rate is expressed in the token supply, simplifying accounting and allowing reservoirs to work as designed.
Poolside wrappers are used to map receipt tokens to their underlying asset. This allows tokens like cbETH and sAVAX to be understood in ETH and AVAX terms, respectively. For example, sAVAX is wrapped and turned into rsAVAX (Rebasing sAVAX). One rsAVAX has a claim on 1 AVAX. So instead of referring to a smart contract to understand how much claim your balance of sAVAX has on staked AVAX, rsAVAX shows you this information in its balance.
As the underlying assets accrue value, the wrapped rebasing versions of the token update the total supply to reflect the change. These rebase events occur in the reservoirs, unlocking the protection from unnecessary losses that native rebase tokens enjoy inside Poolside.
Liquidity Pools and LPs
Liquidity pools represent active liquidity. These pools dictate the swap ratio between two unique tokens. Poolside uses liquidity pools to match buyers and sellers. Poolside offers two curves, a stableswap for pegged assets and a CFMM for volatile assets. In exchange for providing liquidity, LPs receive minted LP tokens. LP tokens represent a portion of the pool's liquidity and fees generated from swaps. LPs can withdraw liquidity and redeem for the underlying assets anytime.
Reservoirs
Poolside adds two additional token balances called reservoirs, one for each token. The added reservoirs represent inactive liquidity and allow for the following:
Staking rewards and yield to accrue to LPs instead of being arbitraged away
Liquidity to avoid unnecessary divergence loss
Pools to remain accurately priced, maximizing swap fee potential
Most existing AMMs struggle to support rebase tokens because of how pools work. Pools use the token balances of their reserves to determine the price between a pair of assets. This works fine for tokens with static supplies but is detrimental to any productive token.
Tokens that rebase suffer because AMMs mistake the additional supply as less demand. LPs' tokens get discounted, and they lose out on fee potential. Tokens that accrue value also suffer because pools are inductive. Pools with these tokens leak value since the protocol doesn't understand the exchange rate has changed.
The diagram below shows how existing AMMs treat rebasing events:
Positive Rebase
In contrast, new tokens from positive rebases on Poolside flow into reservoirs rather than immediately into active liquidity pools:
As shown in the User Guide, LPs can balance out pools by depositing the asset with less liquidity. Using the example above, LPs can mint liquidity tokens by depositing ETH. The value from the new deposit (ETH) and the reservoir value (prETH) then automatically flow into the active liquidity pool.
No matter the chain of events, there will always be at least one empty reservoir.
Negative Rebase
Negative rebases are handled by letting tokens flow between the liquidity pool and reservoirs to maintain the swap ratio. The flow of tokens is dependent on whether one of the reservoirs is empty or partially filled:
prETH moves from the reservoir to the active liquidity pool.
ETH moves from the liquidity pool into a reservoir (if prETH's reservoir is empty).
Reservoirs can also be used for non-rebasing, yield-bearing tokens using a Button Wrapper.
Last updated