Skip to content
Closed
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
16 changes: 16 additions & 0 deletions script/production/plasma/clusters/M20mHYPER.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"externalVaults": [],
"irms": [
"0x0000000000000000000000000000000000000000",
"0xf41D1f354f04A2887682ba3585Bf6cCca0a24551"
],
"oracleRouters": [
"0xf0922fE8ded8472dB71Fd46e644B4C535EC88340",
"0xf0922fE8ded8472dB71Fd46e644B4C535EC88340"
],
"stubOracle": "0x0000000000000000000000000000000000000000",
"vaults": [
"0xF2A21aCbe1449c1c6AcaC57228CA35979696aDc2",
"0x3486F09cfA75466279A1e3Ea94BFac82481A368d"
]
}
93 changes: 93 additions & 0 deletions script/production/plasma/clusters/M20mHYPER.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.8.0;

import {Ownable} from "openzeppelin-contracts/access/Ownable.sol";
import {ManageCluster} from "./ManageCluster.s.sol";
import {OracleVerifier} from "../../../utils/SanityCheckOracle.s.sol";

contract Cluster is ManageCluster {
function defineCluster() internal override {
// define the path to the cluster addresses file here
cluster.clusterAddressesPath = "/script/production/plasma/clusters/M20mHYPER.json";

// 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.
// 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.
// note however, that mappings may need reworking as they always use asset address as key.
cluster.assets = [
mHYPER,
USDT0
];
}

function configureCluster() internal override {
// define the governors here
cluster.oracleRoutersGovernor = cluster.vaultsGovernor = governorAddresses.accessControlEmergencyGovernor;

// define unit of account here
cluster.unitOfAccount = USD;

// define fee receiver here and interest fee here. if needed to be defined per asset, populate the feeReceiverOverride and interestFeeOverride mappings
cluster.feeReceiver = address(0);
cluster.interestFee = 0.1e4;

// define max liquidation discount here. if needed to be defined per asset, populate the maxLiquidationDiscountOverride mapping
cluster.maxLiquidationDiscount = 0.15e4;

// define liquidation cool off time here. if needed to be defined per asset, populate the liquidationCoolOffTimeOverride mapping
cluster.liquidationCoolOffTime = 1;

// define hook target and hooked ops here. if needed to be defined per asset, populate the hookTargetOverride and hookedOpsOverride mappings
cluster.hookTarget = address(0);
cluster.hookedOps = 0;

// define config flags here. if needed to be defined per asset, populate the configFlagsOverride mapping
cluster.configFlags = 0;

// define oracle providers here.
// adapter names can be found in the relevant adapter contract (as returned by the `name` function).
// for cross adapters, use the following format: "CrossAdapter=<adapterName1>+<adapterName2>".
// although Redstone Classic oracles reuse the ChainlinkOracle contract and returns "ChainlinkOracle" name,
// they should be referred to as "RedstoneClassicOracle".
// in case the asset is an ERC4626 vault itself (i.e. sUSDS) and is recognized as a valid external vault as per
// External Vaults Registry, the string should be preceeded by "ExternalVault|" prefix. this is in order to resolve
// the asset (vault) in the oracle router.
// in case the adapter is not present in the Adapter Registry, the adapter address can be passed instead in form of a string.
cluster.oracleProviders[mHYPER] = "0x9eaE4eB71f7843063cED8637B089886E46E03111";
cluster.oracleProviders[USDT0] = "0xE8947CFd3f04E686741F7Dd9023ec0C78588fd33";

// define supply caps here. 0 means no supply can occur, type(uint256).max means no cap defined hence max amount
cluster.supplyCaps[mHYPER] = type(uint256).max;
cluster.supplyCaps[USDT0] = type(uint256).max;

// define borrow caps here. 0 means no borrow can occur, type(uint256).max means no cap defined hence max amount
cluster.borrowCaps[mHYPER] = type(uint256).max;
cluster.borrowCaps[USDT0] = type(uint256).max;

// define IRM classes here and assign them to the assets
cluster.irms[USDT0] = IRM_ADAPTIVE_USD;

// define the ramp duration to be used, in case the liquidation LTVs have to be ramped down
cluster.rampDuration = 1 days;

// define the spread between borrow and liquidation ltv
cluster.spreadLTV = 0.02e4;

// define ltv values here. columns are liability vaults, rows are collateral vaults
cluster.ltvs = [
// 0 1
// mHYPER USDT0
/* 0 mHYPER */ [LTV_ZERO, LTV__LOW],
/* 1 USDT0 */ [LTV_ZERO, LTV_ZERO]
];

// define external ltvs here. columns are liability vaults, rows are collateral vaults.
// double check the order of collaterals against the order of externalVaults in the addresses file
}

function postOperations() internal view override {
for (uint256 i = 0; i < cluster.vaults.length; ++i) {
OracleVerifier.verifyOracleConfig(lensAddresses.oracleLens, cluster.vaults[i], false);
}
}
}
2 changes: 2 additions & 0 deletions script/production/plasma/clusters/M21thBILL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
93 changes: 93 additions & 0 deletions script/production/plasma/clusters/M21thBILL.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.8.0;

