|
| 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