From 6fcd2a33c356d551885ee22cc886cdc7638b3a6e Mon Sep 17 00:00:00 2001 From: Mikhailo Shabodyash <67977488+EviLord032@users.noreply.github.com> Date: Wed, 29 May 2024 19:43:15 +0300 Subject: [PATCH 01/14] feat: add new market with working scenarious --- .github/workflows/run-scenarios.yaml | 2 +- deployments/arbitrum/weth/configuration.json | 54 ++++ deployments/arbitrum/weth/deploy.ts | 71 ++++ .../1716912328_configure_and_ens.ts | 305 ++++++++++++++++++ deployments/arbitrum/weth/relations.ts | 53 +++ deployments/arbitrum/weth/roots.json | 1 + hardhat.config.ts | 12 +- scenario/LiquidationBotScenario.ts | 30 +- scenario/LiquidationScenario.ts | 25 +- scenario/RewardsScenario.ts | 23 +- scenario/TransferScenario.ts | 31 +- scenario/utils/relayArbitrumMessage.ts | 20 ++ .../liquidateUnderwaterBorrowers.ts | 26 +- src/deploy/index.ts | 14 +- 14 files changed, 625 insertions(+), 42 deletions(-) create mode 100644 deployments/arbitrum/weth/configuration.json create mode 100644 deployments/arbitrum/weth/deploy.ts create mode 100644 deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts create mode 100644 deployments/arbitrum/weth/relations.ts create mode 100644 deployments/arbitrum/weth/roots.json diff --git a/.github/workflows/run-scenarios.yaml b/.github/workflows/run-scenarios.yaml index 7c551a883..1501a724b 100644 --- a/.github/workflows/run-scenarios.yaml +++ b/.github/workflows/run-scenarios.yaml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - bases: [ development, mainnet, mainnet-weth, goerli, goerli-weth, sepolia-usdc, sepolia-weth, fuji, mumbai, polygon, arbitrum-usdc.e, arbitrum-usdc, arbitrum-goerli-usdc, arbitrum-goerli-usdc.e, base-usdbc, base-weth, base-usdc, base-goerli, base-goerli-weth, linea-goerli, optimism-usdc, scroll-goerli, scroll-usdc] + bases: [ development, mainnet, mainnet-weth, 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, scroll-goerli, scroll-usdc] name: Run scenarios env: ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }} diff --git a/deployments/arbitrum/weth/configuration.json b/deployments/arbitrum/weth/configuration.json new file mode 100644 index 000000000..f3b7b41f3 --- /dev/null +++ b/deployments/arbitrum/weth/configuration.json @@ -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": "6e15", + "baseBorrowSpeed": "4e15", + "baseMinForRewards": "1000e18" + }, + "assets": { + "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" + }, + "weETH": { + "address": "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", + "decimals": "18", + "borrowCF": 0.82, + "liquidateCF": 0.87, + "liquidationFactor": 0.92, + "supplyCap": "550e18" + } + } +} diff --git a/deployments/arbitrum/weth/deploy.ts b/deployments/arbitrum/weth/deploy.ts new file mode 100644 index 000000000..56d457c27 --- /dev/null +++ b/deployments/arbitrum/weth/deploy.ts @@ -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 { + 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', + [ + '0xF3272CAfe65b190e76caAF483db13424a3e23dD2', // 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 + }; +} \ No newline at end of file diff --git a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts new file mode 100644 index 000000000..5badc2144 --- /dev/null +++ b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts @@ -0,0 +1,305 @@ +import { Contract, ethers } from 'ethers'; +import { DeploymentManager } from '../../../../plugins/deployment_manager/DeploymentManager'; +import { migration } from '../../../../plugins/deployment_manager/Migration'; +import { calldata, exp, getConfigurationStruct, proposal } from '../../../../src/deploy'; +import { expect } from 'chai'; +import { applyL1ToL2Alias, estimateL2Transaction, estimateTokenBridge } from '../../../../scenario/utils/arbitrumUtils'; + +const ENSName = 'compound-community-licenses.eth'; +const ENSResolverAddress = '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'; +const ENSRegistryAddress = '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'; +const ENSSubdomainLabel = 'v3-additional-grants'; +const ENSSubdomain = `${ENSSubdomainLabel}.${ENSName}`; +const ENSTextRecordKey = 'v3-official-markets'; + +const WETHAmountToBridge = ethers.BigNumber.from(exp(500, 18)); +const arbitrumCOMPAddress = '0x354A6dA3fcde098F8389cad84b0182725c6C91dE'; + +export default migration('1713517203_configurate_and_ens', { + prepare: async (_deploymentManager: DeploymentManager) => { + return {}; + }, + + enact: async (deploymentManager: DeploymentManager, govDeploymentManager: DeploymentManager) => { + const trace = deploymentManager.tracer(); + const ethers = deploymentManager.hre.ethers; + const { utils } = ethers; + + const cometFactory = await deploymentManager.fromDep('cometFactory', 'arbitrum', 'usdc.e'); + const { + bridgeReceiver, + timelock: l2Timelock, + comet, + cometAdmin, + configurator, + rewards + } = await deploymentManager.getContracts(); + const { + arbitrumInbox, + arbitrumL1GatewayRouter, + timelock, + governor, + WETH, + COMP + } = await govDeploymentManager.getContracts(); + const refundAddress = l2Timelock.address; + const wethGatewayAddress = await arbitrumL1GatewayRouter.getGateway(WETH.address); + + const wethGasParams = await estimateTokenBridge( + { + token: COMP.address, + from: timelock.address, + to: comet.address, + amount: WETHAmountToBridge.toBigInt() + }, + govDeploymentManager, + deploymentManager + ); + + const configuration = await getConfigurationStruct(deploymentManager); + const setFactoryCalldata = await calldata( + configurator.populateTransaction.setFactory(comet.address, cometFactory.address) + ); + const setConfigurationCalldata = await calldata( + configurator.populateTransaction.setConfiguration(comet.address, configuration) + ); + const deployAndUpgradeToCalldata = utils.defaultAbiCoder.encode( + ['address', 'address'], + [configurator.address, comet.address] + ); + + const setRewardConfigCalldata = utils.defaultAbiCoder.encode( + ['address', 'address'], + [comet.address, arbitrumCOMPAddress] + ); + + const l2ProposalData = utils.defaultAbiCoder.encode( + ['address[]', 'uint256[]', 'string[]', 'bytes[]'], + [ + [configurator.address, configurator.address, cometAdmin.address, rewards.address], + [0, 0, 0, 0], + [ + 'setFactory(address,address)', + 'setConfiguration(address,(address,address,address,address,address,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint104,uint104,uint104,(address,address,uint8,uint64,uint64,uint64,uint128)[]))', + 'deployAndUpgradeTo(address,address)', + 'setRewardConfig(address,address)' + ], + [ + setFactoryCalldata, + setConfigurationCalldata, + deployAndUpgradeToCalldata, + setRewardConfigCalldata + ] + ] + ); + + const ENSResolver = await govDeploymentManager.existing('ENSResolver', ENSResolverAddress); + const subdomainHash = ethers.utils.namehash(ENSSubdomain); + const polygonChainId = (await deploymentManager.hre.ethers.provider.getNetwork()).chainId.toString(); + const newMarketObject = { baseSymbol: 'WETH', cometAddress: comet.address }; + const officialMarketsJSON = JSON.parse(await ENSResolver.text(subdomainHash, ENSTextRecordKey)); + + if (officialMarketsJSON[polygonChainId]) { + officialMarketsJSON[polygonChainId].push(newMarketObject); + } else { + officialMarketsJSON[polygonChainId] = [newMarketObject]; + } + + const createRetryableTicketGasParams = await estimateL2Transaction( + { + from: applyL1ToL2Alias(timelock.address), + to: bridgeReceiver.address, + data: l2ProposalData + }, + deploymentManager + ); + + const outboundTransferCalldata = utils.defaultAbiCoder.encode( + ['address', 'address', 'uint256', 'uint256', 'uint256', 'bytes'], + [ + WETH.address, + comet.address, + WETHAmountToBridge.toBigInt(), + wethGasParams.gasLimit, + wethGasParams.maxFeePerGas, + utils.defaultAbiCoder.encode( + ['uint256', 'bytes'], + [wethGasParams.maxSubmissionCost, '0x'] + ) + ] + ); + + const mainnetActions = [ + // 1. Set Comet configuration and deployAndUpgradeTo new Comet on Arbitrum. + { + contract: arbitrumInbox, + signature: 'createRetryableTicket(address,uint256,uint256,address,address,uint256,uint256,bytes)', + args: [ + bridgeReceiver.address, // address to, + 0, // uint256 l2CallValue, + createRetryableTicketGasParams.maxSubmissionCost, // uint256 maxSubmissionCost, + refundAddress, // address excessFeeRefundAddress, + refundAddress, // address callValueRefundAddress, + createRetryableTicketGasParams.gasLimit, // uint256 gasLimit, + createRetryableTicketGasParams.maxFeePerGas, // uint256 maxFeePerGas, + l2ProposalData, // bytes calldata data + ], + value: createRetryableTicketGasParams.deposit + }, + // 2. Wrap some ETH as WETH + { + contract: WETH, + signature: 'deposit()', + args: [], + value: WETHAmountToBridge, + }, + // 2. Approve the WETH gateway to take Timelock's WETH for bridging + { + contract: WETH, + signature: 'approve(address,uint256)', + args: [wethGatewayAddress, WETHAmountToBridge] + }, + // 3. Bridge WETH from mainnet to Arbitrum Comet + { + target: arbitrumL1GatewayRouter.address, + signature: 'outboundTransfer(address,address,uint256,uint256,uint256,bytes)', + calldata: outboundTransferCalldata, + value: wethGasParams.deposit + }, + // 4. Update the list of official markets + { + target: ENSResolverAddress, + signature: 'setText(bytes32,string,string)', + calldata: ethers.utils.defaultAbiCoder.encode( + ['bytes32', 'string', 'string'], + [subdomainHash, ENSTextRecordKey, JSON.stringify(officialMarketsJSON)] + ) + } + ]; + + const description = "# Initialize cUSDCv3 on Polygon\n\nThis proposal takes the governance steps recommended and necessary to initialize a Compound III USDC market on Polygon; upon execution, cUSDCv3 will be ready for use. Simulations have confirmed the market\u2019s readiness, as much as possible, using the [Comet scenario suite](https://github.com/compound-finance/comet/tree/main/scenario). Although real tests have also been run over the Goerli/Mumbai bridge, this will be the first proposal to actually bridge from Ethereum mainnet to another chain, and therefore includes risks not present in previous proposals.\n\nAlthough the proposal sets the entire configuration in the Configurator, the initial deployment already has most of these same parameters already set. The new parameters include setting the pause guardian to a Gnosis [multisig](https://app.safe.global/matic:0x8Ab717CAC3CbC4934E63825B88442F5810aAF6e5/home), which has been created on Polygon to match the same set of signers as currently on Ethereum mainnet. They also include risk parameters based off of the [recommendations from Gauntlet](https://www.comp.xyz/t/initialize-compound-iii-usdc-on-polygon-pos/3611/12). Finally, the parameters include a modest reallocation of some of the v2 USDT COMP rewards to borrowers in the new market.\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull/672) and [forum discussion](https://www.comp.xyz/t/initialize-compound-iii-usdc-on-polygon-pos/3611/11).\n\n\n## Proposal Actions\n\nThe first proposal action sets the Comet configuration and deploys a new Comet implementation on Polygon. This sends the encoded `setConfiguration` and `deployAndUpgradeTo` calls across the bridge to the governance receiver on Polygon.\n\nThe second action approves Polygon's ERC20Predicate to take Timelock's USDC, in order to seed the market reserves through the bridge.\n\nThe third action deposits USDC from mainnet to the Polygon RootChainManager contract to bridge to Comet.\n\nThe fourth action approves Polygon's ERC20Predicate to take Timelock's COMP, in order to seed the rewards contract through the bridge.\n\nThe fifth action deposits COMP from mainnet to the Polygon RootChainManager contract to bridge to CometRewards. \n\nThe sixth action sets up the ENS subdomain `v3-additional-grants.compound-community-licenses.eth`, with the Timelock as the owner.\n\nThe seventh action writes the ENS TXT record `v3-official-markets` on `v3-additional-grants.compound-community-licenses.eth`, containing the official markets JSON.\n\nThe eighth action migrates the COMP distribution for v2 cUSDT suppliers, so as to keep the total COMP distribution constant.\n"; + const txn = await govDeploymentManager.retry(async () => + trace(await governor.propose(...(await proposal(mainnetActions, description)))) + ); + + const event = txn.events.find(event => event.event === 'ProposalCreated'); + const [proposalId] = event.args; + + trace(`Created proposal ${proposalId}.`); + }, + + async enacted(deploymentManager: DeploymentManager): Promise { + return false; + }, + + async verify(deploymentManager: DeploymentManager, govDeploymentManager: DeploymentManager) { + const ethers = deploymentManager.hre.ethers; + + const { + comet, + rewards, + WETH, + wstETH, + rETH + } = await deploymentManager.getContracts(); + + const { + timelock + } = await govDeploymentManager.getContracts(); + + // 1. + const wstETHInfo = await comet.getAssetInfoByAddress(wstETH.address); + const rETHInfo = await comet.getAssetInfoByAddress(rETH.address); + // expect(wstETHInfo.supplyCap).to.be.eq(exp(400, 8)); + // expect(rETHInfo.supplyCap).to.be.eq(exp(10_000_000, 18)); + expect(await comet.pauseGuardian()).to.be.eq('0x78E6317DD6D43DdbDa00Dce32C2CbaFc99361a9d'); + + // 2. & 3. + expect(await comet.getReserves()).to.be.equal(WETHAmountToBridge); + + // 4. & 5. + const arbitrumCOMP = new Contract( + arbitrumCOMPAddress, + ['function balanceOf(address account) external view returns (uint256)'], + deploymentManager.hre.ethers.provider + ); + expect((await arbitrumCOMP.balanceOf(rewards.address)).gt(exp(2_000, 18))).to.be.true; + // 6. & 7. + const ENSResolver = await govDeploymentManager.existing('ENSResolver', ENSResolverAddress); + const ENSRegistry = await govDeploymentManager.existing('ENSRegistry', ENSRegistryAddress); + const subdomainHash = ethers.utils.namehash(ENSSubdomain); + const officialMarketsJSON = await ENSResolver.text(subdomainHash, ENSTextRecordKey); + const officialMarkets = JSON.parse(officialMarketsJSON); + expect(await ENSRegistry.recordExists(subdomainHash)).to.be.equal(true); + expect(await ENSRegistry.owner(subdomainHash)).to.be.equal(timelock.address); + expect(await ENSRegistry.resolver(subdomainHash)).to.be.equal(ENSResolverAddress); + expect(await ENSRegistry.ttl(subdomainHash)).to.be.equal(0); + expect(officialMarkets).to.deep.equal({ + 1: [ + { + baseSymbol: 'USDC', + cometAddress: '0xc3d688B66703497DAA19211EEdff47f25384cdc3', + }, + { + baseSymbol: 'WETH', + cometAddress: '0xA17581A9E3356d9A858b789D68B4d866e593aE94', + }, + // should be changed after soon to be PR + // { + // baseSymbol: 'WETH', + // cometAddress: comet.address, + // }, + ], + 137: [ + { + baseSymbol: 'USDC', + cometAddress: '0xF25212E676D1F7F89Cd72fFEe66158f541246445', + }, + ], + 8453: [ + { + baseSymbol: 'USDbC', + cometAddress: '0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf', + }, + { + baseSymbol: 'WETH', + cometAddress: '0x46e6b214b524310239732D51387075E0e70970bf', + }, + { + baseSymbol: 'USDC', + cometAddress: '0xb125E6687d4313864e53df431d5425969c15Eb2F', + }, + ], + 42161: [ + { + baseSymbol: 'USDC.e', + cometAddress: '0xA5EDBDD9646f8dFF606d7448e414884C7d905dCA', + }, + { + baseSymbol: 'USDC', + cometAddress: '0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf', + }, + { + baseSymbol: 'WETH', + cometAddress: comet.address, + }, + ], + 534352: [ + { + baseSymbol: 'USDC', + cometAddress: '0xB2f97c1Bd3bf02f5e74d13f02E3e26F93D77CE44', + }, + ], + 10: [ + { + baseSymbol: 'USDC', + cometAddress: '0x2e44e174f7D53F0212823acC11C01A11d58c5bCB', + }, + ], + }); + + // 8. + // expect(await comet.baseTrackingSupplySpeed()).to.be.equal(0); + // expect(await comet.baseTrackingBorrowSpeed()).to.be.equal(exp(34.74 / 86400, 15, 18)); + } +}); \ No newline at end of file diff --git a/deployments/arbitrum/weth/relations.ts b/deployments/arbitrum/weth/relations.ts new file mode 100644 index 000000000..b42cc0bf2 --- /dev/null +++ b/deployments/arbitrum/weth/relations.ts @@ -0,0 +1,53 @@ +import baseRelationConfig from '../../relations'; + +export default { + ...baseRelationConfig, + 'governor': { + artifact: 'contracts/bridges/polygon/PolygonBridgeReceiver.sol:PolygonBridgeReceiver', + }, + TransparentUpgradeableProxy: { + artifact: 'contracts/ERC20.sol:ERC20' + }, + OssifiableProxy: { + artifact: 'contracts/ERC20.sol:ERC20' + }, + ClonableBeaconProxy: { + artifact: 'contracts/ERC20.sol:ERC20' + }, + // WETH + '0x82af49447d8a07e3bd95bd0d56f35241523fbab1': { + artifact: 'contracts/ERC20.sol:ERC20', + delegates: { + field: { + slot: '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' + } + } + }, + // rETH + '0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8': { + artifact: 'contracts/ERC20.sol:ERC20', + delegates: { + field: { + slot: '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' + } + } + }, + // wstETH + '0x5979D7b546E38E414F7E9822514be443A4800529': { + artifact: 'contracts/ERC20.sol:ERC20', + delegates: { + field: { + slot: '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' + } + } + }, + // weETH + '0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe': { + artifact: 'contracts/ERC20.sol:ERC20', + delegates: { + field: { + slot: '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' + } + } + } +}; \ No newline at end of file diff --git a/deployments/arbitrum/weth/roots.json b/deployments/arbitrum/weth/roots.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/deployments/arbitrum/weth/roots.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 284c8cb5c..20547eb81 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -28,6 +28,7 @@ import mainnetWethRelationConfigMap from './deployments/mainnet/weth/relations'; import polygonRelationConfigMap from './deployments/polygon/usdc/relations'; import arbitrumBridgedUsdcRelationConfigMap from './deployments/arbitrum/usdc.e/relations'; import arbitrumNativeUsdcRelationConfigMap from './deployments/arbitrum/usdc/relations'; +import arbitrumWETHRelationConfigMap from './deployments/arbitrum/weth/relations'; import arbitrumBridgedUsdcGoerliRelationConfigMap from './deployments/arbitrum-goerli/usdc.e/relations'; import arbitrumGoerliNativeUsdcRelationConfigMap from './deployments/arbitrum-goerli/usdc/relations'; import baseUsdbcRelationConfigMap from './deployments/base/usdbc/relations'; @@ -353,7 +354,8 @@ const config: HardhatUserConfig = { }, arbitrum: { 'usdc.e': arbitrumBridgedUsdcRelationConfigMap, - usdc: arbitrumNativeUsdcRelationConfigMap + usdc: arbitrumNativeUsdcRelationConfigMap, + weth: arbitrumWETHRelationConfigMap }, 'arbitrum-goerli': { 'usdc.e': arbitrumBridgedUsdcGoerliRelationConfigMap, @@ -450,6 +452,12 @@ const config: HardhatUserConfig = { deployment: 'usdc', auxiliaryBase: 'mainnet' }, + { + name: 'arbitrum-weth', + network: 'arbitrum', + deployment: 'weth', + auxiliaryBase: 'mainnet' + }, { name: 'arbitrum-goerli-usdc.e', network: 'arbitrum-goerli', @@ -551,4 +559,4 @@ const config: HardhatUserConfig = { setupDefaultNetworkProviders(config); -export default config; +export default config; \ No newline at end of file diff --git a/scenario/LiquidationBotScenario.ts b/scenario/LiquidationBotScenario.ts index 763468c9e..4ec774742 100644 --- a/scenario/LiquidationBotScenario.ts +++ b/scenario/LiquidationBotScenario.ts @@ -514,12 +514,15 @@ scenario( tokenBalances: { $comet: { $base: 100000 }, }, - cometBalances: { - albert: { - $asset0: ' == 200', - }, - betty: { $base: 1000 }, - }, + cometBalances: async (ctx) => ( + { + albert: { + $asset0: ' == 200', + }, + betty: + (ctx.world.base.network === 'arbitrum' && ctx.world.base.deployment === 'weth')? {$base: 900} : {$base: 1000} + } + ) }, async ({ comet, actors }, _context, world) => { const { albert, betty } = actors; @@ -625,12 +628,15 @@ scenario( tokenBalances: { $comet: { $base: 100000 }, }, - cometBalances: { - albert: { - $asset0: ' == 200', - }, - betty: { $base: 1000 }, - }, + cometBalances: async (ctx) => ( + { + albert: { + $asset0: ' == 200', + }, + betty: + (ctx.world.base.network === 'arbitrum' && ctx.world.base.deployment === 'weth')? {$base: 900} : {$base: 1000} + } + ), }, async ({ comet, actors }, _context, world) => { const { albert, betty } = actors; diff --git a/scenario/LiquidationScenario.ts b/scenario/LiquidationScenario.ts index 567c72cf0..53d7960b9 100644 --- a/scenario/LiquidationScenario.ts +++ b/scenario/LiquidationScenario.ts @@ -8,10 +8,15 @@ scenario( tokenBalances: { $comet: { $base: 1000 }, }, - cometBalances: { - albert: { $base: -1000 }, - betty: { $base: 1000 }, - }, + cometBalances: async (ctx) => ( + { + albert: { + $base: -1000, + }, + betty: + (ctx.world.base.network === 'arbitrum' && ctx.world.base.deployment === 'weth')? {$base: 900} : {$base: 1000} + } + ), }, async ({ comet, actors }, context, world) => { const { albert, betty } = actors; @@ -38,10 +43,14 @@ scenario( tokenBalances: { $comet: { $base: 1000 }, }, - cometBalances: { - albert: { $base: -1000 }, - betty: { $base: 1000 } - }, + cometBalances: async (ctx) => ( + { + albert: + (ctx.world.base.network === 'arbitrum' && ctx.world.base.deployment === 'weth')? {$base: -900} : {$base: -1000}, + betty: + (ctx.world.base.network === 'arbitrum' && ctx.world.base.deployment === 'weth')? {$base: 900} : {$base: 1000} + } + ), pause: { absorbPaused: true, }, diff --git a/scenario/RewardsScenario.ts b/scenario/RewardsScenario.ts index a879a2bbe..9811eeae6 100644 --- a/scenario/RewardsScenario.ts +++ b/scenario/RewardsScenario.ts @@ -148,24 +148,35 @@ scenario( } ); +function getAmountForSpecificDeployment(ctx: CometContext, num: number) : number { + switch (ctx.world.base.network + '-'+ ctx.world.base.deployment) { + case 'arbitrum-weth': + return num / 100; + default: + return num; + } +} + scenario( 'Comet#rewards > can claim borrow rewards for self', { filter: async (ctx) => await isRewardSupported(ctx), - tokenBalances: { - albert: { $asset0: ' == 10000' }, // in units of asset, not wei - $comet: { $base: ' >= 1000 ' } - }, + tokenBalances: async (ctx) => ( + { + albert: { $asset0: ` == ${getAmountForSpecificDeployment(ctx, 10000)}` }, // in units of asset, not wei + $comet: { $base: ' >= 1000 ' } + } + ), }, async ({ comet, rewards, actors }, context, world) => { const { albert } = actors; const { asset: collateralAssetAddress, scale: scaleBN } = await comet.getAssetInfo(0); const collateralAsset = context.getAssetByAddress(collateralAssetAddress); const scale = scaleBN.toBigInt(); - const toSupply = 10_000n * scale; + const toSupply = BigInt(getAmountForSpecificDeployment(context, 10_000)) * scale; const baseAssetAddress = await comet.baseToken(); const baseScale = (await comet.baseScale()).toBigInt(); - const toBorrow = 1_000n * baseScale; + const toBorrow = BigInt(getAmountForSpecificDeployment(context, 1_000)) * baseScale; const { rescaleFactor } = await context.getRewardConfig(); const rewardToken = await context.getRewardToken(); diff --git a/scenario/TransferScenario.ts b/scenario/TransferScenario.ts index 06d7151c0..3356d65c4 100644 --- a/scenario/TransferScenario.ts +++ b/scenario/TransferScenario.ts @@ -130,14 +130,25 @@ scenario( } ); +function getAmountForSpecificDeployment(ctx: CometContext, num: number) : number { + switch (ctx.world.base.network + '-'+ ctx.world.base.deployment) { + case 'arbitrum-weth': + return num * 9 / 10; + default: + return num; + } +} + scenario( 'Comet#transfer > partial withdraw / borrow base to partial repay / supply', { - cometBalances: { - albert: { $base: 1000, $asset0: 5000 }, // in units of asset, not wei - betty: { $base: -1000 }, - charles: { $base: 1000 }, // to give the protocol enough base for others to borrow from - }, + cometBalances: async (ctx) => ( + { + albert: { $base: getAmountForSpecificDeployment(ctx, 1000), $asset0: 5000 }, // in units of asset, not wei + betty: { $base: -getAmountForSpecificDeployment(ctx, 1000) }, + charles: { $base: getAmountForSpecificDeployment(ctx, 1000) }, // to give the protocol enough base for others to borrow from + } + ), }, async ({ comet, actors }, context) => { const { albert, betty } = actors; @@ -148,16 +159,16 @@ scenario( const borrowRate = (await comet.getBorrowRate(utilization)).toBigInt(); // XXX 100 seconds?! - expectApproximately(await albert.getCometBaseBalance(), 1000n * scale, getInterest(1000n * scale, borrowRate, 100n) + 2n); - expectApproximately(await betty.getCometBaseBalance(), -1000n * scale, getInterest(1000n * scale, borrowRate, 100n) + 2n); + expectApproximately(await albert.getCometBaseBalance(), BigInt(getAmountForSpecificDeployment(context, 1000)) * scale, getInterest(BigInt(getAmountForSpecificDeployment(context, 1000)) * scale, borrowRate, 100n) + 2n); + expectApproximately(await betty.getCometBaseBalance(), -BigInt(getAmountForSpecificDeployment(context, 1000)) * scale, getInterest(BigInt(getAmountForSpecificDeployment(context, 1000)) * scale, borrowRate, 100n) + 2n); // Albert with positive balance transfers to Betty with negative balance - const toTransfer = 2500n * scale; + const toTransfer = BigInt(getAmountForSpecificDeployment(context, 2500)) * scale; const txn = await albert.transferAsset({ dst: betty.address, asset: baseAsset.address, amount: toTransfer }); // Albert ends with negative balance and Betty with positive balance - expectApproximately(await albert.getCometBaseBalance(), -1500n * scale, getInterest(1500n * scale, borrowRate, 100n) + 4n); - expectApproximately(await betty.getCometBaseBalance(), 1500n * scale, getInterest(1500n * scale, borrowRate, 100n) + 4n); + expectApproximately(await albert.getCometBaseBalance(), -BigInt(getAmountForSpecificDeployment(context, 1500)) * scale, getInterest(BigInt(getAmountForSpecificDeployment(context, 1500)) * scale, borrowRate, 100n) + 4n); + expectApproximately(await betty.getCometBaseBalance(), BigInt(getAmountForSpecificDeployment(context, 1500)) * scale, getInterest(BigInt(getAmountForSpecificDeployment(context, 1500)) * scale, borrowRate, 100n) + 4n); return txn; // return txn to measure gas } diff --git a/scenario/utils/relayArbitrumMessage.ts b/scenario/utils/relayArbitrumMessage.ts index 4929b9533..287ec7b5d 100644 --- a/scenario/utils/relayArbitrumMessage.ts +++ b/scenario/utils/relayArbitrumMessage.ts @@ -3,6 +3,7 @@ import { impersonateAddress } from '../../plugins/scenario/utils'; import { setNextBaseFeeToZero, setNextBlockTimestamp } from './hreUtils'; import { utils, BigNumber } from 'ethers'; import { Log } from '@ethersproject/abstract-provider'; +import { sourceTokens } from '../../plugins/scenario/utils/TokenSourcer'; export async function relayArbitrumMessage( governanceDeploymentManager: DeploymentManager, @@ -81,6 +82,25 @@ export async function relayArbitrumMessage( bridgeDeploymentManager, sender ); + // if method name == finalizeInboundTransfer(address,address,address,uint256,bytes) + if(data.slice(0, 10) == '0x2e567b36'){ + const _data = '0x' + data.slice(10, 266); + const [token,, to, amount] = utils.defaultAbiCoder.decode( + ['address', 'address', 'address', 'uint256'], + _data + ); + // if token is mainnet ETH -> than source arbitrum weth + if(token == '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'){ + await sourceTokens({ + dm: bridgeDeploymentManager, + amount: amount, + asset: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', + address: to, + blacklist: [], + }); + continue; + } + } const transactionRequest = await arbitrumSigner.populateTransaction({ to: toAddress, from: sender, diff --git a/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts b/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts index d073fb587..d4c011fa9 100644 --- a/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts +++ b/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts @@ -57,7 +57,9 @@ const addresses = { WBTC: '0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f', USDT: '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9', USDC: '0xaf88d065e77c8cc2239327c5edb3a432268e5831', - USDC_E: '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8' + USDC_E: '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', + rETH: '0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8', + wstETH: '0x5979D7b546E38E414F7E9822514be443A4800529' } }; @@ -110,6 +112,10 @@ export const flashLoanPools = { tokenAddress: addresses.arbitrum.USDC_E, poolFee: 100 }, + weth: { + tokenAddress: addresses.arbitrum.USDC, + poolFee: 500 + } } }; @@ -233,6 +239,20 @@ export function getPoolConfig(tokenAddress: string) { uniswapPoolFee: 500 } }, + [addresses.arbitrum.rETH.toLowerCase()]: { + ...defaultPoolConfig, + ...{ + exchange: Exchange.Balancer, + balancerPoolId: '0xd0ec47c54ca5e20aaae4616c25c825c7f48d40690000000000000000000004ef' + } + }, + [addresses.arbitrum.wstETH.toLowerCase()]: { + ...defaultPoolConfig, + ...{ + exchange: Exchange.Balancer, + balancerPoolId: '0x9791d590788598535278552eecd4b211bfc790cb000000000000000000000498' + } + } }; const poolConfig = poolConfigs[tokenAddress.toLowerCase()]; @@ -260,7 +280,9 @@ function getMaxAmountToPurchase(tokenAddress: string): bigint { [addresses.arbitrum.ARB.toLowerCase()]: exp(500000, 18), [addresses.arbitrum.GMX.toLowerCase()]: exp(4000, 18), [addresses.arbitrum.WETH.toLowerCase()]: exp(2000, 18), - [addresses.arbitrum.WBTC.toLowerCase()]: exp(100, 8) + [addresses.arbitrum.WBTC.toLowerCase()]: exp(100, 8), + [addresses.arbitrum.rETH.toLowerCase()]: exp(2000, 18), + [addresses.arbitrum.wstETH.toLowerCase()]: exp(2000, 18) }; const max = maxAmountsToPurchase[tokenAddress.toLowerCase()]; diff --git a/src/deploy/index.ts b/src/deploy/index.ts index 209bfff19..e1799ec63 100644 --- a/src/deploy/index.ts +++ b/src/deploy/index.ts @@ -96,9 +96,21 @@ export const WHALES = { '0x167384319b41f7094e62f7506409eb38079abff8' // WMATIC whale ], arbitrum: [ + '0x8eb270e296023e9d92081fdf967ddd7878724424', // rETH whales: + '0x78e88887d80451cb08fdc4b9046c9d01fb8d048d', + '0xc0cf4b266be5b3229c49590b59e67a09c15b22f4', + '0x84446698694b348eaece187b55df06ab4ce72b35', + '0x42c248d137512907048021b30d9da17f48b5b7b2', // wstETH whale + '0xc3e5607cd4ca0d5fe51e09b60ed97a0ae6f874dd', // WETH whale '0xf89d7b9c864f589bbf53a82105107622b35eaa40', // USDC whale '0x7b7b957c284c2c227c980d6e2f804311947b84d0', // WBTC whale - '0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae', // COMP whale + '0x1c6b5795be43ddff8812b3e577ac752764635bc5', // COMP whales: + '0xdead767ba9f8072c986a4619c27ae46bcc226c13', + '0xde5167c19a5286889752cb0f31a1c7f28a99fefb', + '0xdfa19e743421c394d904f5a113121c2227d2364b', + '0xee3273f6d29ddfff08ffd9d513cff314734f01a2', + '0x9e786a8fc88ee74b758b125071d45853356024c3', + '0xd93f76944e870900779c09ddf1c46275f9d8bf9b', '0xe68ee8a12c611fd043fb05d65e1548dc1383f2b9' // native USDC whale ], base: [ From 1761031c1528aaa242ceb4ed7c0a353b0b1abb69 Mon Sep 17 00:00:00 2001 From: Mikhailo Shabodyash <67977488+EviLord032@users.noreply.github.com> Date: Wed, 29 May 2024 21:36:08 +0300 Subject: [PATCH 02/14] Update configuration.json --- deployments/arbitrum/weth/configuration.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deployments/arbitrum/weth/configuration.json b/deployments/arbitrum/weth/configuration.json index f3b7b41f3..288bbb305 100644 --- a/deployments/arbitrum/weth/configuration.json +++ b/deployments/arbitrum/weth/configuration.json @@ -21,8 +21,8 @@ }, "tracking": { "indexScale": "1e15", - "baseSupplySpeed": "6e15", - "baseBorrowSpeed": "4e15", + "baseSupplySpeed": "0e15", + "baseBorrowSpeed": "0e15", "baseMinForRewards": "1000e18" }, "assets": { @@ -32,7 +32,7 @@ "borrowCF": 0.90, "liquidateCF": 0.93, "liquidationFactor": 0.97, - "supplyCap": "800e18" + "supplyCap": "0e18" }, "wstETH": { "address": "0x5979D7b546E38E414F7E9822514be443A4800529", @@ -40,7 +40,7 @@ "borrowCF": 0.88, "liquidateCF": 0.93, "liquidationFactor": 0.97, - "supplyCap": "2000e18" + "supplyCap": "0e18" }, "weETH": { "address": "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", @@ -48,7 +48,7 @@ "borrowCF": 0.82, "liquidateCF": 0.87, "liquidationFactor": 0.92, - "supplyCap": "550e18" + "supplyCap": "0e18" } } } From 59b11c698d23c64ac0e8b01d4480225bf189444d Mon Sep 17 00:00:00 2001 From: Mikhailo Shabodyash <67977488+EviLord032@users.noreply.github.com> Date: Fri, 31 May 2024 14:29:40 +0300 Subject: [PATCH 03/14] fix: clean up --- deployments/arbitrum/weth/configuration.json | 16 ++++++------ .../1716912328_configure_and_ens.ts | 22 +++++++--------- scenario/LiquidationBotScenario.ts | 26 ++++++------------- scenario/LiquidationScenario.ts | 25 ++++++------------ .../liquidateUnderwaterBorrowers.ts | 12 +++++++-- 5 files changed, 44 insertions(+), 57 deletions(-) diff --git a/deployments/arbitrum/weth/configuration.json b/deployments/arbitrum/weth/configuration.json index 288bbb305..b4ffd45dc 100644 --- a/deployments/arbitrum/weth/configuration.json +++ b/deployments/arbitrum/weth/configuration.json @@ -26,6 +26,14 @@ "baseMinForRewards": "1000e18" }, "assets": { + "weETH": { + "address": "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", + "decimals": "18", + "borrowCF": 0.82, + "liquidateCF": 0.87, + "liquidationFactor": 0.92, + "supplyCap": "0e18" + }, "rETH": { "address": "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8", "decimals": "18", @@ -41,14 +49,6 @@ "liquidateCF": 0.93, "liquidationFactor": 0.97, "supplyCap": "0e18" - }, - "weETH": { - "address": "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", - "decimals": "18", - "borrowCF": 0.82, - "liquidateCF": 0.87, - "liquidationFactor": 0.92, - "supplyCap": "0e18" } } } diff --git a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts index 5badc2144..8d61b3ed3 100644 --- a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts +++ b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts @@ -198,9 +198,9 @@ export default migration('1713517203_configurate_and_ens', { const { comet, rewards, - WETH, wstETH, - rETH + rETH, + weETH } = await deploymentManager.getContracts(); const { @@ -208,10 +208,13 @@ export default migration('1713517203_configurate_and_ens', { } = await govDeploymentManager.getContracts(); // 1. - const wstETHInfo = await comet.getAssetInfoByAddress(wstETH.address); + const weETHInfo = await comet.getAssetInfoByAddress(weETH.address); const rETHInfo = await comet.getAssetInfoByAddress(rETH.address); - // expect(wstETHInfo.supplyCap).to.be.eq(exp(400, 8)); - // expect(rETHInfo.supplyCap).to.be.eq(exp(10_000_000, 18)); + const wstETHInfo = await comet.getAssetInfoByAddress(wstETH.address); + // expect(weETHInfo.supplyCap).to.be.eq(exp(550, 18)); + // expect(wstETHInfo.supplyCap).to.be.eq(exp(2000, 18)); + // expect(rETHInfo.supplyCap).to.be.eq(exp(800, 18)); + expect(await comet.pauseGuardian()).to.be.eq('0x78E6317DD6D43DdbDa00Dce32C2CbaFc99361a9d'); // 2. & 3. @@ -244,11 +247,6 @@ export default migration('1713517203_configurate_and_ens', { baseSymbol: 'WETH', cometAddress: '0xA17581A9E3356d9A858b789D68B4d866e593aE94', }, - // should be changed after soon to be PR - // { - // baseSymbol: 'WETH', - // cometAddress: comet.address, - // }, ], 137: [ { @@ -299,7 +297,7 @@ export default migration('1713517203_configurate_and_ens', { }); // 8. - // expect(await comet.baseTrackingSupplySpeed()).to.be.equal(0); - // expect(await comet.baseTrackingBorrowSpeed()).to.be.equal(exp(34.74 / 86400, 15, 18)); + // expect(await comet.baseTrackingSupplySpeed()).to.be.equal(exp(6, 15)); + // expect(await comet.baseTrackingBorrowSpeed()).to.be.equal(exp(4, 15)); } }); \ No newline at end of file diff --git a/scenario/LiquidationBotScenario.ts b/scenario/LiquidationBotScenario.ts index 4ec774742..08a0102ef 100644 --- a/scenario/LiquidationBotScenario.ts +++ b/scenario/LiquidationBotScenario.ts @@ -514,15 +514,10 @@ scenario( tokenBalances: { $comet: { $base: 100000 }, }, - cometBalances: async (ctx) => ( - { - albert: { - $asset0: ' == 200', - }, - betty: - (ctx.world.base.network === 'arbitrum' && ctx.world.base.deployment === 'weth')? {$base: 900} : {$base: 1000} - } - ) + cometBalances: { + albert: { $asset0: ' == 200' }, + betty: { $base: 1000 }, + }, }, async ({ comet, actors }, _context, world) => { const { albert, betty } = actors; @@ -628,15 +623,10 @@ scenario( tokenBalances: { $comet: { $base: 100000 }, }, - cometBalances: async (ctx) => ( - { - albert: { - $asset0: ' == 200', - }, - betty: - (ctx.world.base.network === 'arbitrum' && ctx.world.base.deployment === 'weth')? {$base: 900} : {$base: 1000} - } - ), + cometBalances: { + albert: { $asset0: ' == 200' }, + betty: { $base: 1000 }, + }, }, async ({ comet, actors }, _context, world) => { const { albert, betty } = actors; diff --git a/scenario/LiquidationScenario.ts b/scenario/LiquidationScenario.ts index 53d7960b9..749c8da85 100644 --- a/scenario/LiquidationScenario.ts +++ b/scenario/LiquidationScenario.ts @@ -8,15 +8,10 @@ scenario( tokenBalances: { $comet: { $base: 1000 }, }, - cometBalances: async (ctx) => ( - { - albert: { - $base: -1000, - }, - betty: - (ctx.world.base.network === 'arbitrum' && ctx.world.base.deployment === 'weth')? {$base: 900} : {$base: 1000} - } - ), + cometBalances: { + albert: { $base: -1000 }, + betty: { $base: 1000 } + } }, async ({ comet, actors }, context, world) => { const { albert, betty } = actors; @@ -43,14 +38,10 @@ scenario( tokenBalances: { $comet: { $base: 1000 }, }, - cometBalances: async (ctx) => ( - { - albert: - (ctx.world.base.network === 'arbitrum' && ctx.world.base.deployment === 'weth')? {$base: -900} : {$base: -1000}, - betty: - (ctx.world.base.network === 'arbitrum' && ctx.world.base.deployment === 'weth')? {$base: 900} : {$base: 1000} - } - ), + cometBalances: { + albert: { $base: -1000 }, + betty: { $base: 1000 } + }, pause: { absorbPaused: true, }, diff --git a/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts b/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts index d4c011fa9..8700be442 100644 --- a/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts +++ b/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts @@ -59,7 +59,8 @@ const addresses = { USDC: '0xaf88d065e77c8cc2239327c5edb3a432268e5831', USDC_E: '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', rETH: '0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8', - wstETH: '0x5979D7b546E38E414F7E9822514be443A4800529' + wstETH: '0x5979D7b546E38E414F7E9822514be443A4800529', + weETH: '0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe' } }; @@ -252,7 +253,14 @@ export function getPoolConfig(tokenAddress: string) { exchange: Exchange.Balancer, balancerPoolId: '0x9791d590788598535278552eecd4b211bfc790cb000000000000000000000498' } - } + }, + [addresses.arbitrum.weETH.toLowerCase()]: { + ...defaultPoolConfig, + ...{ + exchange: Exchange.Balancer, + balancerPoolId: '0x026a586b3fe3b3d07375b4a11a505c8b4ef07eec000200000000000000000533' + } + }, }; const poolConfig = poolConfigs[tokenAddress.toLowerCase()]; From 87129994777fe9511b2cba9db887cc6759def06f Mon Sep 17 00:00:00 2001 From: Mikhailo Shabodyash <67977488+EviLord032@users.noreply.github.com> Date: Fri, 31 May 2024 14:34:11 +0300 Subject: [PATCH 04/14] fix: add comments --- scenario/LiquidationBotScenario.ts | 8 ++++++-- scenario/LiquidationScenario.ts | 4 ++-- src/deploy/index.ts | 22 +++++++++++----------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/scenario/LiquidationBotScenario.ts b/scenario/LiquidationBotScenario.ts index 08a0102ef..763468c9e 100644 --- a/scenario/LiquidationBotScenario.ts +++ b/scenario/LiquidationBotScenario.ts @@ -515,7 +515,9 @@ scenario( $comet: { $base: 100000 }, }, cometBalances: { - albert: { $asset0: ' == 200' }, + albert: { + $asset0: ' == 200', + }, betty: { $base: 1000 }, }, }, @@ -624,7 +626,9 @@ scenario( $comet: { $base: 100000 }, }, cometBalances: { - albert: { $asset0: ' == 200' }, + albert: { + $asset0: ' == 200', + }, betty: { $base: 1000 }, }, }, diff --git a/scenario/LiquidationScenario.ts b/scenario/LiquidationScenario.ts index 749c8da85..567c72cf0 100644 --- a/scenario/LiquidationScenario.ts +++ b/scenario/LiquidationScenario.ts @@ -10,8 +10,8 @@ scenario( }, cometBalances: { albert: { $base: -1000 }, - betty: { $base: 1000 } - } + betty: { $base: 1000 }, + }, }, async ({ comet, actors }, context, world) => { const { albert, betty } = actors; diff --git a/src/deploy/index.ts b/src/deploy/index.ts index e1799ec63..143578239 100644 --- a/src/deploy/index.ts +++ b/src/deploy/index.ts @@ -96,21 +96,21 @@ export const WHALES = { '0x167384319b41f7094e62f7506409eb38079abff8' // WMATIC whale ], arbitrum: [ - '0x8eb270e296023e9d92081fdf967ddd7878724424', // rETH whales: - '0x78e88887d80451cb08fdc4b9046c9d01fb8d048d', - '0xc0cf4b266be5b3229c49590b59e67a09c15b22f4', - '0x84446698694b348eaece187b55df06ab4ce72b35', + '0x8eb270e296023e9d92081fdf967ddd7878724424', // rETH whale + '0x78e88887d80451cb08fdc4b9046c9d01fb8d048d', // rETH whale + '0xc0cf4b266be5b3229c49590b59e67a09c15b22f4', // rETH whale + '0x84446698694b348eaece187b55df06ab4ce72b35', // rETH whale '0x42c248d137512907048021b30d9da17f48b5b7b2', // wstETH whale '0xc3e5607cd4ca0d5fe51e09b60ed97a0ae6f874dd', // WETH whale '0xf89d7b9c864f589bbf53a82105107622b35eaa40', // USDC whale '0x7b7b957c284c2c227c980d6e2f804311947b84d0', // WBTC whale - '0x1c6b5795be43ddff8812b3e577ac752764635bc5', // COMP whales: - '0xdead767ba9f8072c986a4619c27ae46bcc226c13', - '0xde5167c19a5286889752cb0f31a1c7f28a99fefb', - '0xdfa19e743421c394d904f5a113121c2227d2364b', - '0xee3273f6d29ddfff08ffd9d513cff314734f01a2', - '0x9e786a8fc88ee74b758b125071d45853356024c3', - '0xd93f76944e870900779c09ddf1c46275f9d8bf9b', + '0x1c6b5795be43ddff8812b3e577ac752764635bc5', // COMP whale + '0xdead767ba9f8072c986a4619c27ae46bcc226c13', // COMP whale + '0xde5167c19a5286889752cb0f31a1c7f28a99fefb', // COMP whale + '0xdfa19e743421c394d904f5a113121c2227d2364b', // COMP whale + '0xee3273f6d29ddfff08ffd9d513cff314734f01a2', // COMP whale + '0x9e786a8fc88ee74b758b125071d45853356024c3', // COMP whale + '0xd93f76944e870900779c09ddf1c46275f9d8bf9b', // COMP whale '0xe68ee8a12c611fd043fb05d65e1548dc1383f2b9' // native USDC whale ], base: [ From aef4f12292b5d9022e774d79f47d9f78c6ada78e Mon Sep 17 00:00:00 2001 From: Mikhailo Shabodyash <67977488+EviLord032@users.noreply.github.com> Date: Fri, 31 May 2024 14:35:32 +0300 Subject: [PATCH 05/14] Update index.ts --- src/deploy/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deploy/index.ts b/src/deploy/index.ts index 143578239..f912c38bf 100644 --- a/src/deploy/index.ts +++ b/src/deploy/index.ts @@ -105,7 +105,7 @@ export const WHALES = { '0xf89d7b9c864f589bbf53a82105107622b35eaa40', // USDC whale '0x7b7b957c284c2c227c980d6e2f804311947b84d0', // WBTC whale '0x1c6b5795be43ddff8812b3e577ac752764635bc5', // COMP whale - '0xdead767ba9f8072c986a4619c27ae46bcc226c13', // COMP whale + '0xdead767ba9f8072c986a4619c27ae46bcc226c13', // COMP whale '0xde5167c19a5286889752cb0f31a1c7f28a99fefb', // COMP whale '0xdfa19e743421c394d904f5a113121c2227d2364b', // COMP whale '0xee3273f6d29ddfff08ffd9d513cff314734f01a2', // COMP whale From e188555198c4ed3e2dd280f0bca83bc7573ae794 Mon Sep 17 00:00:00 2001 From: Mikhailo Shabodyash <67977488+EviLord032@users.noreply.github.com> Date: Fri, 31 May 2024 18:05:30 +0300 Subject: [PATCH 06/14] Update 1716912328_configure_and_ens.ts --- .../1716912328_configure_and_ens.ts | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts index 8d61b3ed3..8d30d5649 100644 --- a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts +++ b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts @@ -153,20 +153,20 @@ export default migration('1713517203_configurate_and_ens', { args: [], value: WETHAmountToBridge, }, - // 2. Approve the WETH gateway to take Timelock's WETH for bridging + // 3. Approve the WETH gateway to take Timelock's WETH for bridging { contract: WETH, signature: 'approve(address,uint256)', args: [wethGatewayAddress, WETHAmountToBridge] }, - // 3. Bridge WETH from mainnet to Arbitrum Comet + // 4. Bridge WETH from mainnet to Arbitrum Comet { target: arbitrumL1GatewayRouter.address, signature: 'outboundTransfer(address,address,uint256,uint256,uint256,bytes)', calldata: outboundTransferCalldata, value: wethGasParams.deposit }, - // 4. Update the list of official markets + // 5. Update the list of official markets { target: ENSResolverAddress, signature: 'setText(bytes32,string,string)', @@ -177,7 +177,7 @@ export default migration('1713517203_configurate_and_ens', { } ]; - const description = "# Initialize cUSDCv3 on Polygon\n\nThis proposal takes the governance steps recommended and necessary to initialize a Compound III USDC market on Polygon; upon execution, cUSDCv3 will be ready for use. Simulations have confirmed the market\u2019s readiness, as much as possible, using the [Comet scenario suite](https://github.com/compound-finance/comet/tree/main/scenario). Although real tests have also been run over the Goerli/Mumbai bridge, this will be the first proposal to actually bridge from Ethereum mainnet to another chain, and therefore includes risks not present in previous proposals.\n\nAlthough the proposal sets the entire configuration in the Configurator, the initial deployment already has most of these same parameters already set. The new parameters include setting the pause guardian to a Gnosis [multisig](https://app.safe.global/matic:0x8Ab717CAC3CbC4934E63825B88442F5810aAF6e5/home), which has been created on Polygon to match the same set of signers as currently on Ethereum mainnet. They also include risk parameters based off of the [recommendations from Gauntlet](https://www.comp.xyz/t/initialize-compound-iii-usdc-on-polygon-pos/3611/12). Finally, the parameters include a modest reallocation of some of the v2 USDT COMP rewards to borrowers in the new market.\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull/672) and [forum discussion](https://www.comp.xyz/t/initialize-compound-iii-usdc-on-polygon-pos/3611/11).\n\n\n## Proposal Actions\n\nThe first proposal action sets the Comet configuration and deploys a new Comet implementation on Polygon. This sends the encoded `setConfiguration` and `deployAndUpgradeTo` calls across the bridge to the governance receiver on Polygon.\n\nThe second action approves Polygon's ERC20Predicate to take Timelock's USDC, in order to seed the market reserves through the bridge.\n\nThe third action deposits USDC from mainnet to the Polygon RootChainManager contract to bridge to Comet.\n\nThe fourth action approves Polygon's ERC20Predicate to take Timelock's COMP, in order to seed the rewards contract through the bridge.\n\nThe fifth action deposits COMP from mainnet to the Polygon RootChainManager contract to bridge to CometRewards. \n\nThe sixth action sets up the ENS subdomain `v3-additional-grants.compound-community-licenses.eth`, with the Timelock as the owner.\n\nThe seventh action writes the ENS TXT record `v3-official-markets` on `v3-additional-grants.compound-community-licenses.eth`, containing the official markets JSON.\n\nThe eighth action migrates the COMP distribution for v2 cUSDT suppliers, so as to keep the total COMP distribution constant.\n"; + const description = "# Initialize cWETHv3 on Arbitrum\n\n## Proposal summary\n\nCompound Growth Program [AlphaGrowth] proposes deployment of Compound III to the Arbitrum network. This proposal takes the governance steps recommended and necessary to initialize a Compound III WETH market on Arbitrum; upon execution, cWETHv3 will be ready for use. Simulations have confirmed the market’s readiness, as much as possible, using the [Comet scenario suite](https://github.com/compound-finance/comet/tree/main/scenario). The new parameters include setting the risk parameters based off of the [recommendations from Gauntlet](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252/2).\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull/853), [deploy market GitHub action run]() and [forum discussion](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252).\n\n\n## Proposal Actions\n\nThe first proposal action sets the Comet configuration and deploys a new Comet implementation on Arbitrum. This sends the encoded `setFactory`, `setConfiguration`, `deployAndUpgradeTo` calls across the bridge to the governance receiver on Arbitrum. It also calls `setRewardConfig` on the Arbitrum rewards contract, to establish Artitrum’s bridged version of COMP as the reward token for the deployment and set the initial supply speed to be 6 COMP/day and borrow speed to be 4 COMP/day.\n\nThe second action wraps ETH as WETH so it can be then transferred.\n\nThe third action approves (ArbitrumL1GatewayRouter) [TokenMessenger](https://etherscan.io/address/0x72Ce9c846789fdB6fC1f34aC4AD25Dd9ef7031ef) to take the Timelock's WETH on Mainnet, in order to seed the market reserves through the arbitrumL1GatewayRouter.\n\nThe fourth action bridges WETH from mainnet via ‘outboundTransfer’ function on ArbitrumL1GatewayRouter’s contract to mint native WETH to Comet on Arbitrum.\n\nThe fifth action updates the ENS TXT record `v3-official-markets` on `v3-additional-grants.compound-community-licenses.eth`, updating the official markets JSON to include the new Arbitrum cUSDCv3 market.\n"; const txn = await govDeploymentManager.retry(async () => trace(await governor.propose(...(await proposal(mainnetActions, description)))) ); @@ -217,17 +217,10 @@ export default migration('1713517203_configurate_and_ens', { expect(await comet.pauseGuardian()).to.be.eq('0x78E6317DD6D43DdbDa00Dce32C2CbaFc99361a9d'); - // 2. & 3. + // 2. & 3. & 4. expect(await comet.getReserves()).to.be.equal(WETHAmountToBridge); - // 4. & 5. - const arbitrumCOMP = new Contract( - arbitrumCOMPAddress, - ['function balanceOf(address account) external view returns (uint256)'], - deploymentManager.hre.ethers.provider - ); - expect((await arbitrumCOMP.balanceOf(rewards.address)).gt(exp(2_000, 18))).to.be.true; - // 6. & 7. + // 5. const ENSResolver = await govDeploymentManager.existing('ENSResolver', ENSResolverAddress); const ENSRegistry = await govDeploymentManager.existing('ENSRegistry', ENSRegistryAddress); const subdomainHash = ethers.utils.namehash(ENSSubdomain); From a98aac5cba0dc4e51647f96887b1c335fc4e0cae Mon Sep 17 00:00:00 2001 From: dmitriy-bergman-works Date: Fri, 31 May 2024 19:45:14 +0200 Subject: [PATCH 07/14] update description --- .../arbitrum/weth/migrations/1716912328_configure_and_ens.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts index 8d30d5649..b4ccdcc4c 100644 --- a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts +++ b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts @@ -177,7 +177,7 @@ export default migration('1713517203_configurate_and_ens', { } ]; - const description = "# Initialize cWETHv3 on Arbitrum\n\n## Proposal summary\n\nCompound Growth Program [AlphaGrowth] proposes deployment of Compound III to the Arbitrum network. This proposal takes the governance steps recommended and necessary to initialize a Compound III WETH market on Arbitrum; upon execution, cWETHv3 will be ready for use. Simulations have confirmed the market’s readiness, as much as possible, using the [Comet scenario suite](https://github.com/compound-finance/comet/tree/main/scenario). The new parameters include setting the risk parameters based off of the [recommendations from Gauntlet](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252/2).\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull/853), [deploy market GitHub action run]() and [forum discussion](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252).\n\n\n## Proposal Actions\n\nThe first proposal action sets the Comet configuration and deploys a new Comet implementation on Arbitrum. This sends the encoded `setFactory`, `setConfiguration`, `deployAndUpgradeTo` calls across the bridge to the governance receiver on Arbitrum. It also calls `setRewardConfig` on the Arbitrum rewards contract, to establish Artitrum’s bridged version of COMP as the reward token for the deployment and set the initial supply speed to be 6 COMP/day and borrow speed to be 4 COMP/day.\n\nThe second action wraps ETH as WETH so it can be then transferred.\n\nThe third action approves (ArbitrumL1GatewayRouter) [TokenMessenger](https://etherscan.io/address/0x72Ce9c846789fdB6fC1f34aC4AD25Dd9ef7031ef) to take the Timelock's WETH on Mainnet, in order to seed the market reserves through the arbitrumL1GatewayRouter.\n\nThe fourth action bridges WETH from mainnet via ‘outboundTransfer’ function on ArbitrumL1GatewayRouter’s contract to mint native WETH to Comet on Arbitrum.\n\nThe fifth action updates the ENS TXT record `v3-official-markets` on `v3-additional-grants.compound-community-licenses.eth`, updating the official markets JSON to include the new Arbitrum cUSDCv3 market.\n"; + const description = "# Initialize cWETHv3 on Arbitrum\n\n## Proposal summary\n\nCompound Growth Program [AlphaGrowth] proposes deployment of Compound III to the Arbitrum network. This proposal takes the governance steps recommended and necessary to initialize a Compound III WETH market on Arbitrum; upon execution, cWETHv3 will be ready for use. Simulations have confirmed the market’s readiness, as much as possible, using the [Comet scenario suite](https://github.com/compound-finance/comet/tree/main/scenario). The new parameters include setting the risk parameters based off of the [recommendations from Gauntlet](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252/2).\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull/856), [deploy market GitHub action run]() and [forum discussion](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252).\n\n\n## Proposal Actions\n\nThe first proposal action sets the Comet configuration and deploys a new Comet implementation on Arbitrum. This sends the encoded `setFactory`, `setConfiguration`, `deployAndUpgradeTo` calls across the bridge to the governance receiver on Arbitrum. It also calls `setRewardConfig` on the Arbitrum rewards contract, to establish Artitrum’s bridged version of COMP as the reward token for the deployment and set the initial supply speed to be 6 COMP/day and borrow speed to be 4 COMP/day.\n\nThe second action wraps ETH as WETH so it can be then transferred.\n\nThe third action approves (ArbitrumL1GatewayRouter) [TokenMessenger](https://etherscan.io/address/0x72Ce9c846789fdB6fC1f34aC4AD25Dd9ef7031ef) to take the Timelock's WETH on Mainnet, in order to seed the market reserves through the arbitrumL1GatewayRouter.\n\nThe fourth action bridges WETH from mainnet via ‘outboundTransfer’ function on ArbitrumL1GatewayRouter’s contract to mint native WETH to Comet on Arbitrum.\n\nThe fifth action updates the ENS TXT record `v3-official-markets` on `v3-additional-grants.compound-community-licenses.eth`, updating the official markets JSON to include the new Arbitrum cUSDCv3 market.\n"; const txn = await govDeploymentManager.retry(async () => trace(await governor.propose(...(await proposal(mainnetActions, description)))) ); From 529c35e9135b48881e06d270ee684f7edf566f8b Mon Sep 17 00:00:00 2001 From: dmitriy-bergman-works Date: Sat, 1 Jun 2024 11:18:53 +0200 Subject: [PATCH 08/14] feat: update ETH seed reserves to 10 --- .../arbitrum/weth/migrations/1716912328_configure_and_ens.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts index b4ccdcc4c..d15f41d3f 100644 --- a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts +++ b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts @@ -12,7 +12,7 @@ const ENSSubdomainLabel = 'v3-additional-grants'; const ENSSubdomain = `${ENSSubdomainLabel}.${ENSName}`; const ENSTextRecordKey = 'v3-official-markets'; -const WETHAmountToBridge = ethers.BigNumber.from(exp(500, 18)); +const WETHAmountToBridge = ethers.BigNumber.from(exp(10, 18)); const arbitrumCOMPAddress = '0x354A6dA3fcde098F8389cad84b0182725c6C91dE'; export default migration('1713517203_configurate_and_ens', { From 61d35230b963b9eb31f64de2dcc97e062324ca46 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Tue, 4 Jun 2024 13:23:55 +0000 Subject: [PATCH 09/14] Modified deployment roots from GitHub Actions --- deployments/arbitrum/weth/roots.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deployments/arbitrum/weth/roots.json b/deployments/arbitrum/weth/roots.json index 9e26dfeeb..bbdcc9591 100644 --- a/deployments/arbitrum/weth/roots.json +++ b/deployments/arbitrum/weth/roots.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "comet": "0xaeB318360f27748Acb200CE616E389A6C9409a07", + "configurator": "0xb21b06D71c75973babdE35b49fFDAc3F82Ad3775", + "rewards": "0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae", + "bridgeReceiver": "0x42480C37B249e33aABaf4c22B20235656bd38068", + "bulker": "0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d", + "COMP": "0x354A6dA3fcde098F8389cad84b0182725c6C91dE" +} \ No newline at end of file From 1ae6765e68b2addf962ffd20e911175ab126aa7b Mon Sep 17 00:00:00 2001 From: dmitriy-bergman-works Date: Fri, 7 Jun 2024 16:48:41 +0200 Subject: [PATCH 10/14] feat: update rETH pricefeed to the correct one; remove roots to redeploy comet; return changed scenarios back; update liquidation scenario pools --- deployments/arbitrum/weth/deploy.ts | 2 +- deployments/arbitrum/weth/roots.json | 9 +----- scenario/RewardsScenario.ts | 23 ++++---------- scenario/TransferScenario.ts | 31 ++++++------------- .../liquidateUnderwaterBorrowers.ts | 5 +-- 5 files changed, 21 insertions(+), 49 deletions(-) diff --git a/deployments/arbitrum/weth/deploy.ts b/deployments/arbitrum/weth/deploy.ts index 56d457c27..661241d30 100644 --- a/deployments/arbitrum/weth/deploy.ts +++ b/deployments/arbitrum/weth/deploy.ts @@ -32,7 +32,7 @@ export default async function deploy(deploymentManager: DeploymentManager, deplo 'rETH:priceFeed', 'pricefeeds/ScalingPriceFeed.sol', [ - '0xF3272CAfe65b190e76caAF483db13424a3e23dD2', // rETH / ETH price feed + '0xD6aB2298946840262FcC278fF31516D39fF611eF', // rETH / ETH price feed 8 // decimals ] ); diff --git a/deployments/arbitrum/weth/roots.json b/deployments/arbitrum/weth/roots.json index bbdcc9591..9e26dfeeb 100644 --- a/deployments/arbitrum/weth/roots.json +++ b/deployments/arbitrum/weth/roots.json @@ -1,8 +1 @@ -{ - "comet": "0xaeB318360f27748Acb200CE616E389A6C9409a07", - "configurator": "0xb21b06D71c75973babdE35b49fFDAc3F82Ad3775", - "rewards": "0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae", - "bridgeReceiver": "0x42480C37B249e33aABaf4c22B20235656bd38068", - "bulker": "0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d", - "COMP": "0x354A6dA3fcde098F8389cad84b0182725c6C91dE" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/scenario/RewardsScenario.ts b/scenario/RewardsScenario.ts index 9811eeae6..a879a2bbe 100644 --- a/scenario/RewardsScenario.ts +++ b/scenario/RewardsScenario.ts @@ -148,35 +148,24 @@ scenario( } ); -function getAmountForSpecificDeployment(ctx: CometContext, num: number) : number { - switch (ctx.world.base.network + '-'+ ctx.world.base.deployment) { - case 'arbitrum-weth': - return num / 100; - default: - return num; - } -} - scenario( 'Comet#rewards > can claim borrow rewards for self', { filter: async (ctx) => await isRewardSupported(ctx), - tokenBalances: async (ctx) => ( - { - albert: { $asset0: ` == ${getAmountForSpecificDeployment(ctx, 10000)}` }, // in units of asset, not wei - $comet: { $base: ' >= 1000 ' } - } - ), + tokenBalances: { + albert: { $asset0: ' == 10000' }, // in units of asset, not wei + $comet: { $base: ' >= 1000 ' } + }, }, async ({ comet, rewards, actors }, context, world) => { const { albert } = actors; const { asset: collateralAssetAddress, scale: scaleBN } = await comet.getAssetInfo(0); const collateralAsset = context.getAssetByAddress(collateralAssetAddress); const scale = scaleBN.toBigInt(); - const toSupply = BigInt(getAmountForSpecificDeployment(context, 10_000)) * scale; + const toSupply = 10_000n * scale; const baseAssetAddress = await comet.baseToken(); const baseScale = (await comet.baseScale()).toBigInt(); - const toBorrow = BigInt(getAmountForSpecificDeployment(context, 1_000)) * baseScale; + const toBorrow = 1_000n * baseScale; const { rescaleFactor } = await context.getRewardConfig(); const rewardToken = await context.getRewardToken(); diff --git a/scenario/TransferScenario.ts b/scenario/TransferScenario.ts index 3356d65c4..06d7151c0 100644 --- a/scenario/TransferScenario.ts +++ b/scenario/TransferScenario.ts @@ -130,25 +130,14 @@ scenario( } ); -function getAmountForSpecificDeployment(ctx: CometContext, num: number) : number { - switch (ctx.world.base.network + '-'+ ctx.world.base.deployment) { - case 'arbitrum-weth': - return num * 9 / 10; - default: - return num; - } -} - scenario( 'Comet#transfer > partial withdraw / borrow base to partial repay / supply', { - cometBalances: async (ctx) => ( - { - albert: { $base: getAmountForSpecificDeployment(ctx, 1000), $asset0: 5000 }, // in units of asset, not wei - betty: { $base: -getAmountForSpecificDeployment(ctx, 1000) }, - charles: { $base: getAmountForSpecificDeployment(ctx, 1000) }, // to give the protocol enough base for others to borrow from - } - ), + cometBalances: { + albert: { $base: 1000, $asset0: 5000 }, // in units of asset, not wei + betty: { $base: -1000 }, + charles: { $base: 1000 }, // to give the protocol enough base for others to borrow from + }, }, async ({ comet, actors }, context) => { const { albert, betty } = actors; @@ -159,16 +148,16 @@ scenario( const borrowRate = (await comet.getBorrowRate(utilization)).toBigInt(); // XXX 100 seconds?! - expectApproximately(await albert.getCometBaseBalance(), BigInt(getAmountForSpecificDeployment(context, 1000)) * scale, getInterest(BigInt(getAmountForSpecificDeployment(context, 1000)) * scale, borrowRate, 100n) + 2n); - expectApproximately(await betty.getCometBaseBalance(), -BigInt(getAmountForSpecificDeployment(context, 1000)) * scale, getInterest(BigInt(getAmountForSpecificDeployment(context, 1000)) * scale, borrowRate, 100n) + 2n); + expectApproximately(await albert.getCometBaseBalance(), 1000n * scale, getInterest(1000n * scale, borrowRate, 100n) + 2n); + expectApproximately(await betty.getCometBaseBalance(), -1000n * scale, getInterest(1000n * scale, borrowRate, 100n) + 2n); // Albert with positive balance transfers to Betty with negative balance - const toTransfer = BigInt(getAmountForSpecificDeployment(context, 2500)) * scale; + const toTransfer = 2500n * scale; const txn = await albert.transferAsset({ dst: betty.address, asset: baseAsset.address, amount: toTransfer }); // Albert ends with negative balance and Betty with positive balance - expectApproximately(await albert.getCometBaseBalance(), -BigInt(getAmountForSpecificDeployment(context, 1500)) * scale, getInterest(BigInt(getAmountForSpecificDeployment(context, 1500)) * scale, borrowRate, 100n) + 4n); - expectApproximately(await betty.getCometBaseBalance(), BigInt(getAmountForSpecificDeployment(context, 1500)) * scale, getInterest(BigInt(getAmountForSpecificDeployment(context, 1500)) * scale, borrowRate, 100n) + 4n); + expectApproximately(await albert.getCometBaseBalance(), -1500n * scale, getInterest(1500n * scale, borrowRate, 100n) + 4n); + expectApproximately(await betty.getCometBaseBalance(), 1500n * scale, getInterest(1500n * scale, borrowRate, 100n) + 4n); return txn; // return txn to measure gas } diff --git a/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts b/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts index 8700be442..577bf2fef 100644 --- a/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts +++ b/scripts/liquidation_bot/liquidateUnderwaterBorrowers.ts @@ -257,8 +257,9 @@ export function getPoolConfig(tokenAddress: string) { [addresses.arbitrum.weETH.toLowerCase()]: { ...defaultPoolConfig, ...{ - exchange: Exchange.Balancer, - balancerPoolId: '0x026a586b3fe3b3d07375b4a11a505c8b4ef07eec000200000000000000000533' + exchange: Exchange.Uniswap, + swapViaWeth: false, + uniswapPoolFee: 100 } }, }; From 336c08e54f205097ed2d9d9123f71e9b80559410 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Fri, 7 Jun 2024 15:04:13 +0000 Subject: [PATCH 11/14] Modified deployment roots from GitHub Actions --- deployments/arbitrum/weth/roots.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deployments/arbitrum/weth/roots.json b/deployments/arbitrum/weth/roots.json index 9e26dfeeb..b82141555 100644 --- a/deployments/arbitrum/weth/roots.json +++ b/deployments/arbitrum/weth/roots.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "comet": "0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486", + "configurator": "0xb21b06D71c75973babdE35b49fFDAc3F82Ad3775", + "rewards": "0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae", + "bridgeReceiver": "0x42480C37B249e33aABaf4c22B20235656bd38068", + "bulker": "0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d", + "COMP": "0x354A6dA3fcde098F8389cad84b0182725c6C91dE" +} \ No newline at end of file From c89cda24228a7d54c9c629e00ccf6d2c352597b7 Mon Sep 17 00:00:00 2001 From: dmitriy-bergman-works Date: Fri, 7 Jun 2024 17:16:39 +0200 Subject: [PATCH 12/14] feat: add impersonate in enact-migration; add supply caps and speeds; update description; update verify checks --- .github/workflows/enact-migration.yaml | 17 ++++++++++++++++- deployments/arbitrum/weth/configuration.json | 12 ++++++------ .../migrations/1716912328_configure_and_ens.ts | 12 ++++++------ 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.github/workflows/enact-migration.yaml b/.github/workflows/enact-migration.yaml index 1b1558688..6842ba074 100644 --- a/.github/workflows/enact-migration.yaml +++ b/.github/workflows/enact-migration.yaml @@ -36,6 +36,10 @@ on: description: Run ID for Artifact eth_pk: description: Ignore if you plan to use WalletConnect, otherwise, you can paste in a Ethereum private key + impersonateAccount: + description: Impersonate Account + required: false + default: '' jobs: enact-migration: name: Enact Migration @@ -114,7 +118,18 @@ jobs: GOV_NETWORK_PROVIDER: ${{ fromJSON('["", "http://localhost:8685"]')[github.event.inputs.eth_pk == '' && env.GOV_NETWORK != ''] }} GOV_NETWORK: ${{ env.GOV_NETWORK }} REMOTE_ACCOUNTS: ${{ fromJSON('["", "true"]')[github.event.inputs.eth_pk == ''] }} - + if: github.event.inputs.impersonateAccount == '' + - name: Run Enact Migration (impersonate) + run: | + yarn hardhat migrate --network ${{ github.event.inputs.network }} --deployment ${{ github.event.inputs.deployment }} --enact --overwrite ${{ fromJSON('["", "--simulate"]')[github.event.inputs.simulate == 'true'] }} ${{ fromJSON('["", "--no-enacted"]')[github.event.inputs.no_enacted == 'true'] }} ${{ github.event.inputs.migration }} --impersonate ${{ github.event.inputs.impersonateAccount }} + env: + DEBUG: true + ETH_PK: "${{ inputs.eth_pk }}" + NETWORK_PROVIDER: ${{ fromJSON('["", "http://localhost:8585"]')[github.event.inputs.eth_pk == ''] }} + GOV_NETWORK_PROVIDER: ${{ fromJSON('["", "http://localhost:8685"]')[github.event.inputs.eth_pk == '' && env.GOV_NETWORK != ''] }} + GOV_NETWORK: ${{ env.GOV_NETWORK }} + REMOTE_ACCOUNTS: ${{ fromJSON('["", "true"]')[github.event.inputs.eth_pk == ''] }} + if: github.event.inputs.impersonateAccount != '' - name: Commit changes if: ${{ github.event.inputs.simulate == 'false' }} run: | diff --git a/deployments/arbitrum/weth/configuration.json b/deployments/arbitrum/weth/configuration.json index b4ffd45dc..aacebfc58 100644 --- a/deployments/arbitrum/weth/configuration.json +++ b/deployments/arbitrum/weth/configuration.json @@ -21,8 +21,8 @@ }, "tracking": { "indexScale": "1e15", - "baseSupplySpeed": "0e15", - "baseBorrowSpeed": "0e15", + "baseSupplySpeed": "69444444444e0", + "baseBorrowSpeed": "46296296296e0", "baseMinForRewards": "1000e18" }, "assets": { @@ -32,7 +32,7 @@ "borrowCF": 0.82, "liquidateCF": 0.87, "liquidationFactor": 0.92, - "supplyCap": "0e18" + "supplyCap": "550e18" }, "rETH": { "address": "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8", @@ -40,7 +40,7 @@ "borrowCF": 0.90, "liquidateCF": 0.93, "liquidationFactor": 0.97, - "supplyCap": "0e18" + "supplyCap": "800e18" }, "wstETH": { "address": "0x5979D7b546E38E414F7E9822514be443A4800529", @@ -48,7 +48,7 @@ "borrowCF": 0.88, "liquidateCF": 0.93, "liquidationFactor": 0.97, - "supplyCap": "0e18" + "supplyCap": "2000e18" } } -} +} \ No newline at end of file diff --git a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts index d15f41d3f..af33f3b1a 100644 --- a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts +++ b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts @@ -177,7 +177,7 @@ export default migration('1713517203_configurate_and_ens', { } ]; - const description = "# Initialize cWETHv3 on Arbitrum\n\n## Proposal summary\n\nCompound Growth Program [AlphaGrowth] proposes deployment of Compound III to the Arbitrum network. This proposal takes the governance steps recommended and necessary to initialize a Compound III WETH market on Arbitrum; upon execution, cWETHv3 will be ready for use. Simulations have confirmed the market’s readiness, as much as possible, using the [Comet scenario suite](https://github.com/compound-finance/comet/tree/main/scenario). The new parameters include setting the risk parameters based off of the [recommendations from Gauntlet](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252/2).\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull/856), [deploy market GitHub action run]() and [forum discussion](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252).\n\n\n## Proposal Actions\n\nThe first proposal action sets the Comet configuration and deploys a new Comet implementation on Arbitrum. This sends the encoded `setFactory`, `setConfiguration`, `deployAndUpgradeTo` calls across the bridge to the governance receiver on Arbitrum. It also calls `setRewardConfig` on the Arbitrum rewards contract, to establish Artitrum’s bridged version of COMP as the reward token for the deployment and set the initial supply speed to be 6 COMP/day and borrow speed to be 4 COMP/day.\n\nThe second action wraps ETH as WETH so it can be then transferred.\n\nThe third action approves (ArbitrumL1GatewayRouter) [TokenMessenger](https://etherscan.io/address/0x72Ce9c846789fdB6fC1f34aC4AD25Dd9ef7031ef) to take the Timelock's WETH on Mainnet, in order to seed the market reserves through the arbitrumL1GatewayRouter.\n\nThe fourth action bridges WETH from mainnet via ‘outboundTransfer’ function on ArbitrumL1GatewayRouter’s contract to mint native WETH to Comet on Arbitrum.\n\nThe fifth action updates the ENS TXT record `v3-official-markets` on `v3-additional-grants.compound-community-licenses.eth`, updating the official markets JSON to include the new Arbitrum cUSDCv3 market.\n"; + const description = "# Initialize cWETHv3 on Arbitrum\n\n## Proposal summary\n\nCompound Growth Program [AlphaGrowth] proposes deployment of Compound III to the Arbitrum network. This proposal takes the governance steps recommended and necessary to initialize a Compound III WETH market on Arbitrum; upon execution, cWETHv3 will be ready for use. Simulations have confirmed the market’s readiness, as much as possible, using the [Comet scenario suite](https://github.com/compound-finance/comet/tree/main/scenario). The new parameters include setting the risk parameters based off of the [recommendations from Gauntlet](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252/2).\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull60), [deploy market GitHub action run](https://github.com/woof-software/comet/actions/runs/9419069237/job/25948008428) and [forum discussion](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252).\n\n\n## Proposal Actions\n\nThe first proposal action sets the Comet configuration and deploys a new Comet implementation on Arbitrum. This sends the encoded `setFactory`, `setConfiguration`, `deployAndUpgradeTo` calls across the bridge to the governance receiver on Arbitrum. It also calls `setRewardConfig` on the Arbitrum rewards contract, to establish Artitrum’s bridged version of COMP as the reward token for the deployment and set the initial supply speed to be 6 COMP/day and borrow speed to be 4 COMP/day.\n\nThe second action wraps ETH as WETH so it can be then transferred.\n\nThe third action approves (ArbitrumL1GatewayRouter) [TokenMessenger](https://etherscan.io/address/0x72Ce9c846789fdB6fC1f34aC4AD25Dd9ef7031ef) to take the Timelock's WETH on Mainnet, in order to seed the market reserves through the arbitrumL1GatewayRouter.\n\nThe fourth action bridges WETH from mainnet via ‘outboundTransfer’ function on ArbitrumL1GatewayRouter’s contract to mint native WETH to Comet on Arbitrum.\n\nThe fifth action updates the ENS TXT record `v3-official-markets` on `v3-additional-grants.compound-community-licenses.eth`, updating the official markets JSON to include the new Arbitrum cWETHv3 market.\n"; const txn = await govDeploymentManager.retry(async () => trace(await governor.propose(...(await proposal(mainnetActions, description)))) ); @@ -211,9 +211,9 @@ export default migration('1713517203_configurate_and_ens', { const weETHInfo = await comet.getAssetInfoByAddress(weETH.address); const rETHInfo = await comet.getAssetInfoByAddress(rETH.address); const wstETHInfo = await comet.getAssetInfoByAddress(wstETH.address); - // expect(weETHInfo.supplyCap).to.be.eq(exp(550, 18)); - // expect(wstETHInfo.supplyCap).to.be.eq(exp(2000, 18)); - // expect(rETHInfo.supplyCap).to.be.eq(exp(800, 18)); + expect(weETHInfo.supplyCap).to.be.eq(exp(550, 18)); + expect(wstETHInfo.supplyCap).to.be.eq(exp(2000, 18)); + expect(rETHInfo.supplyCap).to.be.eq(exp(800, 18)); expect(await comet.pauseGuardian()).to.be.eq('0x78E6317DD6D43DdbDa00Dce32C2CbaFc99361a9d'); @@ -290,7 +290,7 @@ export default migration('1713517203_configurate_and_ens', { }); // 8. - // expect(await comet.baseTrackingSupplySpeed()).to.be.equal(exp(6, 15)); - // expect(await comet.baseTrackingBorrowSpeed()).to.be.equal(exp(4, 15)); + expect(await comet.baseTrackingSupplySpeed()).to.be.equal(exp(6 / 86400, 15, 18)); + expect(await comet.baseTrackingBorrowSpeed()).to.be.equal(exp(4 / 86400, 15, 18)); } }); \ No newline at end of file From 7dcf5424f00e584e985f05fbb4c8be7e4f2289c8 Mon Sep 17 00:00:00 2001 From: Mikhailo Shabodyash Date: Thu, 13 Jun 2024 14:37:05 +0300 Subject: [PATCH 13/14] Update 1716912328_configure_and_ens.ts --- .../arbitrum/weth/migrations/1716912328_configure_and_ens.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts index af33f3b1a..88e9666ec 100644 --- a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts +++ b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts @@ -177,7 +177,7 @@ export default migration('1713517203_configurate_and_ens', { } ]; - const description = "# Initialize cWETHv3 on Arbitrum\n\n## Proposal summary\n\nCompound Growth Program [AlphaGrowth] proposes deployment of Compound III to the Arbitrum network. This proposal takes the governance steps recommended and necessary to initialize a Compound III WETH market on Arbitrum; upon execution, cWETHv3 will be ready for use. Simulations have confirmed the market’s readiness, as much as possible, using the [Comet scenario suite](https://github.com/compound-finance/comet/tree/main/scenario). The new parameters include setting the risk parameters based off of the [recommendations from Gauntlet](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252/2).\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull60), [deploy market GitHub action run](https://github.com/woof-software/comet/actions/runs/9419069237/job/25948008428) and [forum discussion](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252).\n\n\n## Proposal Actions\n\nThe first proposal action sets the Comet configuration and deploys a new Comet implementation on Arbitrum. This sends the encoded `setFactory`, `setConfiguration`, `deployAndUpgradeTo` calls across the bridge to the governance receiver on Arbitrum. It also calls `setRewardConfig` on the Arbitrum rewards contract, to establish Artitrum’s bridged version of COMP as the reward token for the deployment and set the initial supply speed to be 6 COMP/day and borrow speed to be 4 COMP/day.\n\nThe second action wraps ETH as WETH so it can be then transferred.\n\nThe third action approves (ArbitrumL1GatewayRouter) [TokenMessenger](https://etherscan.io/address/0x72Ce9c846789fdB6fC1f34aC4AD25Dd9ef7031ef) to take the Timelock's WETH on Mainnet, in order to seed the market reserves through the arbitrumL1GatewayRouter.\n\nThe fourth action bridges WETH from mainnet via ‘outboundTransfer’ function on ArbitrumL1GatewayRouter’s contract to mint native WETH to Comet on Arbitrum.\n\nThe fifth action updates the ENS TXT record `v3-official-markets` on `v3-additional-grants.compound-community-licenses.eth`, updating the official markets JSON to include the new Arbitrum cWETHv3 market.\n"; + const description = "# Initialize cWETHv3 on Arbitrum\n\n## Proposal summary\n\nCompound Growth Program [AlphaGrowth] proposes deployment of Compound III to the Arbitrum network. This proposal takes the governance steps recommended and necessary to initialize a Compound III WETH market on Arbitrum; upon execution, cWETHv3 will be ready for use. Simulations have confirmed the market’s readiness, as much as possible, using the [Comet scenario suite](https://github.com/compound-finance/comet/tree/main/scenario). The new parameters include setting the risk parameters based off of the [recommendations from Gauntlet](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252/2).\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull/860), [deploy market GitHub action run](https://github.com/woof-software/comet/actions/runs/9419069237/job/25948008428) and [forum discussion](https://www.comp.xyz/t/add-eth-market-on-arbitrum/5252).\n\nThe market migration to create a new WETH Comet market on Arbitrum also includes a new collateral asset weETH which has not been used in any other Compound market previously. In prior analysis of weETH as a collateral asset, Gauntlet identified oracle risks which [could expose the protocol to exaggerated market movements](https://www.comp.xyz/t/add-weeth-market-on-ethereum/5179/3#oracle-risk-7) and a yield risk which could [cause yield shocks and consequentially elevate slippage magnitude and liquidity on DEXs](https://www.comp.xyz/t/add-weeth-market-on-ethereum/5179/3#yield-risk-8).\n\n\n## Proposal Actions\n\nThe first proposal action sets the Comet configuration and deploys a new Comet implementation on Arbitrum. This sends the encoded `setFactory`, `setConfiguration`, `deployAndUpgradeTo` calls across the bridge to the governance receiver on Arbitrum. It also calls `setRewardConfig` on the Arbitrum rewards contract, to establish Artitrum’s bridged version of COMP as the reward token for the deployment and set the initial supply speed to be 6 COMP/day and borrow speed to be 4 COMP/day.\n\nThe second action wraps ETH as WETH so it can be then transferred.\n\nThe third action approves (ArbitrumL1GatewayRouter) [TokenMessenger](https://etherscan.io/address/0x72Ce9c846789fdB6fC1f34aC4AD25Dd9ef7031ef) to take the Timelock's WETH on Mainnet, in order to seed the market reserves through the arbitrumL1GatewayRouter.\n\nThe fourth action bridges WETH from mainnet via ‘outboundTransfer’ function on ArbitrumL1GatewayRouter’s contract to mint native WETH to Comet on Arbitrum.\n\nThe fifth action updates the ENS TXT record `v3-official-markets` on `v3-additional-grants.compound-community-licenses.eth`, updating the official markets JSON to include the new Arbitrum cWETHv3 market.\n"; const txn = await govDeploymentManager.retry(async () => trace(await governor.propose(...(await proposal(mainnetActions, description)))) ); From cb825058b5c66890c12a0dc94b8fb3d7882c0b67 Mon Sep 17 00:00:00 2001 From: Mikhailo Shabodyash Date: Mon, 17 Jun 2024 13:30:05 +0300 Subject: [PATCH 14/14] enacted true: manually added due to migration failure --- .../arbitrum/weth/migrations/1716912328_configure_and_ens.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts index 88e9666ec..57c70b163 100644 --- a/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts +++ b/deployments/arbitrum/weth/migrations/1716912328_configure_and_ens.ts @@ -189,7 +189,7 @@ export default migration('1713517203_configurate_and_ens', { }, async enacted(deploymentManager: DeploymentManager): Promise { - return false; + return true; }, async verify(deploymentManager: DeploymentManager, govDeploymentManager: DeploymentManager) {