Skip to content

Commit 8c4e1ce

Browse files
feat: frontier USDai
1 parent ec2bd7e commit 8c4e1ce

File tree

4 files changed

+125
-1
lines changed

4 files changed

+125
-1
lines changed

script/production/arbitrum/governedPerspectiveVaults/GovernedPerspectiveVaults.csv

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ Vault,Governor,Whitelist
1010
0xa7a9B773f139010f284E825a74060648d91dE37a,Euler Arbitrum,Yes
1111
0xE96e07C16661744836a742Ef2090F11e84a86f4F,Euler Arbitrum,Yes
1212
0xDBD974Eb5360d053ea0c56B4DaCF4A9D3E894Ee2,Euler Arbitrum,Yes
13-
0xaA525D3142A5BDD3E55E8e983D3789b88F2FEB8f,Euler Arbitrum,Yes
13+
0xaA525D3142A5BDD3E55E8e983D3789b88F2FEB8f,Euler Arbitrum,Yes
14+
0x6aFB8d3F6D4A34e9cB2f217317f4dc8e05Aa673b,Frontier USDai,Yes
15+
0x482C3E2530FAc8FE2c63AE007AD2695C6d685E98,Frontier USDai,Yes
16+
0x7D9790403FA53eF3E3a3389c259D244BDc61B785,Frontier USDai,Yes
17+
0xAABb9cbAC15a3D646dCdc6574bCFCfB989E1fDd8,Frontier USDai,Yes
18+
0x683B777A393BA94F3c903fba2b14A6b6fF80dbE7,Frontier USDai,Yes

script/production/frontier/ManageCluster.s.sol

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ abstract contract Addresses {
2525
WETH = 0x4200000000000000000000000000000000000006;
2626
USDC = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913;
2727
USDT = 0x102d758f688a4C1C5a80b116bD945d4455460282;
28+
} else if (block.chainid == 42161) {
29+
WETH = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1;
30+
USDC = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831;
31+
USDT = 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9;
2832
}
2933

