diff --git a/.github/workflows/deploy-market.yaml b/.github/workflows/deploy-market.yaml index 4c1dd0ead..5f938eb69 100644 --- a/.github/workflows/deploy-market.yaml +++ b/.github/workflows/deploy-market.yaml @@ -36,8 +36,10 @@ jobs: LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }} steps: - name: Seacrest - uses: hayesgm/seacrest@v1 + uses: hayesgm/seacrest@v2 with: + wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }} + requested_network: "${{ inputs.network }}" ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet-eth.compound.finance\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}" port: 8585 if: github.event.inputs.eth_pk == '' diff --git a/.github/workflows/enact-migration.yaml b/.github/workflows/enact-migration.yaml index 9e15d956b..2bda4668c 100644 --- a/.github/workflows/enact-migration.yaml +++ b/.github/workflows/enact-migration.yaml @@ -55,15 +55,19 @@ jobs: esac - name: Seacrest - uses: hayesgm/seacrest@v1 + uses: hayesgm/seacrest@v2 with: + wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }} + requested_network: "${{ inputs.network }}" ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}" port: 8585 if: github.event.inputs.eth_pk == '' - name: Seacrest (governance network) - uses: hayesgm/seacrest@v1 + uses: hayesgm/seacrest@v2 with: + wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }} + requested_network: "${{ env.GOV_NETWORK }}" ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\"}')[env.GOV_NETWORK] }}" port: 8685 if: github.event.inputs.eth_pk == '' && env.GOV_NETWORK != '' diff --git a/.github/workflows/prepare-migration.yaml b/.github/workflows/prepare-migration.yaml index a0e1832d2..76ff21314 100644 --- a/.github/workflows/prepare-migration.yaml +++ b/.github/workflows/prepare-migration.yaml @@ -38,8 +38,10 @@ jobs: LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }} steps: - name: Seacrest - uses: hayesgm/seacrest@v1 + uses: hayesgm/seacrest@v2 with: + wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }} + requested_network: "${{ inputs.network }}" ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}" port: 8585 if: github.event.inputs.eth_pk == '' diff --git a/.github/workflows/run-scenarios.yaml b/.github/workflows/run-scenarios.yaml index 4e954f580..284e720eb 100644 --- a/.github/workflows/run-scenarios.yaml +++ b/.github/workflows/run-scenarios.yaml @@ -2,6 +2,12 @@ name: Run Scenarios on: workflow_dispatch: pull_request: +permissions: + statuses: write + checks: write + contents: write + pull-requests: write + actions: write jobs: run-scenarios: strategy: diff --git a/deployments/polygon/usdc/migrations/1689168483_add_maticx_collateral.ts b/deployments/polygon/usdc/migrations/1689168483_add_maticx_collateral.ts index 77561baba..4605bd976 100644 --- a/deployments/polygon/usdc/migrations/1689168483_add_maticx_collateral.ts +++ b/deployments/polygon/usdc/migrations/1689168483_add_maticx_collateral.ts @@ -49,8 +49,8 @@ export default migration("1689168483_add_maticx_collateral", { priceFeed: maticxPricefeed.address, decimals: await maticx.decimals(), borrowCollateralFactor: exp(0.55, 18), - liquidateCollateralFactor: exp(0.65, 18), - liquidationFactor: exp(0.9, 18), + liquidateCollateralFactor: exp(0.60, 18), + liquidationFactor: exp(0.93, 18), supplyCap: exp(6_000_000, 18), }; @@ -84,7 +84,7 @@ export default migration("1689168483_add_maticx_collateral", { }, ]; - const description = "TODO"; + const description = "# Add MaticX as Collateral to USDCv3 Polygon Market\n\n Using MaticX as a collateral asset has added significant value on other lending platforms like Aave v3 (Polygon) and a popular leveraged staking strategy increasing utilization rates for MATIC. For Compound, MaticX offers a good collateral option because of its extensive use and composability on Polygon.\n\n ## MaticX - Key Reasons to List on Compound\n\n MaticX is deeply integrated with DeFI projects such as Aave and Balancer.\n There is $13M+ liquidity in MaticX based pools cross leading DEXs\n ~34M MaticX supplied on Aave against supply cap of 38M MaticX\n MaticX TVL has grown to 80M+ MATIC steadily ever since its launch in Apr’22.\n There is 20M+ MaticX on Polygon that haven't been deployed on DeFi yet, which offers a large TVL opportunity for Compound\n\n ## Proposed Parameters\n\n Liquidity - MaticX currently has a TVL of 80M+ MATIC staked and total liquidity of $13M+ in MaticX based liquidity pools on ecosystem DEXs with Balancer being the lead along with QuickSwap & MeshSwap.\n This proposal is to set the parameters for MaticX as below based on [Gauntlet's recommendations](https://www.comp.xyz/t/gauntlet-recommendations-stmatic-and-maticx-listing-on-polygon-compound-v3/4397)\n supplyCap: 6,000,000\n borrowCollateralFactor: 55%\n liquidateCollateralFactor: 60%\n liquidationFactor: 93%\n The proposal is to be made from [this pull request](https://github.com/compound-finance/comet/pull/780/files)\n\n ## Background - MaticX\n\n Stader's staking solution for Polygon is MaticX, a liquid staking solution for MATIC. Stader lets users earn MATIC staking rewards and also enables users to participate in other Defi protocols using MaticX while accruing rewards.\n MaticX is a token that represents your share of the total MATIC pool deposited with Stader. As soon as you deposit MATIC on the Stader smart contract, you receive newly minted MaticX, based on the exchange rate at the time of staking. As the MATIC rewards get added the value of MaticX increases (w.r.t MATIC).\n\n Stader for Polygon gives you\n Liquidity through tokenization\n Ease of staking\n MaticX is the only solution that allows users to natively stake their MATIC on Polygon, allowing users to take advantage of the low transaction fee\n\n ## MaticX Security:\n\n Stader on Polygon protocol contracts are dual audited:\n\n [Here](https://staderlabs-docs.s3.amazonaws.com/audits/polygon/StaderLabs_MaticX_Smart_Contract_Security_Audit_Report_Halborn_Final.pdf) is the link to the Audit completed by Halborn\n [Here](https://staderlabs-docs.s3.amazonaws.com/audits/polygon/StaderLabs_maticX_Audit_Report_Immunebytes.pdf) is the link to the Audit completed by Immunebytes\n Stader's contracts for MaticX are controlled by a multi-sig account (0x91B4139A2FAeaCD4CdbFc3F7B1663F91a54be237) managed by the internal as well as external parties. The confirmation count is 3 out of 5 signatures required $1Mn Bug Bounty on [Immunefi](https://immunefi.com/bounty/StaderforPolygon/)\n Ongoing monitoring and on-chain security tracking by [Forta](https://app.forta.network/agents/stader-labs) External multi-sig and time-lock drive the staking contract\n\n ## References\n\n [MaticX Chainlink Oracle Price Feed](https://polygonscan.com/address/0x5d37E4b374E6907de8Fc7fb33EE3b0af403C7403)\n [Polygonscan - MaticX address](https://polygonscan.com/token/0xfa68fb4628dff1028cfec22b4162fccd0d45efb6)\n [Forum Discussion](https://www.comp.xyz/t/listing-maticx-on-compound/4306)\n"; const txn = await govDeploymentManager.retry(async () => trace( await governor.propose(...(await proposal(mainnetActions, description))) @@ -108,8 +108,8 @@ export default migration("1689168483_add_maticx_collateral", { priceFeed: MATICX_PRICE_FEED_ADDRESS, decimals: 18, borrowCollateralFactor: exp(0.55, 18), - liquidateCollateralFactor: exp(0.65, 18), - liquidationFactor: exp(0.9, 18), + liquidateCollateralFactor: exp(0.60, 18), + liquidationFactor: exp(0.93, 18), supplyCap: exp(6_000_000, 18), }; diff --git a/scenario/AddMaticxCollateralScenario.ts b/scenario/AddMaticxCollateralScenario.ts index d0dd9c39f..9d65e85ae 100644 --- a/scenario/AddMaticxCollateralScenario.ts +++ b/scenario/AddMaticxCollateralScenario.ts @@ -56,8 +56,8 @@ scenario( priceFeed: maticxPricefeed.address, decimals: await maticx.decimals(), borrowCollateralFactor: exp(0.55, 18), - liquidateCollateralFactor: exp(0.65, 18), - liquidationFactor: exp(0.9, 18), + liquidateCollateralFactor: exp(0.60, 18), + liquidationFactor: exp(0.93, 18), supplyCap: exp(6_000_000, 18), };