Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aerodrome LP Deployment - AERO-USDC Base #1204

Merged
merged 3 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -1672,6 +1672,76 @@
"contract": "ERC4626Hyperdrive",
"address": "0xD9b66D9a819B36ECEfC26B043eF3B422d5A6123a",
"timestamp": "2024-10-22T00:18:26.463Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpHyperdriveCoreDeployer": {
"contract": "AerodromeLpHyperdriveCoreDeployer",
"address": "0x248ba8bfc1e4a4dc092de7e50c3c299775e85f3a",
"timestamp": "2024-10-30T18:11:09.249Z"
},
"AerodromeLpConversions": {
"contract": "AerodromeLpConversions",
"address": "0x4f3e88e6dc6d6a68fcfdc5d6e4ba4681c8704140",
"timestamp": "2024-10-30T18:11:14.246Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpTarget0Deployer": {
"contract": "AerodromeLpTarget0Deployer",
"address": "0x746887d49347292e2089449552bb2d25475b344a",
"timestamp": "2024-10-30T18:11:18.889Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpTarget1Deployer": {
"contract": "AerodromeLpTarget1Deployer",
"address": "0xd4bc07dee13b6b300643e20c1a4b8736feacd9ec",
"timestamp": "2024-10-30T18:11:23.374Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpTarget2Deployer": {
"contract": "AerodromeLpTarget2Deployer",
"address": "0x22e80a035558e4a18a04fa52c92e20d86c8411b5",
"timestamp": "2024-10-30T18:11:26.525Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpTarget3Deployer": {
"contract": "AerodromeLpTarget3Deployer",
"address": "0x805677e1536591c84c534df00b4909af7b002dac",
"timestamp": "2024-10-30T18:11:31.265Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpTarget4Deployer": {
"contract": "AerodromeLpTarget4Deployer",
"address": "0x39c701f3659b6029672ee18433b3c32d184933b9",
"timestamp": "2024-10-30T18:11:34.313Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator": {
"contract": "AerodromeLpHyperdriveDeployerCoordinator",
"address": "0xc49731384c0c4dbbfff8dae727eb001caffcb107",
"timestamp": "2024-10-30T18:11:39.034Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive_AerodromeLpTarget0": {
"contract": "AerodromeLpTarget0",
"address": "0xf49D1f422a7661541033C566f358E944a2bFb976",
"timestamp": "2024-10-30T18:12:24.774Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive_AerodromeLpTarget1": {
"contract": "AerodromeLpTarget1",
"address": "0x77EB47d666F3D8A89085335B12C5ef29956516E5",
"timestamp": "2024-10-30T18:12:07.450Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive_AerodromeLpTarget2": {
"contract": "AerodromeLpTarget2",
"address": "0x02715A4223B02681c2d5936B75c516cEa51Db2a0",
"timestamp": "2024-10-30T18:12:12.432Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive_AerodromeLpTarget3": {
"contract": "AerodromeLpTarget3",
"address": "0x5341D9A9935beAbF06F3904fe3601984EFDDc420",
"timestamp": "2024-10-30T18:12:17.045Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive_AerodromeLpTarget4": {
"contract": "AerodromeLpTarget4",
"address": "0x9927F9c74e5AD5579c4C5ad2Ca4eaEFBADF6F5dC",
"timestamp": "2024-10-30T18:12:21.688Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive": {
"contract": "AerodromeLpHyperdrive",
"address": "0x9bAdB6A21FbA04EE94fde3E85F7d170E90394c89",
"timestamp": "2024-10-30T18:12:24.607Z"
}
}
}
20 changes: 15 additions & 5 deletions tasks/deploy/config/base/aerodrome-lp-aero-usdc-91day.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { Address, keccak256, parseEther, toBytes, zeroAddress } from "viem";
import {
Address,
encodeAbiParameters,
keccak256,
parseAbiParameters,
parseEther,
toBytes,
zeroAddress,
} from "viem";
import {
HyperdriveInstanceConfig,
getLinkerDetails,
Expand All @@ -19,7 +27,7 @@ import { BASE_FACTORY_NAME } from "./factory";
export const BASE_AERODROME_LP_AERO_USDC_91DAY_NAME =
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive";

const CONTRIBUTION = parseEther("100"); // 1e20
const CONTRIBUTION = BigInt(500000000000); // 500 GWEI

export const BASE_AERODROME_LP_AERO_USDC_91DAY: HyperdriveInstanceConfig<"AerodromeLp"> =
{
Expand All @@ -33,12 +41,14 @@ export const BASE_AERODROME_LP_AERO_USDC_91DAY: HyperdriveInstanceConfig<"Aerodr
toBytes(BASE_AERODROME_LP_AERO_USDC_91DAY_NAME),
),
salt: toBytes32("0x69420"),
extraData: AERO_USDC_GAUGE_ADDRESS_BASE,
extraData: encodeAbiParameters(parseAbiParameters("address"), [
AERO_USDC_GAUGE_ADDRESS_BASE,
]),
contribution: CONTRIBUTION,
// The emissions APR can be found here:
// https://aerodrome.finance/deposit?token0=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&token1=0x940181a94A35A4569E4529A3CDfB74e38FD98631&type=-1
fixedAPR: parseEther("0.5468"),
timestretchAPR: parseEther("0.075"),
fixedAPR: parseEther("0.1"),
timestretchAPR: parseEther("0.2"),
options: async (hre: HardhatRuntimeEnvironment) => ({
extraData: "0x",
asBase: true,
Expand Down
2 changes: 1 addition & 1 deletion tasks/deploy/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const SEPOLIA_USDE_ADDRESS =
export const AERO_USDC_LP_ADDRESS_BASE =
"0x6cDcb1C4A4D1C3C6d054b27AC5B77e89eAFb971d" as Address;

export const AERO_USDC_GAUGE =
export const AERO_USDC_GAUGE_ADDRESS_BASE =
"0x4F09bAb2f0E15e2A078A227FE1537665F55b8360" as Address;

export const CBETH_ADDRESS_BASE =
Expand Down
15 changes: 14 additions & 1 deletion tasks/deploy/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,15 @@ task(
aggregator,
BigInt(decimals),
];
} else if (kind == "AerodromeLpHyperdrive") {
const [gauge] = decodeAbiParameters(
parseAbiParameters("address"),
instanceConfig.extraData,
);
targetArgs = [poolConfig, factoryAddress, gauge];
} else if (extras) {
targetArgs = [poolConfig, factoryAddress, ...extras];
} else {
console.log("got here");
targetArgs = [poolConfig, factoryAddress];
}

Expand Down Expand Up @@ -313,6 +318,12 @@ task(
instanceConfig.extraData,
);
args.push(...[aggregator, BigInt(decimals)]);
} else if (kind == "AerodromeLpHyperdrive") {
const [gauge] = decodeAbiParameters(
parseAbiParameters("address"),
instanceConfig.extraData,
);
args.push(...[gauge]);
} else if (extras) {
args.push(...extras);
}
Expand All @@ -327,6 +338,8 @@ task(
pathName = "rseth-linea";
} else if (kind == "StkWellHyperdrive") {
pathName = "stk-well";
} else if (kind == "AerodromeLpHyperdrive") {
pathName = "aerodrome-lp";
} else {
pathName = instanceConfig.prefix.toLowerCase();
}
Expand Down
Loading