delvtech / hyperdrive

An automated market maker for fixed and variable yield with on-demand terms.
Apache License 2.0
28 stars 3 forks source link

Strategies on Hyperdrive #1011

Closed wakamex closed 4 months ago

wakamex commented 5 months ago

Determine how a yearn Vault can address some of our needs with respect to:

wakamex commented 5 months ago

Hyperdrive could benefit from a vault in a variety of ways

Four use cases for Hyperdrive vaults:

  1. wrap PT tokens
  2. make Hyperdrive easier to use (automate logic, rolling positions, LP only when favorable?)
  3. create a new Hyperdrive yield source (could then be used to hedge borrow)
  4. demonstrate the benefit of fixed rate borrows in combination with other positions
wakamex commented 5 months ago

Use case 1: wrap PT tokens

Motivation: Since PT tokens are ERC1155, they are harder to integrate into the DeFi ecosystem. One way to increase composability is by wrapping these tokens into an ERC20 wrapper, which is then easier to integrate. A very simple vault can achieve this, by taking PT deposits and handing out LP tokens.

Inputs: PT tokens (ERC1155)

Outputs: LP tokens (ERC20, used to track each user's share of the vault) Price for the LP token (for integrations)

Problems: PTs have different maturities, and although their prices increase at the same absolute rate, since PTs of different maturities have different prices, their prices increase at difference relative rates of return. If we track only the aggregate position, that means all users receive the same rate of return, no matter which maturity they deposit.

Implementation: To track an aggregate position, we can re-purpose the Hyperdrive logic which tracks aggregate metrics inside a pool. Since we only need to track longs, we only need one weighted_average_term for the vault. Once we know that, we know the curve and flat portions, and therefore the price of the vault.

wakamex commented 5 months ago

narrowing down this issue to focus only on high-level description of strategies (or categories of them). aiming for a team presentation on May 14. after that will narrow down and dig into implementation details of 1 strategy.

wakamex commented 4 months ago

Based on yesterday's discussion, we're going forward to spec out an implementation of a "Funge hyperdrive positions" vault, now being tracked in https://github.com/delvtech/hyperdrive/issues/1027