Skip to content

Commit

Permalink
update rate
Browse files Browse the repository at this point in the history
  • Loading branch information
traceurl committed Jan 29, 2024
1 parent de0f0a5 commit c5aac74
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 39 deletions.
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

0 comments on commit c5aac74

Please sign in to comment.