Skip to content

Commit

Permalink
add impersonate; update supply caps and speeds
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriy-woof-software committed Jun 7, 2024
1 parent 75ea41a commit 2883a42
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 18 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/enact-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
16 changes: 8 additions & 8 deletions deployments/mainnet/usdt/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
},
"tracking": {
"indexScale": "1e15",
"baseSupplySpeed": "0e15",
"baseBorrowSpeed": "0e15",
"baseSupplySpeed": "810185185185n",
"baseBorrowSpeed": "578703703703n",
"baseMinForRewards": "1000000e6"
},
"rewardTokenAddress": "0xc00e94Cb662C3520282E6f5717214004A7f26888",
Expand All @@ -34,7 +34,7 @@
"borrowCF": 0.65,
"liquidateCF": 0.70,
"liquidationFactor": 0.75,
"supplyCap": "0e18"
"supplyCap": "100000e18"
},
"WETH": {
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
Expand All @@ -43,15 +43,15 @@
"borrowCF": 0.83,
"liquidateCF": 0.9,
"liquidationFactor": 0.95,
"supplyCap": "0e18"
"supplyCap": "500000e18"
},
"WBTC": {
"address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
"decimals": "8",
"borrowCF": 0.80,
"liquidateCF": 0.85,
"liquidationFactor": 0.95,
"supplyCap": "0e8"
"supplyCap": "18000e8"
},
"UNI": {
"address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
Expand All @@ -60,7 +60,7 @@
"borrowCF": 0.75,
"liquidateCF": 0.81,
"liquidationFactor": 0.85,
"supplyCap": "0e18"
"supplyCap": "3000000e18"
},
"LINK": {
"address": "0x514910771af9ca656af840dff83e8264ecf986ca",
Expand All @@ -69,15 +69,15 @@
"borrowCF": 0.79,
"liquidateCF": 0.85,
"liquidationFactor": 0.93,
"supplyCap": "0e18"
"supplyCap": "2000000e18"
},
"wstETH": {
"address": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
"decimals": "18",
"borrowCF": 0.80,
"liquidateCF": 0.85,
"liquidationFactor": 0.95,
"supplyCap": "0e18"
"supplyCap": "9000e18"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default migration('1713517203_configurate_and_ens', {
}
];

const description = '# Initialize cUSDTv3 on Ethereum Mainnet\n\n## Proposal summary\n\nFranklinDAO team with advice support from Woof Software team proposes deployment of Compound III to the Ethereum Mainnet network. This proposal takes the governance steps recommended and necessary to initialize a Compound III USDT market on Ethereum Mainnet; upon execution, cUSDTv3 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/launch-usdt-market-on-compound-v3-ethereum/4977/5).\n\nFurther detailed information can be found on the corresponding [deployment pull request](https://github.com/compound-finance/comet/pull/<>), [proposal pull request](https://github.com/compound-finance/comet/pull/<>), [deploy market GitHub action run](https://github.com/woof-software/comet/actions/runs/<>) and [forum discussion](https://www.comp.xyz/t/launch-usdt-market-on-compound-v3-ethereum/4977).\n\n\n## Proposal Actions\n\nThe first proposal action sets the CometFactory for the new Comet instance in the existing Configurator.\n\nThe second action configures the Comet instance in the Configurator.\n\nThe third action deploys an instance of the newly configured factory and upgrades the Comet instance to use that implementation.\n\nThe fourth action configures the existing rewards contract for the newly deployed Comet instance.\n\nThe fifth action reduces Compound’s [cUSDT](https://etherscan.io/address/0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9) reserves and transfers it to Timelock, in order to seed the market reserves for the cUSDTv3 Comet.\n\nThe sixth action transfers reserves from Timelock to the cUSDTv3 Comet.\n\nThe seventh 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 Ethereum Mainnet cUSDTv3 market.';
const description = '# Initialize cUSDTv3 on Ethereum Mainnet\n\n## Proposal summary\n\nFranklinDAO team with advice support from Woof Software team proposes deployment of Compound III to the Ethereum Mainnet network. This proposal takes the governance steps recommended and necessary to initialize a Compound III USDT market on Ethereum Mainnet; upon execution, cUSDTv3 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/launch-usdt-market-on-compound-v3-ethereum/4977/5).\n\nFurther detailed information can be found on the corresponding [deployment pull request](https://github.com/compound-finance/comet/pull/861), [proposal pull request](https://github.com/compound-finance/comet/pull/862), [deploy market GitHub action run](https://github.com/woof-software/comet/actions/runs/9421836814/job/25956794627) and [forum discussion](https://www.comp.xyz/t/launch-usdt-market-on-compound-v3-ethereum/4977).\n\n\n## Proposal Actions\n\nThe first proposal action sets the CometFactory for the new Comet instance in the existing Configurator.\n\nThe second action configures the Comet instance in the Configurator.\n\nThe third action deploys an instance of the newly configured factory and upgrades the Comet instance to use that implementation.\n\nThe fourth action configures the existing rewards contract for the newly deployed Comet instance.\n\nThe fifth action reduces Compound’s [cUSDT](https://etherscan.io/address/0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9) reserves and transfers it to Timelock, in order to seed the market reserves for the cUSDTv3 Comet.\n\nThe sixth action transfers reserves from Timelock to the cUSDTv3 Comet.\n\nThe seventh 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 Ethereum Mainnet cUSDTv3 market.';
const txn = await deploymentManager.retry(
async () => trace((await governor.propose(...await proposal(actions, description))))
);
Expand Down Expand Up @@ -140,12 +140,12 @@ export default migration('1713517203_configurate_and_ens', {
const linkInfo = await comet.getAssetInfoByAddress(LINK.address);
const wstETHInfo = await comet.getAssetInfoByAddress(wstETH.address);

// expect(compInfo.supplyCap).to.be.eq(exp(100000, 18));
// expect(wbtcInfo.borrowCap).to.be.eq(exp(18000, 8));
// expect(wethInfo.borrowCap).to.be.eq(exp(500000, 18));
// expect(uniInfo.supplyCap).to.be.eq(exp(3000000, 18));
// expect(linkInfo.supplyCap).to.be.eq(exp(2000000, 18));
// expect(wstETHInfo.supplyCap).to.be.eq(exp(9000, 18));
expect(compInfo.supplyCap).to.be.eq(exp(100000, 18));
expect(wbtcInfo.borrowCap).to.be.eq(exp(18000, 8));
expect(wethInfo.borrowCap).to.be.eq(exp(500000, 18));
expect(uniInfo.supplyCap).to.be.eq(exp(3000000, 18));
expect(linkInfo.supplyCap).to.be.eq(exp(2000000, 18));
expect(wstETHInfo.supplyCap).to.be.eq(exp(9000, 18));

// 4
const config = await rewards.rewardConfig(comet.address);
Expand Down Expand Up @@ -228,7 +228,7 @@ export default migration('1713517203_configurate_and_ens', {
});

// 8.
// expect(await comet.baseTrackingSupplySpeed()).to.be.equal(exp(70 / 86400, 15, 18));
// expect(await comet.baseTrackingBorrowSpeed()).to.be.equal(exp(50 / 86400, 15, 18));
expect(await comet.baseTrackingSupplySpeed()).to.be.equal(exp(70 / 86400, 15, 18));
expect(await comet.baseTrackingBorrowSpeed()).to.be.equal(exp(50 / 86400, 15, 18));
}
});

0 comments on commit 2883a42

Please sign in to comment.