Skip to content

Commit bcf7c7c

Browse files
feat: M17 Elixir
1 parent 486b027 commit bcf7c7c

File tree

5 files changed

+134
-1
lines changed

5 files changed

+134
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"externalVaults": [
3+
"0x9F562699511351bA3d0cf3d0DF1502e776517ef3"
4+
],
5+
"irms": [
6+
"0x0000000000000000000000000000000000000000",
7+
"0xf41D1f354f04A2887682ba3585Bf6cCca0a24551",
8+
"0xf41D1f354f04A2887682ba3585Bf6cCca0a24551"
9+
],
10+
"oracleRouters": [
11+
"0xa63378bB29005aD8f5B0D87003C13184448dEdF2",
12+
"0xa63378bB29005aD8f5B0D87003C13184448dEdF2",
13+
"0xa63378bB29005aD8f5B0D87003C13184448dEdF2"
14+
],
15+
"stubOracle": "0x0000000000000000000000000000000000000000",
16+
"vaults": [
17+
"0x5EFb3B2899a76e013040E85438cbe308870f5F50",
18+
"0xD59f6112375D60e45C2BA9dd5745870c1444362F",
19+
"0x3799251bD81925cfcCF2992F10Af27A4e62Bf3F7"
20+
]
21+
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
pragma solidity ^0.8.0;
4+
5+
import {Ownable} from "openzeppelin-contracts/access/Ownable.sol";
6+
import {ManageCluster} from "./ManageCluster.s.sol";
7+
import {OracleVerifier} from "../../../utils/SanityCheckOracle.s.sol";
8+
9+
contract Cluster is ManageCluster {
10+
function defineCluster() internal override {
11+
// define the path to the cluster addresses file here
12+
cluster.clusterAddressesPath = "/script/production/plasma/clusters/M17Elixir.json";
13+
14+
// do not change the order of the assets in the .assets array. if done, it must be reflected in other the other arrays the ltvs matrix.
15+
// if more than one vauls has to be deployed for the same asset, it can be added in the array as many times as needed.
16+
// note however, that mappings may need reworking as they always use asset address as key.
17+
cluster.assets = [
18+
sdeUSD,
19+
deUSD,
20+
USDT0
21+
];
22+
}
23+
24+
function configureCluster() internal override {
25+
// define the governors here
26+
cluster.oracleRoutersGovernor = cluster.vaultsGovernor = governorAddresses.accessControlEmergencyGovernor;
27+
28+
// define unit of account here
29+
cluster.unitOfAccount = USD;
30+
31+
// define fee receiver here and interest fee here. if needed to be defined per asset, populate the feeReceiverOverride and interestFeeOverride mappings
32+
cluster.feeReceiver = address(0);
33+
cluster.interestFee = 0.1e4;
34+
35+
// define max liquidation discount here. if needed to be defined per asset, populate the maxLiquidationDiscountOverride mapping
36+
cluster.maxLiquidationDiscount = 0.15e4;
37+
38+
// define liquidation cool off time here. if needed to be defined per asset, populate the liquidationCoolOffTimeOverride mapping
39+
cluster.liquidationCoolOffTime = 1;
40+
41+
// define hook target and hooked ops here. if needed to be defined per asset, populate the hookTargetOverride and hookedOpsOverride mappings
42+
cluster.hookTarget = address(0);
43+
cluster.hookedOps = 0;
44+
45+
// define config flags here. if needed to be defined per asset, populate the configFlagsOverride mapping
46+
cluster.configFlags = 0;
47+
48+
// define oracle providers here.
49+
// adapter names can be found in the relevant adapter contract (as returned by the `name` function).
50+
// for cross adapters, use the following format: "CrossAdapter=<adapterName1>+<adapterName2>".
51+
// although Redstone Classic oracles reuse the ChainlinkOracle contract and returns "ChainlinkOracle" name,
52+
// they should be referred to as "RedstoneClassicOracle".
53+
// in case the asset is an ERC4626 vault itself (i.e. sUSDS) and is recognized as a valid external vault as per
54+
// External Vaults Registry, the string should be preceeded by "ExternalVault|" prefix. this is in order to resolve
55+
// the asset (vault) in the oracle router.
56+
// in case the adapter is not present in the Adapter Registry, the adapter address can be passed instead in form of a string.
57+
cluster.oracleProviders[sdeUSD] = "ExternalVault|";
58+
cluster.oracleProviders[deUSD] = "0xd170477ECe944fc3911E4e18c6b5371853bf0B58";
59+
cluster.oracleProviders[USDT0] = "0xE8947CFd3f04E686741F7Dd9023ec0C78588fd33";
60+
61+
// define supply caps here. 0 means no supply can occur, type(uint256).max means no cap defined hence max amount
62+
cluster.supplyCaps[sdeUSD] = type(uint256).max;
63+
cluster.supplyCaps[deUSD ] = type(uint256).max;
64+
cluster.supplyCaps[USDT0] = type(uint256).max;
65+
66+
// define borrow caps here. 0 means no borrow can occur, type(uint256).max means no cap defined hence max amount
67+
cluster.borrowCaps[sdeUSD] = type(uint256).max;
68+
cluster.borrowCaps[deUSD ] = type(uint256).max;
69+
cluster.borrowCaps[USDT0] = type(uint256).max;
70+
71+
// define IRM classes here and assign them to the assets
72+
cluster.irms[deUSD ] = IRM_ADAPTIVE_USD;
73+
cluster.irms[USDT0] = IRM_ADAPTIVE_USD;
74+
75+
// define the ramp duration to be used, in case the liquidation LTVs have to be ramped down
76+
cluster.rampDuration = 1 days;
77+
78+
// define the spread between borrow and liquidation ltv
79+
cluster.spreadLTV = 0.02e4;
80+
81+
// define ltv values here. columns are liability vaults, rows are collateral vaults
82+
cluster.ltvs = [
83+
// 0 1 2
84+
// sdeUSD deUSD USDT0
85+
/* 0 sdeUSD */ [LTV_ZERO, LTV_HIGH, LTV__LOW],
86+
/* 1 deUSD */ [LTV_ZERO, LTV_ZERO, LTV__LOW],
87+
/* 2 USDT0 */ [LTV_ZERO, LTV__LOW, LTV_ZERO]
88+
];
89+
90+
// define external ltvs here. columns are liability vaults, rows are collateral vaults.
91+
// double check the order of collaterals against the order of externalVaults in the addresses file
92+
cluster.externalLTVs = [
93+
// 0 1 2
94+
// sdeUSD deUSD USDT0
95+
/* 0 Escrow USDT */ [LTV_ZERO, LTV_ZERO, LTV_SELF]
96+
];
97+
}
98+
99+
function postOperations() internal view override {
100+
for (uint256 i = 0; i < cluster.vaults.length; ++i) {
101+
OracleVerifier.verifyOracleConfig(lensAddresses.oracleLens, cluster.vaults[i], false);
102+
}
103+
}
104+
}

