Skip to content

Commit

Permalink
Deployed EzETH and RETH coordinators and pools (#1095)
Browse files Browse the repository at this point in the history
* Bump the version

* Added configuration files for the renzo and rocket pool yield sources

* Removed fixmes

* Fixed the issues in the deployment scripts

* Deployed the EzETH and RETH deployer coordinators and pools
  • Loading branch information
jalextowle authored Jul 15, 2024
1 parent 76e91c9 commit c6aaf87
Show file tree
Hide file tree
Showing 10 changed files with 359 additions and 14 deletions.
2 changes: 1 addition & 1 deletion contracts/src/libraries/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity 0.8.20;
address constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

/// @dev The version of the contracts.
string constant VERSION = "v1.0.14";
string constant VERSION = "v1.0.15";

/// @dev The number of targets that must be deployed for a full deployment.
uint256 constant NUM_TARGETS = 5;
Expand Down
132 changes: 131 additions & 1 deletion deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,136 @@
"contract": "StETHHyperdrive",
"address": "0xd7e470043241C10970953Bd8374ee6238e77D735",
"timestamp": "2024-06-27T04:25:49.821Z"
},
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHHyperdriveCoreDeployer": {
"contract": "EzETHHyperdriveCoreDeployer",
"address": "0xbaa863b62c69993143b013fe7b8af278fd52f76b",
"timestamp": "2024-07-15T21:27:04.164Z"
},
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHTarget0Deployer": {
"contract": "EzETHTarget0Deployer",
"address": "0x68ba944d89d7481f3a9d73dcb75b7e6c7db5562b",
"timestamp": "2024-07-15T21:27:16.212Z"
},
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHTarget1Deployer": {
"contract": "EzETHTarget1Deployer",
"address": "0xb7c320cef81f0f9abb726590ef5105f551816d76",
"timestamp": "2024-07-15T21:27:31.131Z"
},
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHTarget2Deployer": {
"contract": "EzETHTarget2Deployer",
"address": "0x8d6d5d48f881bcccd6c09256724692b3a971b87b",
"timestamp": "2024-07-15T21:27:40.077Z"
},
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHTarget3Deployer": {
"contract": "EzETHTarget3Deployer",
"address": "0xe670f140dedcdf142e15ce198e1a99fecd67d21c",
"timestamp": "2024-07-15T21:27:52.397Z"
},
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHTarget4Deployer": {
"contract": "EzETHTarget4Deployer",
"address": "0xb8bd93848aa71887e447642299b1f2a5cf898a9b",
"timestamp": "2024-07-15T21:28:03.822Z"
},
"ElementDAO ezETH Hyperdrive Deployer Coordinator": {
"contract": "EzETHHyperdriveDeployerCoordinator",
"address": "0xf74085c4404fd08e7d636f151b734a580f44100f",
"timestamp": "2024-07-15T21:28:15.251Z"
},
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHHyperdriveCoreDeployer": {
"contract": "RETHHyperdriveCoreDeployer",
"address": "0xea21fbc9eb872c025959d82383bc898540334484",
"timestamp": "2024-07-15T21:28:40.644Z"
},
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHTarget0Deployer": {
"contract": "RETHTarget0Deployer",
"address": "0x02d668b32fc23f223464f3daf9df6e518cf1e9ee",
"timestamp": "2024-07-15T21:28:51.918Z"
},
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHTarget1Deployer": {
"contract": "RETHTarget1Deployer",
"address": "0x7d78ee16d314f14e01e222ee6dd839689bd294ca",
"timestamp": "2024-07-15T21:29:02.895Z"
},
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHTarget2Deployer": {
"contract": "RETHTarget2Deployer",
"address": "0xc6fe0b1a0d145c67ec87bffc1536a7b5da727662",
"timestamp": "2024-07-15T21:29:15.773Z"
},
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHTarget3Deployer": {
"contract": "RETHTarget3Deployer",
"address": "0xe8307bcb57ea61981ad8c9da7931116863e5f4ab",
"timestamp": "2024-07-15T21:29:28.956Z"
},
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHTarget4Deployer": {
"contract": "RETHTarget4Deployer",
"address": "0x9a2f15a6941d13719abae15c03dde580098c1fbd",
"timestamp": "2024-07-15T21:29:38.468Z"
},
"ElementDAO rETH Hyperdrive Deployer Coordinator": {
"contract": "RETHHyperdriveDeployerCoordinator",
"address": "0xac0e15075afeb2e130ac2cac24cbafdc236cdd1e",
"timestamp": "2024-07-15T21:29:51.448Z"
},
"ElementDAO 182 Day ezETH Hyperdrive_EzETHTarget0": {
"contract": "EzETHTarget0",
"address": "0x5fB355EFDb7d62C81AB17E77FBee5514946A8AB2",
"timestamp": "2024-07-15T21:35:04.561Z"
},
"ElementDAO 182 Day ezETH Hyperdrive_EzETHTarget1": {
"contract": "EzETHTarget1",
"address": "0x180031Bc954729846227DdD4D5768dAF92A0ca63",
"timestamp": "2024-07-15T21:34:20.055Z"
},
"ElementDAO 182 Day ezETH Hyperdrive_EzETHTarget2": {
"contract": "EzETHTarget2",
"address": "0xB2B0e423e714f07716D73d300eA1710933e1b89f",
"timestamp": "2024-07-15T21:34:28.492Z"
},
"ElementDAO 182 Day ezETH Hyperdrive_EzETHTarget3": {
"contract": "EzETHTarget3",
"address": "0x48FB89CE982e8B2fa7441d0D41A9a02aAE32Bfca",
"timestamp": "2024-07-15T21:34:44.646Z"
},
"ElementDAO 182 Day ezETH Hyperdrive_EzETHTarget4": {
"contract": "EzETHTarget4",
"address": "0x98944608ed92b9a21D8C3bCADFf46760b297112B",
"timestamp": "2024-07-15T21:34:49.430Z"
},
"ElementDAO 182 Day ezETH Hyperdrive": {
"contract": "EzETHHyperdrive",
"address": "0x4b5ad00f6868295840f38e9e146233F14BD81342",
"timestamp": "2024-07-15T21:35:04.409Z"
},
"ElementDAO 182 Day rETH Hyperdrive_RETHTarget0": {
"contract": "RETHTarget0",
"address": "0xA6769BD1C44d158bd89535A4dE1F8c93408AcF5d",
"timestamp": "2024-07-15T21:36:30.817Z"
},
"ElementDAO 182 Day rETH Hyperdrive_RETHTarget1": {
"contract": "RETHTarget1",
"address": "0x3e86cD9Ec3dD09BF7d1c42AC8ACf1833b3C0825b",
"timestamp": "2024-07-15T21:35:43.385Z"
},
"ElementDAO 182 Day rETH Hyperdrive_RETHTarget2": {
"contract": "RETHTarget2",
"address": "0xB005fA01E3Fec5B12f555388A03e6CAFcd8F4Ab7",
"timestamp": "2024-07-15T21:35:51.916Z"
},
"ElementDAO 182 Day rETH Hyperdrive_RETHTarget3": {
"contract": "RETHTarget3",
"address": "0x7aA82daC89C01Bd2f7420703125D3142885af5a5",
"timestamp": "2024-07-15T21:36:07.125Z"
},
"ElementDAO 182 Day rETH Hyperdrive_RETHTarget4": {
"contract": "RETHTarget4",
"address": "0xC86B4a6fA9b2BE0295C03E0c3a89c7DFbDcb6542",
"timestamp": "2024-07-15T21:36:15.646Z"
},
"ElementDAO 182 Day rETH Hyperdrive": {
"contract": "RETHHyperdrive",
"address": "0x0eC94959365f682dD6d9fD382C421D4Ef7F9d998",
"timestamp": "2024-07-15T21:36:30.678Z"
}
}
}
}
14 changes: 7 additions & 7 deletions hardhat.config.mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { HardhatUserConfig } from "hardhat/config";
import baseConfig from "./hardhat.config";
import "./tasks";
import {
MAINNET_DAI_182DAY,
MAINNET_ERC4626_COORDINATOR,
MAINNET_EZETH_182DAY,
MAINNET_EZETH_COORDINATOR,
MAINNET_FACTORY,
MAINNET_STETH_182DAY,
MAINNET_STETH_COORDINATOR,
MAINNET_RETH_182DAY,
MAINNET_RETH_COORDINATOR,
} from "./tasks/deploy/config/mainnet";

