forked from compound-finance/comet
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On-chain proposal v3 USDT market on Polygon #11
Closed
Closed
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c2600b5
feat: usdt market on polygon
EviLord032 97d9704
fix: temporary remove pre-failed proposals
EviLord032 90e34bf
wip
EviLord032 b1be1cd
feat: add new assets
EviLord032 7c3ce91
wip
EviLord032 cd65be1
fix: more clean up
EviLord032 3cdb263
fix
EviLord032 8c57bb8
make code cleaner
dmitriy-woof-software 54dee61
make code cleaner
dmitriy-woof-software ef9038f
make code cleaner
dmitriy-woof-software bafab7e
make eslint work
dmitriy-woof-software ee77acc
Modified deployment roots from GitHub Actions
482b142
feat: add configuration and fix supply scenario
EviLord032 a3e2758
Update 1713283675_configurate_and_ens.ts
EviLord032 a7f585b
Update 1713283675_configurate_and_ens.ts
EviLord032 e192258
fix: update ENS and clean up
MishaShWoof c947c57
fix: more clean up
MishaShWoof f51c536
fix: use maticx instead of apollmaticx
MishaShWoof b93d760
feat: make code cleaner
dmitriy-woof-software File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"name": "Compound USDT", | ||
"symbol": "cUSDTv3", | ||
"baseToken": "USDT", | ||
"baseTokenAddress": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F", | ||
"baseTokenPriceFeed": "0x0A6513e40db6EB1b165753AD52E80663aeA50545", | ||
"borrowMin": "1e6", | ||
"governor": "0xCC3E7c85Bb0EE4f09380e041fee95a0caeDD4a02", | ||
"pauseGuardian": "0x8Ab717CAC3CbC4934E63825B88442F5810aAF6e5", | ||
"storeFrontPriceFactor": 0.6, | ||
"targetReserves": "20000000e6", | ||
"rates": { | ||
"supplyKink": 0.9, | ||
"supplySlopeLow": 0.075, | ||
"supplySlopeHigh": 3.6, | ||
"supplyBase": 0, | ||
"borrowKink": 0.9, | ||
"borrowSlopeLow": 0.0833, | ||
"borrowSlopeHigh": 4.3, | ||
"borrowBase": 0.015 | ||
}, | ||
"tracking": { | ||
"indexScale": "1e15", | ||
"baseSupplySpeed": "0e0", | ||
"baseBorrowSpeed": "0e0", | ||
"baseMinForRewards": "10000e6" | ||
}, | ||
"rewardTokenAddress": "0x8505b9d2254A7Ae468c0E9dd10Ccea3A837aef5c", | ||
"assets": { | ||
"WMATIC": { | ||
"address": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", | ||
"priceFeed": "0xAB594600376Ec9fD91F8e885dADF0CE036862dE0", | ||
"decimals": "18", | ||
"borrowCF": 0.65, | ||
"liquidateCF": 0.80, | ||
"liquidationFactor": 0.85, | ||
"supplyCap": "0e18" | ||
}, | ||
"WETH": { | ||
"address": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619", | ||
"priceFeed": "0xF9680D99D6C9589e2a93a78A04A279e509205945", | ||
"decimals": "18", | ||
"borrowCF": 0.80, | ||
"liquidateCF": 0.85, | ||
"liquidationFactor": 0.95, | ||
"supplyCap": "0e18" | ||
}, | ||
"MaticX": { | ||
"address": "0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6", | ||
"priceFeed": "0x5d37E4b374E6907de8Fc7fb33EE3b0af403C7403", | ||
"decimals": "18", | ||
"borrowCF": 0.60, | ||
"liquidateCF": 0.70, | ||
"liquidationFactor": 0.80, | ||
"supplyCap": "0e18" | ||
}, | ||
"stMATIC": { | ||
"address": "0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4", | ||
"priceFeed": "0x97371dF4492605486e23Da797fA68e55Fc38a13f", | ||
"decimals": "18", | ||
"borrowCF": 0.60, | ||
"liquidateCF": 0.70, | ||
"liquidationFactor": 0.80, | ||
"supplyCap": "0e18" | ||
}, | ||
"WBTC": { | ||
"address": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6", | ||
"priceFeed": "0xDE31F8bFBD8c84b5360CFACCa3539B938dd78ae6", | ||
"decimals": "8", | ||
"borrowCF": 0.75, | ||
"liquidateCF": 0.85, | ||
"liquidationFactor": 0.90, | ||
"supplyCap": "0e8" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Deployed, DeploymentManager } from '../../../plugins/deployment_manager'; | ||
import { DeploySpec, deployComet } from '../../../src/deploy'; | ||
|
||
const HOUR = 60 * 60; | ||
const DAY = 24 * HOUR; | ||
|
||
const MAINNET_TIMELOCK = '0x6d903f6003cca6255d85cca4d3b5e5146dc33925'; | ||
|
||
export default async function deploy(deploymentManager: DeploymentManager, deploySpec: DeploySpec): Promise<Deployed> { | ||
const trace = deploymentManager.tracer() | ||
const ethers = deploymentManager.hre.ethers; | ||
|
||
// pull in existing assets | ||
const USDT = await deploymentManager.existing('USDT', '0xc2132D05D31c914a87C6611C10748AEb04B58e8F', 'polygon'); | ||
const WBTC = await deploymentManager.existing('WBTC', '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6', 'polygon'); | ||
const WETH = await deploymentManager.existing('WETH', '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', 'polygon'); | ||
const WMATIC = await deploymentManager.existing('WMATIC', '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', 'polygon'); | ||
const aPolMATICX = await deploymentManager.existing('aPolMATICX', '0x80cA0d8C38d2e2BcbaB66aA1648Bd1C7160500FE', 'polygon'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update |
||
const stMATIC = await deploymentManager.existing('stMATIC', '0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4', 'polygon'); | ||
const COMP = await deploymentManager.existing('COMP', '0x8505b9d2254A7Ae468c0E9dd10Ccea3A837aef5c', 'polygon'); | ||
|
||
const fxChild = await deploymentManager.existing('fxChild', '0x8397259c983751DAf40400790063935a11afa28a', 'polygon'); | ||
|
||
const cometAdmin = await deploymentManager.fromDep('cometAdmin', 'polygon', 'usdc'); | ||
const cometFactory = await deploymentManager.fromDep('cometFactory', 'polygon', 'usdc'); | ||
const $configuratorImpl = await deploymentManager.fromDep('configurator:implementation', 'polygon', 'usdc'); | ||
const configurator = await deploymentManager.fromDep('configurator', 'polygon', 'usdc'); | ||
const rewards = await deploymentManager.fromDep('rewards', 'polygon', 'usdc'); | ||
const bulker = await deploymentManager.fromDep('bulker', 'polygon', 'usdc'); | ||
const localTimelock = await deploymentManager.fromDep('timelock', 'polygon', 'usdc'); | ||
const bridgeReceiver = await deploymentManager.fromDep('bridgeReceiver', 'polygon', 'usdc'); | ||
|
||
// Deploy Comet | ||
const deployed = await deployComet(deploymentManager, deploySpec); | ||
|
||
return { | ||
...deployed, | ||
bridgeReceiver, | ||
bulker, | ||
fxChild, | ||
rewards, | ||
COMP | ||
}; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove