Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy new D3RateManager #11

Merged
merged 2 commits into from
Jan 29, 2024
Merged
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
2 changes: 1 addition & 1 deletion config/arbitrum-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ARBITRUM_CONFIG = {
daiAddress: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",
dodoAddress: "0x69Eb4FA4a2fbd498C257C57Ea8b7655a2559A581",
D3Oracle: "0xea924da08563A07D646fd03067474D9143B0b4a9",
D3RateManager: "0x7979EaDe558dE8E41CedEffd32E5589fdF228850",
D3RateManager: "0x3E2D410DA287f6f5eAFc59638c40CC944881c532",
D3MMLiquidationRouter: "0xdc4d484A75A47170a54616b472946b8D013a2935",
D3Vault: "0xBAf350b14ed48429A7772F7D05B2CFc6620744D9",
D3UserQuota: "0x3b43d078Dc0B1c57C862990Ec8d7e22A184EabBE",
Expand Down
2 changes: 1 addition & 1 deletion config/avax-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const AVAX_CONFIG = {
},
deployedAddress: {
D3Oracle: "0xB5c7BA1EAde74800cD6cf5F56b1c4562De373780",
D3RateManager: "0x4aAe1d041C01078725dB016BA4D4F72455CaF931",
D3RateManager: "0x62bd398b79Af8531FDfCF0a19e6027aB9048dA8C",
D3MMLiquidationRouter: "0x3dD629473A2eD7f3C6299FFD9F3e0C283d073f11",
D3Vault: "0xEAC4BFef7D1c872Ed705B01856af7f9802adC596",
D3UserQuota: "0xb546Add98c71D97Bb65De60B91021617AcD1262C",
Expand Down
2 changes: 1 addition & 1 deletion config/bsc-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const BSC_CONFIG = {
},
deployedAddress: {
D3Oracle: "0x829Ea84E6bfc67821971C0E1B55981efcE6A7550",
D3RateManager: "0xE43A0452C9f701A465Ece610e1f300D73088F29A",
D3RateManager: "0x6486c9fBBA47b94015f8A21EFB23Ca6c758980f8",
D3MMLiquidationRouter: "0x30352E6d2BD3D29D2151E4750CC96B1bEE4c2114",
D3Vault: "0x3f4eF3763E0b6edB2b3237e29BD7e23Bd168bD46",
D3UserQuota: "0x67119E13FE9D9c5aCE5ab882bE5D5a35402209DC",
Expand Down
2 changes: 1 addition & 1 deletion config/eth-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ETH_CONFIG = {
deployedAddress: {
DODOApprove: "0xCB859eA579b28e02B87A1FDE08d087ab9dbE5149",
D3Oracle: "0x2F66C5aAF006Bd9c51615D617589C16c0ed35fD3",
D3RateManager: "0xCDA4a6cc5997002B87f28D46852F9F0aA0f3c897",
D3RateManager: "0x65ff7C643fa2F84639AdA46557c64f6DEf8b35e3",
D3MMLiquidationRouter: "0x200D866Edf41070DE251Ef92715a6Ea825A5Eb80",
D3Vault: "0x49186E32fEd50fd6B5604A2618c7B0b03Cd41414",
D3UserQuota: "0x5fa9e06111814840398ceF6E9563d400F6ed3a8d",
Expand Down
2 changes: 1 addition & 1 deletion config/op-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const OP_CONFIG = {
},
deployedAddress: {
D3Oracle: "0xf5Ec1a19e1570bDf0A3AaA6585274f27027270b1",
D3RateManager: "0x44023441f2Bad375b6b5C6354B03c3E9AD01E269",
D3RateManager: "0x1506b54A1c0eA1B2F4a84866Ec5776F7F6e7f0B1",
D3FeeRateModel: "0x65934e2f228Fde069A6255F46E6A15Bc9DE38545",
D3MMLiquidationRouter: "0xa1609A1fa7DC16c025feA194c02b2822441b8c10",
D3PoolQuota: "0x5fe43C0EbfE66b83C10A9A37AD1E4aC640AAAA65",
Expand Down
2 changes: 1 addition & 1 deletion config/polygon-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const POLYGON_CONFIG = {
daiAddress: "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",
dodoAddress: "0xe4Bf2864ebeC7B7fDf6Eeca9BaCAe7cDfDAffe78",
D3Oracle: "0xCe670438dADb080d7aae65FDAfF51355aA30535e",
D3RateManager: "0x7dEdA1C0996e9A2Dd80C8Ff9b6C5406BBa1BDb9d",
D3RateManager: "0x3ae87c7963A7199B52dD6C19193e0094E6DbAcBc",
D3MMLiquidationRouter: "0x45b3Be51c0C6d8C621C883F36A63340D365565f5",
D3Vault: "0x224fEce8104771478a3A4CE6D92ab1538d3659ee",
D3UserQuota: "0x34a3d05a582eaDF0B8D81AcD4e20e861755Aa668",
Expand Down
22 changes: 10 additions & 12 deletions deploy/arbitrum/000_deploy_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,34 +152,32 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
if (shouldSet) {
const D3RateManager = await ethers.getContractAt("D3RateManager", rateManagerAddress);

sleep(10)

console.log("setStableCurve for WBTC...")
await D3RateManager.setStableCurve(config.deployedAddress.wbtcAddress, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.deployedAddress.wbtcAddress, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

sleep(10)
await sleep(10)

console.log("setStableCurve for WETH...")
await D3RateManager.setStableCurve(config.deployedAddress.wethAddress, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.deployedAddress.wethAddress, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

sleep(10)
await sleep(10)

console.log("setStableCurve for DAI...")
await D3RateManager.setStableCurve(config.deployedAddress.daiAddress, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.deployedAddress.daiAddress, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for USDT...")
await D3RateManager.setStableCurve(config.defaultAddress.USDT, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.USDT, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for USDC...")
await D3RateManager.setStableCurve(config.defaultAddress.USDC, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.USDC, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for USDCe...")
await D3RateManager.setStableCurve(config.defaultAddress.USDCe, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.USDCe, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

sleep(10)
await sleep(10)

console.log("setStableCurve for DODO...")
await D3RateManager.setStableCurve(config.deployedAddress.dodoAddress, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.deployedAddress.dodoAddress, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));
}
}

Expand Down
14 changes: 7 additions & 7 deletions deploy/avax/000_deploy_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,25 +143,25 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const D3RateManager = await ethers.getContractAt("D3RateManager", rateManagerAddress);

console.log("setStableCurve for WBTC...")
await D3RateManager.setStableCurve(config.defaultAddress.WBTC, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.WBTC, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for BTC...")
await D3RateManager.setStableCurve(config.defaultAddress.BTCb, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.BTCb, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for ETH...")
await D3RateManager.setStableCurve(config.defaultAddress.WETH, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.WETH, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for USDT...")
await D3RateManager.setStableCurve(config.defaultAddress.USDT, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.USDT, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for USDTe...")
await D3RateManager.setStableCurve(config.defaultAddress.USDTe, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.USDTe, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for USDC...")
await D3RateManager.setStableCurve(config.defaultAddress.USDC, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.USDC, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for WAVAX...")
await D3RateManager.setStableCurve(config.defaultAddress.WAVAX, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.WAVAX, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));
}
}

Expand Down
8 changes: 4 additions & 4 deletions deploy/bsc/000_deploy_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const D3RateManager = await ethers.getContractAt("D3RateManager", rateManagerAddress);

console.log("setStableCurve for BTC...")
await D3RateManager.setStableCurve(config.defaultAddress.BTCB, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.BTCB, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for ETH...")
await D3RateManager.setStableCurve(config.defaultAddress.ETH, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.ETH, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for BNB...")
await D3RateManager.setStableCurve(config.defaultAddress.WBNB, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.WBNB, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for USDT...")
await D3RateManager.setStableCurve(config.defaultAddress.USDT, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.USDT, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

}
}
Expand Down
4 changes: 2 additions & 2 deletions deploy/eth/000_deploy_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
sleep(10)

console.log("setStableCurve for WETH...")
await D3RateManager.setStableCurve(config.defaultAddress.WETH, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.WETH, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

sleep(10)

console.log("setStableCurve for WstETH...")
await D3RateManager.setStableCurve(config.defaultAddress.wstETH, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.wstETH, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));
}
}

Expand Down
6 changes: 3 additions & 3 deletions deploy/op/000_deploy_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const D3RateManager = await ethers.getContractAt("D3RateManager", rateManagerAddress);

console.log("setStableCurve for WBTC...")
await D3RateManager.setStableCurve(config.defaultAddress.WBTC, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.WBTC, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for ETH...")
await D3RateManager.setStableCurve(config.defaultAddress.WETH, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.WETH, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for USDT...")
await D3RateManager.setStableCurve(config.defaultAddress.USDT, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.USDT, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));
}
}

Expand Down
16 changes: 5 additions & 11 deletions deploy/polygon/000_deploy_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,26 +130,20 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
if (shouldSet) {
const D3RateManager = await ethers.getContractAt("D3RateManager", rateManagerAddress);

sleep(10)

console.log("setStableCurve for WETH...")
await D3RateManager.setStableCurve(config.defaultAddress.WETH, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));

sleep(10)
await D3RateManager.setStableCurve(config.defaultAddress.WETH, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for USDT...")
await D3RateManager.setStableCurve(config.defaultAddress.USDT, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));

sleep(10)
await D3RateManager.setStableCurve(config.defaultAddress.USDT, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for USDC...")
await D3RateManager.setStableCurve(config.defaultAddress.USDC, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.USDC, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for WBTC...")
await D3RateManager.setStableCurve(config.defaultAddress.WBTC, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.WBTC, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));

console.log("setStableCurve for WMATIC...")
await D3RateManager.setStableCurve(config.defaultAddress.WMATIC, padZeros(20, 16), padZeros(1, 18), padZeros(2, 18), padZeros(80, 16));
await D3RateManager.setStableCurve(config.defaultAddress.WMATIC, padZeros(2, 16), padZeros(10, 16), padZeros(50, 16), padZeros(80, 16));
}
}

Expand Down
Loading