script/production/plasma/clusters/ManageCluster.s.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ abstract contract Addresses {
3939
address internal constant RLP = 0x35533f54740F1F1aA4179E57bA37039dfa16868B;
4040
address internal constant rUSD = 0x09D4214C03D01F49544C0448DBE3A27f768F2b34;
4141
address internal constant wsrUSD = 0x4809010926aec940b550D34a46A52739f996D75D;
42+
address internal constant deUSD = 0x4ac60586C3e245fF5593cf99241395bf42509274;
43+
address internal constant sdeUSD = 0x7884A8457f0E63e82C89A87fE48E8Ba8223DB069;
44+
address internal constant plUSD = 0xf91c31299E998C5127Bc5F11e4a657FC0cF358CD;
45+
address internal constant splUSD = 0x616185600989Bf8339b58aC9e539d49536598343;
4246
address internal constant sxyUSD = address(0);
4347
address internal constant xyUSD = address(0);
4448
address internal constant NUSD = address(0);

script/production/plasma/governedPerspectiveVaults/GovernedPerspectiveVaults.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ Vault,Governor,Whitelist
3333
0xCe7120C69A77E90615A9D65C581FDAc1fd311cDC,M16 PT-sUSDai,Yes
3434
0x4bFcf2aCC5Cb79EE2A00D08EDfB81eFD37cC2Fe5,M16 PT-sUSDai,Yes
3535
0x66Ab62571Ccd31D911EeEfea85944895e30c0A3a,M16 PT-sUSDai,Yes
36+
0x5EFb3B2899a76e013040E85438cbe308870f5F50,M17 Exilir,Yes
37+
0xD59f6112375D60e45C2BA9dd5745870c1444362F,M17 Exilir,Yes
38+
0x3799251bD81925cfcCF2992F10Af27A4e62Bf3F7,M17 Exilir,Yes
3639
0x57c582346B7d49A46Af3745A8278917D1c1311b8,Telos Stream,Yes
3740
0x138c289Bb8b855CF271305C8bcf91DC31Ba30194,Telos Stream,Yes
3841
0xF510385f5D74256bC677fbBA4e0e3079bE245Bd2,Edge Core,Yes

script/production/plasma/oracleAdapters/Adapters.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ PT-USDe-15JAN2026,USDe,PendleUniversal,Yes,Yes,PendleUniversalOracle,0x9a9Fa8338
2626
PT-sUSDe-15JAN2026,USDe,PendleUniversal,Yes,Yes,PendleUniversalOracle,0x9a9Fa8338dd5E5B2188006f1Cd2Ef26d921650C2,0xe06c3b972ba630ccf3392cecdbe070690b4e6b55,0x02fcc4989b4c9d435b7ced3fe1ba4cf77bbb5dd8,0x0000000000000000000000000000000000000348,900
2727
PT-syrupUSDT-29JAN2026,USDT,PendleUniversal,Yes,Yes,PendleUniversalOracle,0x9a9Fa8338dd5E5B2188006f1Cd2Ef26d921650C2,0x18d89b23d2875590c502cd3eac8f448f3ccf9999,0x8dfb9a39dfab16bffe77f15544b5bf03e377e419,0x0000000000000000000000000000000000000348,900
2828
PT-USDai-19MAR2026,USDai,PendleUniversal,Yes,Yes,PendleUniversalOracle,0x9a9Fa8338dd5E5B2188006f1Cd2Ef26d921650C2,0x15735f2f53c5cd25a57dff83b11c93eceaf72073,0xd516188daf64efa04a8d60872f891f2cc811a561,0x0000000000000000000000000000000000000348,900
29-
PT-sUSDai-19MAR2026,USDai,PendleUniversal,Yes,Yes,PendleUniversalOracle,0x9a9Fa8338dd5E5B2188006f1Cd2Ef26d921650C2,0x0d7d9abee602c7f0a242ea7e200e47c372acba84,0xedac81b27790e0728f54dea3b7718e5437e85353,0x0000000000000000000000000000000000000348,900
29+
PT-sUSDai-19MAR2026,USDai,PendleUniversal,Yes,Yes,PendleUniversalOracle,0x9a9Fa8338dd5E5B2188006f1Cd2Ef26d921650C2,0x0d7d9abee602c7f0a242ea7e200e47c372acba84,0xedac81b27790e0728f54dea3b7718e5437e85353,0x0000000000000000000000000000000000000348,900
30+
deUSD,USD,Fixed Rate,Yes,Yes,FixedRateOracle,0x4ac60586C3e245fF5593cf99241395bf42509274,0x0000000000000000000000000000000000000348,1000000000000000000

0 commit comments

Comments
 (0)