const { env } = process;
Expand All @@ -26,10 +26,10 @@ const config: HardhatUserConfig = {
hyperdriveDeploy: {
factories: [MAINNET_FACTORY],
coordinators: [
MAINNET_ERC4626_COORDINATOR,
MAINNET_STETH_COORDINATOR,
MAINNET_EZETH_COORDINATOR,
MAINNET_RETH_COORDINATOR,
],
instances: [MAINNET_DAI_182DAY, MAINNET_STETH_182DAY],
instances: [MAINNET_EZETH_182DAY, MAINNET_RETH_182DAY],
checkpointRewarders: [],
checkpointSubrewarders: [],
},
Expand Down
80 changes: 80 additions & 0 deletions tasks/deploy/config/mainnet/ezeth-182day.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { Address, keccak256, parseEther, toBytes, zeroAddress } from "viem";
import {
ETH_ADDRESS,
HyperdriveInstanceConfig,
MAINNET_EZETH_ADDRESS,
SIX_MONTHS,
getLinkerDetails,
normalizeFee,
parseDuration,
toBytes32,
} from "../../lib";
import { MAINNET_EZETH_COORDINATOR_NAME } from "./ezeth-coordinator";
import { MAINNET_FACTORY_NAME } from "./factory";

// The name of the pool.
export const MAINNET_EZETH_182DAY_NAME = "ElementDAO 182 Day ezETH Hyperdrive";

// The initial contribution of the pool.
const CONTRIBUTION = parseEther("0.01");

export const MAINNET_EZETH_182DAY: HyperdriveInstanceConfig<"EzETH"> = {
name: MAINNET_EZETH_182DAY_NAME,
prefix: "EzETH",
coordinatorAddress: async (hre) =>
hre.hyperdriveDeploy.deployments.byName(MAINNET_EZETH_COORDINATOR_NAME)
.address,
deploymentId: keccak256(toBytes(MAINNET_EZETH_182DAY_NAME)),
salt: toBytes32("0xababe"),
extraData: "0x",
contribution: CONTRIBUTION,
fixedAPR: parseEther("0.09"),
timestretchAPR: parseEther("0.1"),
options: async (hre) => ({
asBase: false,
extraData: "0x",
destination: (await hre.getNamedAccounts())["deployer"] as Address,
}),
prepare: async (hre) => {
// approve the coordinator
let vaultSharesToken = await hre.viem.getContractAt(
"openzeppelin/token/ERC20/IERC20.sol:IERC20",
MAINNET_EZETH_ADDRESS,
);
let pc = await hre.viem.getPublicClient();
let tx = await vaultSharesToken.write.approve([
hre.hyperdriveDeploy.deployments.byName(
MAINNET_EZETH_COORDINATOR_NAME,
).address,
CONTRIBUTION,
]);
await pc.waitForTransactionReceipt({ hash: tx });
},
poolDeployConfig: async (hre) => {
return {
baseToken: ETH_ADDRESS,
vaultSharesToken: MAINNET_EZETH_ADDRESS,
circuitBreakerDelta: parseEther("0.1"),
minimumShareReserves: parseEther("0.001"),
minimumTransactionAmount: parseEther("0.001"),
positionDuration: parseDuration(SIX_MONTHS),
checkpointDuration: parseDuration("1 day"),
timeStretch: 0n,
governance: (await hre.getNamedAccounts())["deployer"] as Address,
feeCollector: zeroAddress,
sweepCollector: zeroAddress,
checkpointRewarder: zeroAddress,
...(await getLinkerDetails(
hre,
hre.hyperdriveDeploy.deployments.byName(MAINNET_FACTORY_NAME)
.address,
)),
fees: {
curve: parseEther("0.01"),
flat: normalizeFee(parseEther("0.0005"), SIX_MONTHS),
governanceLP: parseEther("0.15"),
governanceZombie: parseEther("0.03"),
},
};
},
};
17 changes: 17 additions & 0 deletions tasks/deploy/config/mainnet/ezeth-coordinator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {
HyperdriveCoordinatorConfig,
MAINNET_RENZO_RESTAKE_MANAGER_ADDRESS,
} from "../../lib";
import { MAINNET_FACTORY_NAME } from "./factory";

export const MAINNET_EZETH_COORDINATOR_NAME =
"ElementDAO ezETH Hyperdrive Deployer Coordinator";
export const MAINNET_EZETH_COORDINATOR: HyperdriveCoordinatorConfig<"EzETH"> = {
name: MAINNET_EZETH_COORDINATOR_NAME,
prefix: "EzETH",
targetCount: 5,
extraConstructorArgs: [MAINNET_RENZO_RESTAKE_MANAGER_ADDRESS],
factoryAddress: async (hre) =>
hre.hyperdriveDeploy.deployments.byName(MAINNET_FACTORY_NAME).address,
token: MAINNET_RENZO_RESTAKE_MANAGER_ADDRESS,
};
4 changes: 4 additions & 0 deletions tasks/deploy/config/mainnet/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
export * from "./dai-182day";
export * from "./erc4626-coordinator";
export * from "./ezeth-182day";
export * from "./ezeth-coordinator";
export * from "./factory";
export * from "./reth-182day";
export * from "./reth-coordinator";
export * from "./steth-182day";
export * from "./steth-coordinator";
80 changes: 80 additions & 0 deletions tasks/deploy/config/mainnet/reth-182day.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { Address, keccak256, parseEther, toBytes, zeroAddress } from "viem";
import {
ETH_ADDRESS,
HyperdriveInstanceConfig,
MAINNET_RETH_ADDRESS,
SIX_MONTHS,
getLinkerDetails,
normalizeFee,
parseDuration,
toBytes32,
} from "../../lib";
import { MAINNET_FACTORY_NAME } from "./factory";
import { MAINNET_RETH_COORDINATOR_NAME } from "./reth-coordinator";

// The name of the pool.
export const MAINNET_RETH_182DAY_NAME = "ElementDAO 182 Day rETH Hyperdrive";

// The initial contribution of the pool.
const CONTRIBUTION = parseEther("0.01");

export const MAINNET_RETH_182DAY: HyperdriveInstanceConfig<"RETH"> = {
name: MAINNET_RETH_182DAY_NAME,
prefix: "RETH",
coordinatorAddress: async (hre) =>
hre.hyperdriveDeploy.deployments.byName(MAINNET_RETH_COORDINATOR_NAME)
.address,
deploymentId: keccak256(toBytes(MAINNET_RETH_182DAY_NAME)),
salt: toBytes32("0xababe"),
extraData: "0x",
contribution: CONTRIBUTION,
fixedAPR: parseEther("0.0277"),
timestretchAPR: parseEther("0.035"),
options: async (hre) => ({
asBase: false,
extraData: "0x",
destination: (await hre.getNamedAccounts())["deployer"] as Address,
}),
prepare: async (hre) => {
// approve the coordinator
let vaultSharesToken = await hre.viem.getContractAt(
"IRocketTokenRETH",
MAINNET_RETH_ADDRESS,
);
let pc = await hre.viem.getPublicClient();
let tx = await vaultSharesToken.write.approve([
hre.hyperdriveDeploy.deployments.byName(
MAINNET_RETH_COORDINATOR_NAME,
).address,
CONTRIBUTION,
]);
await pc.waitForTransactionReceipt({ hash: tx });
},
poolDeployConfig: async (hre) => {
return {
baseToken: ETH_ADDRESS,
vaultSharesToken: MAINNET_RETH_ADDRESS,
circuitBreakerDelta: parseEther("0.035"),
minimumShareReserves: parseEther("0.001"),
minimumTransactionAmount: parseEther("0.001"),
positionDuration: parseDuration(SIX_MONTHS),
checkpointDuration: parseDuration("1 day"),
timeStretch: 0n,
governance: (await hre.getNamedAccounts())["deployer"] as Address,
feeCollector: zeroAddress,
sweepCollector: zeroAddress,
checkpointRewarder: zeroAddress,
...(await getLinkerDetails(
hre,
hre.hyperdriveDeploy.deployments.byName(MAINNET_FACTORY_NAME)
.address,
)),
fees: {
curve: parseEther("0.01"),
flat: normalizeFee(parseEther("0.0005"), SIX_MONTHS),
governanceLP: parseEther("0.15"),
governanceZombie: parseEther("0.03"),
},
};
},
};
13 changes: 13 additions & 0 deletions tasks/deploy/config/mainnet/reth-coordinator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { HyperdriveCoordinatorConfig, MAINNET_RETH_ADDRESS } from "../../lib";
import { MAINNET_FACTORY_NAME } from "./factory";

export const MAINNET_RETH_COORDINATOR_NAME =
"ElementDAO rETH Hyperdrive Deployer Coordinator";
export const MAINNET_RETH_COORDINATOR: HyperdriveCoordinatorConfig<"RETH"> = {
name: MAINNET_RETH_COORDINATOR_NAME,
prefix: "RETH",
factoryAddress: async (hre) =>
hre.hyperdriveDeploy.deployments.byName(MAINNET_FACTORY_NAME).address,
targetCount: 5,
token: MAINNET_RETH_ADDRESS,
};
Loading

0 comments on commit c6aaf87

Please sign in to comment.