Rehypothecation
Rehypothecation is a feature in Bunni v2 that allows pools to earn additional yield by depositing idle assets into external protocols. This mechanism maximizes the efficiency of capital within the pool, potentially increasing returns for liquidity providers (LPs).
What is Rehypothecation?
In the context of Bunni v2, rehypothecation refers to the process of depositing a portion of a pool's token reserves into external yield-generating protocols. This allows the pool to earn additional yield on assets that would otherwise be sitting idle.
Bunni v2 implements rehypothecation using ERC-4626 vaults. These standardized yield-bearing vaults allow for a flexible and composable approach to earning yield on idle assets.
Supported Protocols
Yield-generating protocols that can be used for rehypothecation include (but not limited to):
Pool creators can specify which protocol(s) to use for rehypothecation when setting up the pool.
How Rehypothecation Works
Reserve Split: When rehypothecation is enabled for a token, a portion of the pool's reserves for that token is stored in the specified ERC-4626 vault, while the rest is kept as raw tokens to facilitate swaps.
Rebalancing: After each swap, the pool potentially rebalances tokens between the vault reserves and the raw tokens based on predefined parameters.
Rebalance Parameters: For each token with rehypothecation enabled, there are three parameters that define its rebalance behavior:
- : Minimum ratio of raw tokens to total balance
- : Maximum ratio of raw tokens to total balance
- : Target ratio of raw tokens to total balance
Rebalance Trigger: When the ratio goes outside the range , the token is rebalanced between the vault reserves and the raw tokens so that .
Advantages
Increased Yields: LPs can earn additional yield on their deposited assets, potentially increasing overall returns.
Capital Efficiency: Idle assets are put to work, maximizing the efficiency of capital within the pool.
Flexibility: Pool creators can choose which tokens to rehypothecate and which protocols to use, allowing for customized strategies.
Seamless Integration: The use of ERC-4626 vaults allows for easy integration with a wide range of yield-generating protocols.
Gas Cost Management: By keeping a portion of assets as raw tokens, the pool can still facilitate swaps without frequent, expensive vault operations.
Considerations
Smart Contract Risk: Using external protocols introduces additional smart contract risk. It's important to choose reputable, audited protocols for rehypothecation.
Gas Costs: Rebalancing between vault reserves and raw tokens incurs gas costs. The rebalance parameters should be set to balance yield generation with gas efficiency.
Liquidity: The portion of assets kept as raw tokens should be sufficient to handle expected swap volumes to avoid frequent rebalancing.
Interaction with Other Bunni v2 Features
Autonomous Rebalancing: Pools using rehypothecation should generally enable autonomous rebalancing to maximize token utilization.
Surge Fees: Pools using rehypothecation for both tokens should enable surge fees, as total liquidity will increase over time as yield accrues.
Shapeshifting: Rehypothecation can be particularly powerful when combined with shapeshifting strategies, allowing for dynamic allocation of capital based on market conditions.
By implementing rehypothecation, Bunni v2 provides LPs with a powerful tool to maximize returns on their deposited assets, further differentiating it from traditional AMM designs.