Guide: Adding support for a Yield Source

Adding Support for a Yield Source

If you intend to deploy a Hyperdrive market for a yield source that is not yet supported by Hyperdrive, you may build the integration by following the process below:

  1. Implement the corresponding DeployerCoordinator. You can base your new code off of one of the existing yield sources in the contracts/src/deployers directory. Make sure to implement all the following contracts for your yield source:

    1. [YieldSource]HyperdriveCoreDeployer.sol

    2. [YieldSource]HyperdriveCoreDeployerCoordinator.sol

    3. [YieldSource]Target0Deployer.sol through [YieldSource]Target4Deployer.sol

  2. Implement the Hyperdrive instance for your target yield source. You can base your code off of one of the existing instances in the contracts/src/instances directory. Make sure to implement all the following contracts for your yield source:

    1. [YieldSource]Base.sol

    2. [YieldSource]Hyperdrive.sol

    3. [YieldSource]Target0.sol through [YieldSource]Target4.sol

  3. Depending on the yield source, you may need to implement additional interface contracts for Hyperdrive to properly work with it. You can find some examples in the contracts/src/interfaces directory.

  4. Once these implementations are done, you can find some examples on how to deploy your new Hyperdrive instance in the contracts/test directory.

Last updated