Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriy-woof-software committed Jul 8, 2024
2 parents b531987 + 370203f commit 4e45704
Show file tree
Hide file tree
Showing 24 changed files with 1,612 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
bases: [ development, mainnet, mainnet-weth, mainnet-usdt, goerli, goerli-weth, sepolia-usdc, sepolia-weth, fuji, mumbai, polygon, arbitrum-usdc.e, arbitrum-usdc, arbitrum-weth, arbitrum-goerli-usdc, arbitrum-goerli-usdc.e, base-usdbc, base-weth, base-usdc, base-goerli, base-goerli-weth, linea-goerli, optimism-usdc, optimism-usdt, scroll-goerli, scroll-usdc]
bases: [ development, mainnet, mainnet-weth, mainnet-usdt, goerli, goerli-weth, sepolia-usdc, sepolia-weth, fuji, mumbai, polygon, polygon-usdt, arbitrum-usdc.e, arbitrum-usdc, arbitrum-weth, arbitrum-usdt, arbitrum-goerli-usdc, arbitrum-goerli-usdc.e, base-usdbc, base-weth, base-usdc, base-goerli, base-goerli-weth, linea-goerli, optimism-usdc, optimism-usdt, scroll-goerli, scroll-usdc]
name: Run scenarios
env:
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
Expand Down
73 changes: 73 additions & 0 deletions deployments/arbitrum/usdt/configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"name": "Compound USDT",
"symbol": "cUSDTv3",
"baseToken": "USDT",
"baseTokenAddress": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
"baseTokenPriceFeed": "0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7",
"borrowMin": "1e6",
"pauseGuardian": "0x78E6317DD6D43DdbDa00Dce32C2CbaFc99361a9d",
"storeFrontPriceFactor": 0.6,
"targetReserves": "20000000e6",
"rates": {
"supplyKink": 0.9,
"supplySlopeLow": 0.059,
"supplySlopeHigh": 2.9,
"supplyBase": 0,
"borrowKink": 0.9,
"borrowSlopeLow": 0.061,
"borrowSlopeHigh": 3.2,
"borrowBase": 0.015
},
"tracking": {
"indexScale": "1e15",
"baseSupplySpeed": "138888888888e0",
"baseBorrowSpeed": "115740740740e0",
"baseMinForRewards": "10000e6"
},
"assets": {
"ARB": {
"address": "0x912ce59144191c1204e64559fe8253a0e49e6548",
"priceFeed": "0xb2A824043730FE05F3DA2efaFa1CBbe83fa548D6",
"decimals": "18",
"borrowCF": 0.7,
"liquidateCF": 0.8,
"liquidationFactor": 0.9,
"supplyCap": "7_500_000e18"
},
"WETH": {
"address": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
"priceFeed": "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612",
"decimals": "18",
"borrowCF": 0.78,
"liquidateCF": 0.85,
"liquidationFactor": 0.95,
"supplyCap": "7_500e18"
},
"wstETH": {
"address": "0x5979D7b546E38E414F7E9822514be443A4800529",
"decimals": "18",
"borrowCF": 0.7,
"liquidateCF": 0.8,
"liquidationFactor": 0.9,
"supplyCap": "1_500e18"
},
"WBTC": {
"address": "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",
"priceFeed": "0xd0C7101eACbB49F3deCcCc166d238410D6D46d57",
"decimals": "8",
"borrowCF": 0.7,
"liquidateCF": 0.8,
"liquidationFactor": 0.9,
"supplyCap": "250e8"
},
"GMX": {
"address": "0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a",
"priceFeed": "0xDB98056FecFff59D032aB628337A4887110df3dB",
"decimals": "18",
"borrowCF": 0.6,
"liquidateCF": 0.7,
"liquidationFactor": 0.8,
"supplyCap": "100_000e18"
}
}
}
51 changes: 51 additions & 0 deletions deployments/arbitrum/usdt/deploy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { Deployed, DeploymentManager } from '../../../plugins/deployment_manager';
import { DeploySpec, deployComet } from '../../../src/deploy';

export default async function deploy(deploymentManager: DeploymentManager, deploySpec: DeploySpec): Promise<Deployed> {
const trace = deploymentManager.tracer()
const ethers = deploymentManager.hre.ethers;

// pull in existing assets
// USDC native
const WETH = await deploymentManager.existing('WETH', '0x82af49447d8a07e3bd95bd0d56f35241523fbab1', 'arbitrum');
const WBTC = await deploymentManager.existing('WBTC', '0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f', 'arbitrum');
//wstETH
const wstETH = await deploymentManager.existing('wstETH', '0x5979D7b546E38E414F7E9822514be443A4800529', 'arbitrum');
const USDT = await deploymentManager.existing('USDT', '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9', 'arbitrum');
const ARB = await deploymentManager.existing('ARB', '0x912ce59144191c1204e64559fe8253a0e49e6548', 'arbitrum');
const GMX = await deploymentManager.existing('GMX', '0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a', 'arbitrum');
const COMP = await deploymentManager.existing('COMP', '0x354A6dA3fcde098F8389cad84b0182725c6C91dE', 'arbitrum');

// Deploy scaling price feed for cbETH
const wstETHMultiplicativePriceFeed = await deploymentManager.deploy(
'wstETH:priceFeed',
'pricefeeds/MultiplicativePriceFeed.sol',
[
'0xb523AE262D20A936BC152e6023996e46FDC2A95D', // wstETH / ETH price feed
'0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612', // ETH / USD price feed
8, // decimals
'wstETH/USD price feed' // description
]
);

// Import shared contracts from the USDC.e market
const cometAdmin = await deploymentManager.fromDep('cometAdmin', 'arbitrum', 'usdc.e');
const $configuratorImpl = await deploymentManager.fromDep('configurator:implementation', 'arbitrum', 'usdc.e');
const configurator = await deploymentManager.fromDep('configurator', 'arbitrum', 'usdc.e');
const rewards = await deploymentManager.fromDep('rewards', 'arbitrum', 'usdc.e');
// should use this bulker, not MainnetBulker
const bulker = await deploymentManager.fromDep('bulker', 'arbitrum', 'usdc.e');
const localTimelock = await deploymentManager.fromDep('timelock', 'arbitrum', 'usdc.e');
const bridgeReceiver = await deploymentManager.fromDep('bridgeReceiver', 'arbitrum', 'usdc.e');

// Deploy Comet
const deployed = await deployComet(deploymentManager, deploySpec);

return {
...deployed,
bridgeReceiver,
bulker,
rewards,
COMP
};
}
Loading

0 comments on commit 4e45704

Please sign in to comment.