3034
if (block.chainid == 1) {
@@ -37,6 +41,11 @@ abstract contract Addresses {
3741
IRM_ADAPTIVE_USD_YB = 0x72C9D7c1e9e954c9Dc85E49dB76fF614a335d2a5;
3842
IRM_ADAPTIVE_ETH = 0xb70de5cEcA993c08BceE4296E3fEbcc9D7C0AdCD;
3943
IRM_ADAPTIVE_BTC = 0x26472E20e09a01AA50a0F2C4d96E99ac58268a8D;
44+
} else if (block.chainid == 42161) {
45+
IRM_ADAPTIVE_USD = 0x2D76638aA2fA9Ce16417485d46Ed8EEDC1Db1AA4;
46+
IRM_ADAPTIVE_USD_YB = 0x0a473bbcBa1c89ffbD7AfACdD6CBE019Ab5F2dD4;
47+
IRM_ADAPTIVE_ETH = 0xF583692cCa56b084cb1f9D4C3e3939C43f73409D;
48+
IRM_ADAPTIVE_BTC = 0xE1f126e815D4BF8CCE2F94552196EcA9a7c1B96c;
4049
}
4150
}
4251

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"externalVaults": [
3+
"0x0a1eCC5Fe8C9be3C809844fcBe615B46A869b899",
4+
"0x37512F45B4ba8808910632323b73783Ca938CD51",
5+
"0x31D2db91CF6Fb085F1566b95aEaA441FeDcb2638",
6+
"0x784B2bbB1AdeBF2a6C300e52DaFe7dDb9888d416"
7+
],
8+
"irms": [
9+
"0x2D76638aA2fA9Ce16417485d46Ed8EEDC1Db1AA4",
10+
"0x2D76638aA2fA9Ce16417485d46Ed8EEDC1Db1AA4",
11+
"0x2D76638aA2fA9Ce16417485d46Ed8EEDC1Db1AA4",
12+
"0x0000000000000000000000000000000000000000",
13+
"0x2D76638aA2fA9Ce16417485d46Ed8EEDC1Db1AA4"
14+
],
15+
"oracleRouters": [
16+
"0xE4e35ab751E9e06a67eC08E321b3353C3a328157",
17+
"0xE4e35ab751E9e06a67eC08E321b3353C3a328157",
18+
"0xE4e35ab751E9e06a67eC08E321b3353C3a328157",
19+
"0xE4e35ab751E9e06a67eC08E321b3353C3a328157",
20+
"0xE4e35ab751E9e06a67eC08E321b3353C3a328157"
21+
],
22+
"stubOracle": "0x0000000000000000000000000000000000000000",
23+
"vaults": [
24+
"0x6aFB8d3F6D4A34e9cB2f217317f4dc8e05Aa673b",
25+
"0x482C3E2530FAc8FE2c63AE007AD2695C6d685E98",
26+
"0x7D9790403FA53eF3E3a3389c259D244BDc61B785",
27+
"0xAABb9cbAC15a3D646dCdc6574bCFCfB989E1fDd8",
28+
"0x683B777A393BA94F3c903fba2b14A6b6fF80dbE7"
29+
]
30+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
pragma solidity ^0.8.0;
4+
5+
import {ManageCluster} from "./ManageCluster.s.sol";
6+
7+
contract Cluster is ManageCluster {
8+
address internal constant USDai = 0x0A1a1A107E45b7Ced86833863f482BC5f4ed82EF;
9+
address internal constant sUSDai = 0x0B2b2B2076d95dda7817e785989fE353fe955ef9;
10+
address internal constant USDe = 0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34;
11+
12+
function defineCluster() internal override {
13+
// define the path to the cluster addresses file here
14+
cluster.clusterAddressesPath = "/script/production/frontier/USDai.json";
15+
16+
// do not change the order of the assets in the .assets array. if done, it must be reflected in other the other
17+
// arrays the ltvs matrix.
18+
// if more than one vauls has to be deployed for the same asset, it can be added in the array as many times as
19+
// needed.
20+
// note however, that mappings may need reworking as they always use asset address as key.
21+
cluster.assets = [USDC, USDT, USDai, sUSDai, USDe];
22+
}
23+
24+
function configureCluster() internal override {
25+
super.configureCluster();
26+
27+
cluster.oracleRoutersGovernor = cluster.vaultsGovernor = getDeployer();
28+
29+
// define unit of account here
30+
cluster.unitOfAccount = USD;
31+
32+
// define oracle providers here.
33+
// adapter names can be found in the relevant adapter contract (as returned by the `name` function).
34+
// for cross adapters, use the following format: "CrossAdapter=<adapterName1>+<adapterName2>".
35+
// although Redstone Classic oracles reuse the ChainlinkOracle contract and returns "ChainlinkOracle" name,
36+
// they should be referred to as "RedstoneClassicOracle".
37+
// in case the asset is an ERC4626 vault itself (i.e. sUSDS) and is recognized as a valid external vault as per
38+
// External Vaults Registry, the string should be preceeded by "ExternalVault|" prefix. this is in order to
39+
// resolve the asset (vault) in the oracle router.
40+
// in case the adapter is not present in the Adapter Registry, the adapter address can be passed instead in form
41+
// of a string.
42+
cluster.oracleProviders[USDC ] = "0xEeB17ddb1B604c22d878e2b2a90B2Bf4E7d36641";
43+
cluster.oracleProviders[USDT ] = "0x3b24485168B448ED1da471265c3Bc4fBAaC4a2ab";
44+
cluster.oracleProviders[USDai ] = "0xae80AadE8Ff7cc7fE8493338898073fB1A4FB057";
45+
cluster.oracleProviders[sUSDai] = "ExternalVault|0xae80AadE8Ff7cc7fE8493338898073fB1A4FB057";
46+
cluster.oracleProviders[USDe ] = "0xD76802F99c339D3085C59027dDD9D4AE4957a651";
47+
48+
// define IRM classes here and assign them to the assets or refer to the adaptive IRM address directly
49+
{
50+
// Base=0% APY Kink(90%)=2.7% APY Max=40.00% APY
51+
//cluster.kinkIRMParams[WETH] = [uint256(0), uint256(218407859), uint256(22859618857), uint256(3865470566)];
52+
53+
cluster.irms[USDC ] = IRM_ADAPTIVE_USD;
54+
cluster.irms[USDT ] = IRM_ADAPTIVE_USD;
55+
cluster.irms[USDai ] = IRM_ADAPTIVE_USD;
56+
cluster.irms[USDe ] = IRM_ADAPTIVE_USD;
57+
}
58+
59+
// define ltv values here. columns are liability vaults, rows are collateral vaults
60+
cluster.ltvs = [
61+
// 0 1 2 3 4
62+
// USDC USDT USDai sUSDai USDe
63+
/* 0 USDC */ [LTV_ZERO, LTV_HIGH, LTV__LOW, LTV_ZERO, LTV__LOW],
64+
/* 1 USDT */ [LTV_HIGH, LTV_ZERO, LTV__LOW, LTV_ZERO, LTV__LOW],
65+
/* 2 USDai */ [LTV__LOW, LTV__LOW, LTV_ZERO, LTV_ZERO, LTV__LOW],
66+
/* 3 sUSDai */ [LTV__LOW, LTV__LOW, LTV_HIGH, LTV_ZERO, LTV__LOW],
67+
/* 4 USDe */ [LTV__LOW, LTV__LOW, LTV__LOW, LTV_ZERO, LTV_ZERO]
68+
];
69+
70+
// define external ltvs here. columns are liability vaults, rows are collateral vaults.
71+
cluster.externalLTVs = [
72+
// 0 1 2 3 4
73+
// USDC USDT USDai sUSDai USDe
74+
/* 0 Euler USDC */ [LTV_HIGH, LTV_HIGH, LTV_ZERO, LTV_ZERO, LTV_ZERO],
75+
/* 1 Euler USDT */ [LTV_HIGH, LTV_HIGH, LTV_ZERO, LTV_ZERO, LTV_ZERO],
76+
/* 2 Escrow USDAi */ [LTV_ZERO, LTV_ZERO, LTV_HIGH, LTV_ZERO, LTV_ZERO],
77+
/* 3 Escrow USDe */ [LTV_ZERO, LTV_ZERO, LTV_ZERO, LTV_ZERO, LTV_HIGH]
78+
];
79+
}
80+
}

0 commit comments

Comments
 (0)