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:
Clone/fork the Hyperdrive GitHub repository.
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:
[YieldSource]HyperdriveCoreDeployer.sol
[YieldSource]HyperdriveCoreDeployerCoordinator.sol
[YieldSource]Target0Deployer.sol through [YieldSource]Target4Deployer.sol
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:
[YieldSource]Base.sol
[YieldSource]Hyperdrive.sol
[YieldSource]Target0.sol through [YieldSource]Target4.sol
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.
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