Skip to content

Commit 7086d3d

Browse files
authored
Redeploy stage pools (#121)
* Update config * Update config * Update routes * Redeploy staging pools * Update LiquidityHub upgrade script * Upgrade LiquidityHub
1 parent c1be303 commit 7086d3d

13 files changed

+135
-52
lines changed

deployments/deployments.staging.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ eip155:8453:
22
deployment id: MVP
33
env: stage
44
name: BASE
5-
LiquidityPoolAaveUSDC: "0x2D24c6c58bBCe4BC09aE6ac559F697D97665d05D"
6-
LiquidityPoolUSDC: "0xfe22Dff2Dc00E80e3127BCac393aC4e0672570F0"
5+
LiquidityPoolAaveUSDC: "0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683"
6+
LiquidityPoolUSDC: "0x578aD20ec27E11B3772F91cc6f435d782cc362EA"
77
SprinterUSDCLPShare: "0xCb85b9fEFcA1316EFe0B7E1965A8922701fF502f"
88
LiquidityHub: "0x6FD4142Be84134C5a6D45d454529A6C3c9573B61"
99
SprinterLiquidityMining: "0xa85Aa9ac9EaC15BA8636cE4C8014135bC34B0525"
@@ -17,8 +17,8 @@ eip155:10:
1717
deployment id: MVP
1818
env: stage
1919
name: OP_MAINNET
20-
LiquidityPoolAaveUSDC: "0x2D24c6c58bBCe4BC09aE6ac559F697D97665d05D"
21-
LiquidityPoolUSDC: "0xfe22Dff2Dc00E80e3127BCac393aC4e0672570F0"
20+
LiquidityPoolAaveUSDC: "0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683"
21+
LiquidityPoolUSDC: "0x578aD20ec27E11B3772F91cc6f435d782cc362EA"
2222
CensoredTransferFromMulticall: "0xd0A630c391daEb244369DB0f75CBDF7dFeEaEaC3"
2323
USDC: "0x0b2c639c533813f4aa9d7837caf62653d097ff85"
2424
Rebalancer: "0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9"
@@ -29,9 +29,9 @@ eip155:42161:
2929
deployment id: MVP
3030
env: stage
3131
name: ARBITRUM_ONE
32-
LiquidityPoolAaveUSDC: "0x2D24c6c58bBCe4BC09aE6ac559F697D97665d05D"
33-
LiquidityPoolUSDC: "0xfe22Dff2Dc00E80e3127BCac393aC4e0672570F0"
34-
LiquidityPoolAaveUSDCLongTerm: "0xd1A7cC673D4cE966AD31FcD8Daccf1C2B5969dA4"
32+
LiquidityPoolAaveUSDC: "0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683"
33+
LiquidityPoolUSDC: "0x578aD20ec27E11B3772F91cc6f435d782cc362EA"
34+
LiquidityPoolAaveUSDCLongTerm: "0x4ce56b5D7e79dF121aF2eC055D096eF983F459e6"
3535
CensoredTransferFromMulticall: "0xd0A630c391daEb244369DB0f75CBDF7dFeEaEaC3"
3636
USDC: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
3737
Rebalancer: "0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Deployment ID: MVP
2+
Deploying USDC Pool
3+
Using config for: stage, ARBITRUM_ONE
4+
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
5+
Deploying USDC Liquidity Pool
6+
LiquidityPoolUSDC-V3-e09cc75: 0x578aD20ec27E11B3772F91cc6f435d782cc362EA
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Deployment ID: MVP
2+
Deploying USDC Pool
3+
Using config for: stage, BASE
4+
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
5+
Deploying USDC Liquidity Pool
6+
LiquidityPoolUSDC-V3-e09cc75: 0x578aD20ec27E11B3772F91cc6f435d782cc362EA
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Deployment ID: MVP
2+
Deploying USDC Pool
3+
Using config for: stage, OP_MAINNET
4+
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
5+
Deploying USDC Liquidity Pool
6+
LiquidityPoolUSDC-V3-e09cc75: 0x578aD20ec27E11B3772F91cc6f435d782cc362EA
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Deployment ID: MVP
2+
Deploying Aave USDC Pool
3+
Using config for: stage, ARBITRUM_ONE
4+
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
5+
Deploying Aave USDC Liquidity Pool
6+
LiquidityPoolAaveUSDC-V3-e09cc75: 0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Deployment ID: MVP
2+
Deploying Aave USDC Pool
3+
Using config for: stage, BASE
4+
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
5+
Deploying Aave USDC Liquidity Pool
6+
LiquidityPoolAaveUSDC-V3-e09cc75: 0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Deployment ID: MVP
2+
Deploying Aave USDC Pool
3+
Using config for: stage, OP_MAINNET
4+
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
5+
Deploying Aave USDC Liquidity Pool
6+
LiquidityPoolAaveUSDC-V3-e09cc75: 0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Deployment ID: MVP
2+
Deploying Aave USDC Long Term Pool
3+
Using config for: stage, ARBITRUM_ONE
4+
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
5+
Deploying Aave USDC Long Term Liquidity Pool
6+
LiquidityPoolAaveUSDCLongTerm-V2-e09cc75: 0x4ce56b5D7e79dF121aF2eC055D096eF983F459e6
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Deployment ID: MVP
2+
Upgrade ID: MVP2
3+
Upgrading Liquidity Hub
4+
Using config for: stage, BASE
5+
Liquidity Pool: 0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683
6+
New LiquidityHub implementation deployed to 0xB7b59D39041aD311d4d46B90A85e3b4F5faD3E9D
7+
Simulating LiquidityHub upgrade.
8+
Success.
9+
To finalize upgrade send the following transaction from ProxyAdmin owner: 0x2D5B6C193C39D2AECb4a99052074E6F325258a0f
10+
To: 0x806BA52Fad6BED2EE431e4a3CC436B3F3Da54aED
11+
Value: 0
12+
Data: 0x9623609d0000000000000000000000006fd4142be84134c5a6d45d454529a6c3c9573b61000000000000000000000000b7b59d39041ad311d4d46b90a85e3b4f5fad3e9d00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000

network.config.ts

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,36 @@ import * as AAVEPools from "@bgd-labs/aave-address-book";
44
// Subsequent implementation just use UPGRADE_ID env variable.
55
// Immutable contracts are deployed first with the name-derived unique id.
66
// Subsequent versions use version suffix plus a git commit from the main branch.
7-
export const LiquidityPoolAaveUSDC: string = "LiquidityPoolAaveUSDC";
8-
export const LiquidityPoolUSDC: string = "LiquidityPoolUSDC";
9-
export const LiquidityPoolUSDCStablecoin: string = "LiquidityPoolUSDCStablecoin";
10-
export const LiquidityPoolAaveUSDCLongTerm: string = "LiquidityPoolAaveUSDCLongTerm";
11-
export const LiquidityPoolAaveUSDCLongTermV2: string = "LiquidityPoolAaveUSDCLongTerm-V2-8ec44b8";
12-
export const LiquidityPoolAaveUSDCV2: string = "LiquidityPoolAaveUSDC-V2-3601cc4";
13-
export const LiquidityPoolUSDCV2: string = "LiquidityPoolUSDC-V2-3601cc4";
14-
export const LiquidityPoolUSDCStablecoinV2: string = "LiquidityPoolUSDCStablecoin-V2-3601cc4";
15-
export const LiquidityPoolAaveUSDCV3: string = "LiquidityPoolAaveUSDC-V3-8ec44b8";
16-
export const LiquidityPoolUSDCV3: string = "LiquidityPoolUSDC-V3-8ec44b8";
17-
export const LiquidityPoolUSDCStablecoinV3: string = "LiquidityPoolUSDCStablecoin-V3-8ec44b8";
18-
export const LiquidityPoolAaveUSDCLongTermVersions: string[] = [
7+
export const LiquidityPoolAaveUSDC = "LiquidityPoolAaveUSDC";
8+
export const LiquidityPoolUSDC = "LiquidityPoolUSDC";
9+
export const LiquidityPoolUSDCStablecoin = "LiquidityPoolUSDCStablecoin";
10+
export const LiquidityPoolAaveUSDCLongTerm = "LiquidityPoolAaveUSDCLongTerm";
11+
export const LiquidityPoolAaveUSDCLongTermV2 = "LiquidityPoolAaveUSDCLongTerm-V2-e09cc75";
12+
export const LiquidityPoolAaveUSDCV2 = "LiquidityPoolAaveUSDC-V2-3601cc4";
13+
export const LiquidityPoolUSDCV2 = "LiquidityPoolUSDC-V2-3601cc4";
14+
export const LiquidityPoolUSDCStablecoinV2 = "LiquidityPoolUSDCStablecoin-V2-3601cc4";
15+
export const LiquidityPoolAaveUSDCV3 = "LiquidityPoolAaveUSDC-V3-e09cc75";
16+
export const LiquidityPoolUSDCV3 = "LiquidityPoolUSDC-V3-e09cc75";
17+
export const LiquidityPoolUSDCStablecoinV3 = "LiquidityPoolUSDCStablecoin-V3-e09cc75";
18+
export const LiquidityPoolAaveUSDCLongTermVersions = [
1919
LiquidityPoolAaveUSDCLongTerm,
2020
LiquidityPoolAaveUSDCLongTermV2,
21-
];
22-
export const LiquidityPoolAaveUSDCVersions: string[] = [
21+
] as const;
22+
export const LiquidityPoolAaveUSDCVersions = [
2323
LiquidityPoolAaveUSDC,
2424
LiquidityPoolAaveUSDCV2,
2525
LiquidityPoolAaveUSDCV3,
26-
];
27-
export const LiquidityPoolUSDCVersions: string[] = [
26+
] as const;
27+
export const LiquidityPoolUSDCVersions = [
2828
LiquidityPoolUSDC,
2929
LiquidityPoolUSDCV2,
3030
LiquidityPoolUSDCV3,
31-
];
32-
export const LiquidityPoolUSDCStablecoinVersions: string[] = [
31+
] as const;
32+
export const LiquidityPoolUSDCStablecoinVersions = [
3333
LiquidityPoolUSDCStablecoin,
3434
LiquidityPoolUSDCStablecoinV2,
3535
LiquidityPoolUSDCStablecoinV3,
36-
];
36+
] as const;
3737

3838
export enum Network {
3939
ETHEREUM = "ETHEREUM",
@@ -112,6 +112,10 @@ interface HubConfig {
112112
AssetsLimitSetter: string; // Address that can set assets limit.
113113
AssetsLimit: number; // Deposits to Liquidity Hub are only allowed till this limit is reached.
114114
Tiers: Tier[];
115+
Pool?: (typeof LiquidityPoolUSDCVersions)[number]
116+
| (typeof LiquidityPoolAaveUSDCVersions)[number]
117+
| (typeof LiquidityPoolUSDCStablecoinVersions)[number]
118+
| (typeof LiquidityPoolAaveUSDCLongTermVersions)[number];
115119
};
116120

117121
export interface NetworkConfig {
@@ -384,34 +388,34 @@ export const networkConfig: NetworksConfig = {
384388
MpcAddress: "0x6adAF8c96151962198a9b73132c16E99F4682Eb5",
385389
SignerAddress: "0x2D5B6C193C39D2AECb4a99052074E6F325258a0f",
386390
RebalancerRoutes: {
387-
[LiquidityPoolAaveUSDC]: {
391+
[LiquidityPoolAaveUSDCV3]: {
388392
[Network.BASE]: [Provider.CCTP],
389393
[Network.ARBITRUM_ONE]: [Provider.CCTP],
390394
},
391-
[LiquidityPoolUSDC]: {
395+
[LiquidityPoolUSDCV3]: {
392396
[Network.BASE]: [Provider.CCTP],
393397
[Network.ARBITRUM_ONE]: [Provider.CCTP],
394398
},
395-
[LiquidityPoolAaveUSDCLongTerm]: {
399+
[LiquidityPoolAaveUSDCLongTermV2]: {
396400
[Network.ARBITRUM_ONE]: [Provider.CCTP],
397401
},
398402
},
399403
RepayerRoutes: {
400-
[LiquidityPoolAaveUSDC]: {
404+
[LiquidityPoolAaveUSDCV3]: {
401405
SupportsAllTokens: true,
402406
Domains: {
403407
[Network.ARBITRUM_ONE]: [Provider.CCTP, Provider.ACROSS, Provider.EVERCLEAR],
404408
[Network.BASE]: [Provider.CCTP, Provider.ACROSS, Provider.EVERCLEAR],
405409
},
406410
},
407-
[LiquidityPoolUSDC]: {
411+
[LiquidityPoolUSDCV3]: {
408412
SupportsAllTokens: false,
409413
Domains: {
410414
[Network.ARBITRUM_ONE]: [Provider.CCTP],
411415
[Network.BASE]: [Provider.CCTP],
412416
},
413417
},
414-
[LiquidityPoolAaveUSDCLongTerm]: {
418+
[LiquidityPoolAaveUSDCLongTermV2]: {
415419
SupportsAllTokens: true,
416420
Domains: {
417421
[Network.ARBITRUM_ONE]: [Provider.CCTP, Provider.ACROSS, Provider.EVERCLEAR],
@@ -421,7 +425,7 @@ export const networkConfig: NetworksConfig = {
421425
AavePool: {
422426
AaveAddressesProvider: AAVEPools.AaveV3Optimism.POOL_ADDRESSES_PROVIDER,
423427
MinHealthFactor: 300,
424-
DefaultLTV: 0,
428+
DefaultLTV: 50,
425429
TokenLTVs: {
426430
"0x1f32b1c2345538c0c6f582fcb022739c4a194ebb": 50, // wstETH
427431
"0x4200000000000000000000000000000000000006": 50, // WETH
@@ -549,24 +553,24 @@ export const networkConfig: NetworksConfig = {
549553
MpcAddress: "0x6adAF8c96151962198a9b73132c16E99F4682Eb5",
550554
SignerAddress: "0x2D5B6C193C39D2AECb4a99052074E6F325258a0f",
551555
RebalancerRoutes: {
552-
[LiquidityPoolAaveUSDC]: {
556+
[LiquidityPoolAaveUSDCV3]: {
553557
[Network.BASE]: [Provider.CCTP],
554558
[Network.OP_MAINNET]: [Provider.CCTP],
555559
},
556-
[LiquidityPoolUSDC]: {
560+
[LiquidityPoolUSDCV3]: {
557561
[Network.BASE]: [Provider.CCTP],
558562
[Network.OP_MAINNET]: [Provider.CCTP],
559563
},
560564
},
561565
RepayerRoutes: {
562-
[LiquidityPoolAaveUSDC]: {
566+
[LiquidityPoolAaveUSDCV3]: {
563567
SupportsAllTokens: true,
564568
Domains: {
565569
[Network.OP_MAINNET]: [Provider.CCTP, Provider.ACROSS, Provider.EVERCLEAR],
566570
[Network.BASE]: [Provider.CCTP, Provider.ACROSS, Provider.EVERCLEAR],
567571
},
568572
},
569-
[LiquidityPoolUSDC]: {
573+
[LiquidityPoolUSDCV3]: {
570574
SupportsAllTokens: false,
571575
Domains: {
572576
[Network.OP_MAINNET]: [Provider.CCTP],
@@ -577,7 +581,7 @@ export const networkConfig: NetworksConfig = {
577581
AavePool: {
578582
AaveAddressesProvider: AAVEPools.AaveV3Arbitrum.POOL_ADDRESSES_PROVIDER,
579583
MinHealthFactor: 300,
580-
DefaultLTV: 0,
584+
DefaultLTV: 50,
581585
TokenLTVs: {
582586
"0xaf88d065e77c8cc2239327c5edb3a432268e5831": 100, // USDC
583587
"0x82af49447d8a07e3bd95bd0d56f35241523fbab1": 50, // WETH
@@ -731,37 +735,38 @@ export const networkConfig: NetworksConfig = {
731735
{period: 7776000n, multiplier: 400000000n},
732736
{period: 15552000n, multiplier: 1000000000n},
733737
{period: 31104000n, multiplier: 2200000000n},
734-
]
738+
],
739+
Pool: LiquidityPoolAaveUSDCV3,
735740
},
736741
RebalancerRoutes: {
737-
[LiquidityPoolAaveUSDC]: {
742+
[LiquidityPoolAaveUSDCV3]: {
738743
[Network.OP_MAINNET]: [Provider.CCTP],
739744
[Network.ARBITRUM_ONE]: [Provider.CCTP],
740745
},
741-
[LiquidityPoolUSDC]: {
746+
[LiquidityPoolUSDCV3]: {
742747
[Network.OP_MAINNET]: [Provider.CCTP],
743748
[Network.ARBITRUM_ONE]: [Provider.CCTP],
744749
},
745-
[LiquidityPoolAaveUSDCLongTerm]: {
750+
[LiquidityPoolAaveUSDCLongTermV2]: {
746751
[Network.ARBITRUM_ONE]: [Provider.CCTP],
747752
},
748753
},
749754
RepayerRoutes: {
750-
[LiquidityPoolAaveUSDC]: {
755+
[LiquidityPoolAaveUSDCV3]: {
751756
SupportsAllTokens: true,
752757
Domains: {
753758
[Network.OP_MAINNET]: [Provider.CCTP, Provider.ACROSS, Provider.EVERCLEAR],
754759
[Network.ARBITRUM_ONE]: [Provider.CCTP, Provider.ACROSS, Provider.EVERCLEAR],
755760
},
756761
},
757-
[LiquidityPoolUSDC]: {
762+
[LiquidityPoolUSDCV3]: {
758763
SupportsAllTokens: false,
759764
Domains: {
760765
[Network.OP_MAINNET]: [Provider.CCTP],
761766
[Network.ARBITRUM_ONE]: [Provider.CCTP],
762767
},
763768
},
764-
[LiquidityPoolAaveUSDCLongTerm]: {
769+
[LiquidityPoolAaveUSDCLongTermV2]: {
765770
SupportsAllTokens: true,
766771
Domains: {
767772
[Network.ARBITRUM_ONE]: [Provider.CCTP, Provider.ACROSS, Provider.EVERCLEAR],
@@ -771,7 +776,7 @@ export const networkConfig: NetworksConfig = {
771776
AavePool: {
772777
AaveAddressesProvider: AAVEPools.AaveV3Base.POOL_ADDRESSES_PROVIDER,
773778
MinHealthFactor: 300,
774-
DefaultLTV: 0,
779+
DefaultLTV: 50,
775780
TokenLTVs: {
776781
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913": 100, // USDC
777782
"0x4200000000000000000000000000000000000006": 50, // WETH

0 commit comments

Comments
 (0)