forked from compound-finance/comet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'compound-finance:main' into main
- Loading branch information
Showing
10 changed files
with
559 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"name": "Compound WETH", | ||
"symbol": "cWETHv3", | ||
"baseToken": "WETH", | ||
"baseTokenAddress": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", | ||
"borrowMin": "0.1e18", | ||
"governor": "0x3fB4d38ea7EC20D91917c09591490Eeda38Cf88A", | ||
"pauseGuardian": "0x78E6317DD6D43DdbDa00Dce32C2CbaFc99361a9d", | ||
"rewardTokenAddress": "0x354A6dA3fcde098F8389cad84b0182725c6C91dE", | ||
"storeFrontPriceFactor": 0.7, | ||
"targetReserves": "5000e18", | ||
"rates": { | ||
"supplyKink": 0.85, | ||
"supplySlopeLow": 0.0185, | ||
"supplySlopeHigh": 1, | ||
"supplyBase": 0, | ||
"borrowKink": 0.85, | ||
"borrowSlopeLow": 0.014, | ||
"borrowSlopeHigh": 1.15, | ||
"borrowBase": 0.01 | ||
}, | ||
"tracking": { | ||
"indexScale": "1e15", | ||
"baseSupplySpeed": "69444444444e0", | ||
"baseBorrowSpeed": "46296296296e0", | ||
"baseMinForRewards": "1000e18" | ||
}, | ||
"assets": { | ||
"weETH": { | ||
"address": "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", | ||
"decimals": "18", | ||
"borrowCF": 0.82, | ||
"liquidateCF": 0.87, | ||
"liquidationFactor": 0.92, | ||
"supplyCap": "550e18" | ||
}, | ||
"rETH": { | ||
"address": "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8", | ||
"decimals": "18", | ||
"borrowCF": 0.90, | ||
"liquidateCF": 0.93, | ||
"liquidationFactor": 0.97, | ||
"supplyCap": "800e18" | ||
}, | ||
"wstETH": { | ||
"address": "0x5979D7b546E38E414F7E9822514be443A4800529", | ||
"decimals": "18", | ||
"borrowCF": 0.88, | ||
"liquidateCF": 0.93, | ||
"liquidationFactor": 0.97, | ||
"supplyCap": "2000e18" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { Deployed, DeploymentManager } from '../../../plugins/deployment_manager'; | ||
import { DeploySpec, deployComet, exp } from '../../../src/deploy'; | ||
|
||
export default async function deploy(deploymentManager: DeploymentManager, deploySpec: DeploySpec): Promise<Deployed> { | ||
const WETH = await deploymentManager.existing('WETH', '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', 'arbitrum'); | ||
const rETH = await deploymentManager.existing('rETH', '0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8', 'arbitrum'); | ||
const wstETH = await deploymentManager.existing('wstETH', '0x5979D7b546E38E414F7E9822514be443A4800529', 'arbitrum'); | ||
const COMP = await deploymentManager.existing('COMP', '0x354A6dA3fcde098F8389cad84b0182725c6C91dE', 'arbitrum'); | ||
|
||
// Deploy WstETHPriceFeed | ||
const wstETHPriceFeed = await deploymentManager.deploy( | ||
'wstETH:priceFeed', | ||
'pricefeeds/ScalingPriceFeed.sol', | ||
[ | ||
'0xb523AE262D20A936BC152e6023996e46FDC2A95D', // wstETH / ETH price feed | ||
8 // decimals | ||
] | ||
); | ||
|
||
// Deploy constant price feed for WETH | ||
const wethConstantPriceFeed = await deploymentManager.deploy( | ||
'WETH:priceFeed', | ||
'pricefeeds/ConstantPriceFeed.sol', | ||
[ | ||
8, // decimals | ||
exp(1, 8) // constantPrice | ||
] | ||
); | ||
|
||
// Deploy scaling price feed for rETH | ||
const rETHScalingPriceFeed = await deploymentManager.deploy( | ||
'rETH:priceFeed', | ||
'pricefeeds/ScalingPriceFeed.sol', | ||
[ | ||
'0xD6aB2298946840262FcC278fF31516D39fF611eF', // rETH / ETH price feed | ||
8 // decimals | ||
] | ||
); | ||
|
||
// Deploy scaling price feed for weETH | ||
const weETHScalingPriceFeed = await deploymentManager.deploy( | ||
'weETH:priceFeed', | ||
'pricefeeds/ScalingPriceFeed.sol', | ||
[ | ||
'0xE141425bc1594b8039De6390db1cDaf4397EA22b', // weETH / ETH price feed | ||
8 // decimals | ||
] | ||
); | ||
|
||
// Import shared contracts from cUSDCv3 | ||
const cometAdmin = await deploymentManager.fromDep('cometAdmin', 'arbitrum', 'usdc.e'); | ||
const cometFactory = await deploymentManager.fromDep('cometFactory', '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'); | ||
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 | ||
}; | ||
} |
Oops, something went wrong.