Skip to content

Commit

Permalink
feat: add speeds/caps; update description
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriy-woof-software committed Jun 22, 2024
1 parent 3ed3db3 commit 3b8cc6e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
14 changes: 7 additions & 7 deletions deployments/polygon/usdt/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
},
"tracking": {
"indexScale": "1e15",
"baseSupplySpeed": "0e0",
"baseBorrowSpeed": "0e0",
"baseSupplySpeed": "92592592592e0",
"baseBorrowSpeed": "46296296296e0",
"baseMinForRewards": "1000e6"
},
"rewardTokenAddress": "0x8505b9d2254A7Ae468c0E9dd10Ccea3A837aef5c",
Expand All @@ -34,7 +34,7 @@
"borrowCF": 0.65,
"liquidateCF": 0.80,
"liquidationFactor": 0.85,
"supplyCap": "0e18"
"supplyCap": "5000000e18"
},
"WETH": {
"address": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
Expand All @@ -43,7 +43,7 @@
"borrowCF": 0.80,
"liquidateCF": 0.85,
"liquidationFactor": 0.95,
"supplyCap": "0e18"
"supplyCap": "2000e18"
},
"MaticX": {
"address": "0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6",
Expand All @@ -52,7 +52,7 @@
"borrowCF": 0.60,
"liquidateCF": 0.70,
"liquidationFactor": 0.80,
"supplyCap": "0e18"
"supplyCap": "2600000e18"
},
"stMATIC": {
"address": "0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4",
Expand All @@ -61,7 +61,7 @@
"borrowCF": 0.60,
"liquidateCF": 0.70,
"liquidationFactor": 0.80,
"supplyCap": "0e18"
"supplyCap": "1500000e18"
},
"WBTC": {
"address": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
Expand All @@ -70,7 +70,7 @@
"borrowCF": 0.75,
"liquidateCF": 0.85,
"liquidationFactor": 0.90,
"supplyCap": "0e8"
"supplyCap": "90e8"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default migration('1713283675_configurate_and_ens', {
}
];

const description = "# Initialize cUSDTv3 on Polygon\n\n## Proposal summary\n\nCompound Growth Program [AlphaGrowth] proposes the deployment of Compound III to the Polygon network. This proposal takes the governance steps recommended and necessary to initialize a Compound III USDT market on Polygon; 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 on the [recommendations from Gauntlet](https://www.comp.xyz/t/add-market-usdt-on-polygon/5190/3).\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull/858), [market deployment action](https://github.com/woof-software/comet/actions/runs/9365232640) and [forum discussion](https://www.comp.xyz/t/add-market-usdt-on-polygon/5190).\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 `setFactory`, `setConfiguration` and `deployAndUpgradeTo` calls across the bridge to the governance receiver on Polygon. It also calls `setRewardConfig` on the Polygon rewards contract, to establish Polygon’s bridged version of COMP as the reward token for the deployment and set the initial supply speed to be 8 COMP/day and borrow speed to be 4 COMP/day.\n\nThe second action reduces Compound [cUSDT](https://etherscan.io/address/0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9) reserves to Timelock, in order to seed the market reserves through the Polygon RootChainManager.\n\nThe third action approves Polygon’s [RootChainManager](https://etherscan.io/address/0xA0c68C638235ee32657e8f720a23ceC1bFc77C77) to take Timelock's USDT, in order to seed the reserves through the bridge.\n\nThe fourth action deposits 10K USDT from mainnet to the Polygon RootChainManager contract to bridge to Comet.\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 Polygon cUSDTv3 market";
const description = "# Initialize cUSDTv3 on Polygon\n\n## Proposal summary\n\nCompound Growth Program [AlphaGrowth] proposes the deployment of Compound III to the Polygon network. This proposal takes the governance steps recommended and necessary to initialize a Compound III USDT market on Polygon; 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 on the [recommendations from Gauntlet](https://www.comp.xyz/t/add-market-usdt-on-polygon/5190/3).\n\nFurther detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull/858), [market deployment action](https://github.com/woof-software/comet/actions/runs/9627561011) and [forum discussion](https://www.comp.xyz/t/add-market-usdt-on-polygon/5190).\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 `setFactory`, `setConfiguration` and `deployAndUpgradeTo` calls across the bridge to the governance receiver on Polygon. It also calls `setRewardConfig` on the Polygon rewards contract, to establish Polygon’s bridged version of COMP as the reward token for the deployment and set the initial supply speed to be 8 COMP/day and borrow speed to be 4 COMP/day.\n\nThe second action reduces Compound [cUSDT](https://etherscan.io/address/0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9) reserves to Timelock, in order to seed the market reserves through the Polygon RootChainManager.\n\nThe third action approves Polygon’s [RootChainManager](https://etherscan.io/address/0xA0c68C638235ee32657e8f720a23ceC1bFc77C77) to take Timelock's USDT, in order to seed the reserves through the bridge.\n\nThe fourth action deposits 10K USDT from mainnet to the Polygon RootChainManager contract to bridge to Comet.\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 Polygon cUSDTv3 market.";
const txn = await govDeploymentManager.retry(async () =>
trace(await governor.propose(...(await proposal(mainnetActions, description))))
);
Expand Down Expand Up @@ -206,25 +206,25 @@ export default migration('1713283675_configurate_and_ens', {
} = await govDeploymentManager.getContracts();

const stateChanges = await diffState(comet, getCometConfig, preMigrationBlockNumber);
// expect(stateChanges).to.deep.equal({
// WMATIC: {
// supplyCap: exp(5_000_000, 18)
// },
// WETH: {
// supplyCap: exp(2_000, 18)
// },
// MaticX: {
// supplyCap: exp(2_600_000, 18),
// },
// stMATIC: {
// supplyCap: exp(1_500_000, 18)
// },
// WBTC: {
// supplyCap: exp(90, 8)
// },
// baseTrackingSupplySpeed: exp(8 / 86400, 15, 18),
// baseTrackingBorrowSpeed: exp(4 / 86400, 15, 18),
// });
expect(stateChanges).to.deep.equal({
WMATIC: {
supplyCap: exp(5_000_000, 18)
},
WETH: {
supplyCap: exp(2_000, 18)
},
MaticX: {
supplyCap: exp(2_600_000, 18),
},
stMATIC: {
supplyCap: exp(1_500_000, 18)
},
WBTC: {
supplyCap: exp(90, 8)
},
baseTrackingSupplySpeed: exp(8 / 86400, 15, 18),
baseTrackingBorrowSpeed: exp(4 / 86400, 15, 18),
});

const config = await rewards.rewardConfig(comet.address);
expect(config.token).to.be.equal(COMP.address);
Expand Down

0 comments on commit 3b8cc6e

Please sign in to comment.