-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployed EzETH and RETH coordinators and pools (#1095)
* 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
1 parent
76e91c9
commit c6aaf87
Showing
10 changed files
with
359 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"), | ||
}, | ||
}; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"), | ||
}, | ||
}; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}; |
Oops, something went wrong.