import {Ownable} from "openzeppelin-contracts/access/Ownable.sol";
import {ManageCluster} from "./ManageCluster.s.sol";
import {OracleVerifier} from "../../../utils/SanityCheckOracle.s.sol";

contract Cluster is ManageCluster {
function defineCluster() internal override {
// define the path to the cluster addresses file here
cluster.clusterAddressesPath = "/script/production/plasma/clusters/M21thBILL.json";

// 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.
// 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.
// note however, that mappings may need reworking as they always use asset address as key.
cluster.assets = [
thBILL,
USDT0
];
}

function configureCluster() internal override {
// define the governors here
cluster.oracleRoutersGovernor = cluster.vaultsGovernor = governorAddresses.accessControlEmergencyGovernor;

// define unit of account here
cluster.unitOfAccount = USD;

// define fee receiver here and interest fee here. if needed to be defined per asset, populate the feeReceiverOverride and interestFeeOverride mappings
cluster.feeReceiver = address(0);
cluster.interestFee = 0.1e4;

// define max liquidation discount here. if needed to be defined per asset, populate the maxLiquidationDiscountOverride mapping
cluster.maxLiquidationDiscount = 0.15e4;

// define liquidation cool off time here. if needed to be defined per asset, populate the liquidationCoolOffTimeOverride mapping
cluster.liquidationCoolOffTime = 1;

// define hook target and hooked ops here. if needed to be defined per asset, populate the hookTargetOverride and hookedOpsOverride mappings
cluster.hookTarget = address(0);
cluster.hookedOps = 0;

// define config flags here. if needed to be defined per asset, populate the configFlagsOverride mapping
cluster.configFlags = 0;

// define oracle providers here.
// adapter names can be found in the relevant adapter contract (as returned by the `name` function).
// for cross adapters, use the following format: "CrossAdapter=<adapterName1>+<adapterName2>".
// although Redstone Classic oracles reuse the ChainlinkOracle contract and returns "ChainlinkOracle" name,
// they should be referred to as "RedstoneClassicOracle".
// in case the asset is an ERC4626 vault itself (i.e. sUSDS) and is recognized as a valid external vault as per
// External Vaults Registry, the string should be preceeded by "ExternalVault|" prefix. this is in order to resolve
// the asset (vault) in the oracle router.
// in case the adapter is not present in the Adapter Registry, the adapter address can be passed instead in form of a string.
cluster.oracleProviders[thBILL] = "0x7b123D1850aAb204e7Cd426FC2259141338F771b";
cluster.oracleProviders[USDT0] = "0xE8947CFd3f04E686741F7Dd9023ec0C78588fd33";

// define supply caps here. 0 means no supply can occur, type(uint256).max means no cap defined hence max amount
cluster.supplyCaps[thBILL] = type(uint256).max;
cluster.supplyCaps[USDT0] = type(uint256).max;

// define borrow caps here. 0 means no borrow can occur, type(uint256).max means no cap defined hence max amount
cluster.borrowCaps[thBILL] = type(uint256).max;
cluster.borrowCaps[USDT0] = type(uint256).max;

// define IRM classes here and assign them to the assets
cluster.irms[USDT0] = IRM_ADAPTIVE_USD;

// define the ramp duration to be used, in case the liquidation LTVs have to be ramped down
cluster.rampDuration = 1 days;

// define the spread between borrow and liquidation ltv
cluster.spreadLTV = 0.02e4;

// define ltv values here. columns are liability vaults, rows are collateral vaults
cluster.ltvs = [
// 0 1
// thBILL USDT0
/* 0 thBILL */ [LTV_ZERO, LTV__LOW],
/* 1 USDT0 */ [LTV__LOW, LTV_ZERO]
];

// define external ltvs here. columns are liability vaults, rows are collateral vaults.
// double check the order of collaterals against the order of externalVaults in the addresses file
}

function postOperations() internal view override {
for (uint256 i = 0; i < cluster.vaults.length; ++i) {
OracleVerifier.verifyOracleConfig(lensAddresses.oracleLens, cluster.vaults[i], false);
}
}
}
2 changes: 2 additions & 0 deletions script/production/plasma/clusters/ManageCluster.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ abstract contract Addresses {
address internal constant PT_syrupUSDT_29JAN2026 = 0x8dFb9A39dFab16bFFE77f15544B5bf03e377e419;
address internal constant PT_USDai_19MAR2026 = 0xD516188daf64EFa04a8d60872F891f2cC811A561;
address internal constant PT_sUSDai_19MAR2026 = 0xedac81b27790e0728f54dEa3B7718e5437E85353;
address internal constant mHYPER = 0xb31BeA5c2a43f942a3800558B1aa25978da75F8a;
address internal constant thBILL = 0xfDD22Ce6D1F66bc0Ec89b20BF16CcB6670F55A5a;
}

abstract contract ManageCluster is ManageClusterBase, Addresses {}