Skip to content
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

Migrate Arbitrum Goerli Native usdc #779

Conversation

cwang25
Copy link
Contributor

@cwang25 cwang25 commented Jul 12, 2023

Migration for the Arbitrum goerli native usdc market to initialize supply cap of the markets.

  • Set Comet factory in the Configurator
  • Initialize supply cap of each assets
  • Set reward speed of usdc.e market to 0
  • Seeding reserve usdc via CCTP to native usdc comet

@kevincheng96
Copy link
Contributor

Could be a separate PR, but would be useful to write a script that calls Circle's attestation service to fetch the signed message and post it on-chain to finish bridging USDC on the destination chain.

@cwang25 cwang25 force-pushed the hans/arbitrum-goerli-native-usdc-migration branch from 457b536 to 64b3f28 Compare July 14, 2023 21:10
@cwang25
Copy link
Contributor Author

cwang25 commented Jul 14, 2023

Pasting the proof of scenario passing here. (For some reason the scenario will failed on unverified contract from Linea's bridge contracts in goerli

Screen Shot 2023-07-14 at 3 59 35 PM

@kevincheng96
Copy link
Contributor

Pasting the proof of scenario passing here. (For some reason the scenario will failed on unverified contract from Linea's bridge contracts in goerli

Yeah, that unverified contract looks unrelated to this PR. Linea upgraded their impl but did not verify it. I think it's fine to proceed here.

Copy link
Contributor

@kevincheng96 kevincheng96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevincheng96
Copy link
Contributor

Scripts looks good as well 👍

@cwang25 cwang25 merged commit f91789b into hans/arbitrum-goerli-native-usdc Jul 18, 2023
cwang25 added a commit that referenced this pull request Jul 18, 2023
* initial gen

* remove files

* rename directory

* add scenario

* upadte deploy script

* renamde to usdc.n

* added relations for scenario test

* add scenario test to CI

* add migration scrtips, but just changed the USDC reference address

* update migration script

* since it's native, we shouldn't need usdc bridge things in migration

* try to fix the liquidator scenario errors

* intent

* change those to be 0 initially

* FINALLY scneario passed :D

* don't re-deploy bulker

* set a number in configuration to make bulker tests pass

* set configuration to 0 supply cap for initialization, although it will fail the bulker test

* update liquidity pool to use the one with better liquidity

* after new pool use better liquidity, now able to bump up the volume

* remove v2 rewards config step, crank down borrowMin

* update migration description

* remove trailing newline

* ok need to referencing existing rewards in deploy script to share the rewards'

* naming changes

* added cctp contracts address to roots and update relayArbitrummessage

* add l2 cctp

* depositForBurn() to use CCTP to send native USDC to arbitrum comet

* finally relayArbitrum works with CCTP

* format

* update to turn off bridge market's reward speed

* fix scenarios and slightly reduced volume in liquidator scenarios (somehow during testing the pool the bot uses to flashloan have been withdrew and don't have full liquidity to cover tests

* now it has just enough liquidity to pass the test, reverted the liquidation scenario back to usual amount

* address comments: remove network prefixes, move contract import from deploy to migration scripts, move relay specific contracts to relay script

* remove network prefixes, and rename bridgeComet to usdceComet

* rename/refactor usdc -> usdc.e, and usdc.n -> usdc. Also rename deplyoment name for  to  and  to

* luckily by the time of testing now Jul 6th 1:40PM PST, we have enough liquidity in the uniswap USDC.e:USDC pool to cover the unchanged volume liquidation scenarios test

* rename usdc.n to usdc

* make yarn lint happy

* rename bridged version to .e to match with mainnet

* ported changes to testnet

* update on workflow

* hmm the error is gone

* change default supply reward speed on new comet to be 0

* move migration steps out of this branch

* add readme.md to corner cases when deploy new market on the chain with an existing market already

* add line

* removed USDC in relations

* update version to unblock deploy workerflow for now

* use dummy requested_network id

* try arbitrum goerli network id right away

* change a bit on how it locates the hardhat config base

* remove hardcoded network chain-id

* no more manual wallet project id input

* use env.GOV_NETWORK

* GOV_NETWORK got some errors :[

* try this seacrest with fixes

* try new seacrest :D

* Modified deployment roots from GitHub Actions

* Migrate Arbitrum Goerli Native usdc (#779)

* migration scripts commits

* set supply and borrow speeds to be non zero

* add diff check

* add diff checker

* added comments on checks

* now scenario run is passing, but with the cost of removing linea's contract addresses from goerli/roots.json

* add linea back, but scenario run will fail. But it's not related to arbitrum-goerli

* Upgrade git action to use new seacrest (#782)

* upgrade git action to use new seacrest

* Fix unverified Linea Goerli contract issue (#787)

* addressed comments

* first initial working version of CCTP attestation script to help check with circle attestation status to mint native USDC to destination

* attestation script with sending txn on user behalf

* fix lint

* fix lint

* Modified migration from GitHub Actions

---------

Co-authored-by: Kevin Cheng <[email protected]>
Co-authored-by: GitHub Actions Bot <>

* removed asdf config file that should've been ignored

* add native usdc whale for arbitrum goerli

---------

Co-authored-by: GitHub Actions Bot <>
Co-authored-by: Kevin Cheng <[email protected]>
cwang25 added a commit that referenced this pull request Jul 20, 2023
* initial gen

* remove files

* rename directory

* add scenario

* upadte deploy script

* renamde to usdc.n

* added relations for scenario test

* add scenario test to CI

* add migration scrtips, but just changed the USDC reference address

* update migration script

* since it's native, we shouldn't need usdc bridge things in migration

* try to fix the liquidator scenario errors

* intent

* change those to be 0 initially

* FINALLY scneario passed :D

* don't re-deploy bulker

* set a number in configuration to make bulker tests pass

* set configuration to 0 supply cap for initialization, although it will fail the bulker test

* update liquidity pool to use the one with better liquidity

* after new pool use better liquidity, now able to bump up the volume

* remove v2 rewards config step, crank down borrowMin

* update migration description

* remove trailing newline

* ok need to referencing existing rewards in deploy script to share the rewards'

* naming changes

* added cctp contracts address to roots and update relayArbitrummessage

* add l2 cctp

* depositForBurn() to use CCTP to send native USDC to arbitrum comet

* finally relayArbitrum works with CCTP

* format

* update to turn off bridge market's reward speed

* fix scenarios and slightly reduced volume in liquidator scenarios (somehow during testing the pool the bot uses to flashloan have been withdrew and don't have full liquidity to cover tests

* now it has just enough liquidity to pass the test, reverted the liquidation scenario back to usual amount

* address comments: remove network prefixes, move contract import from deploy to migration scripts, move relay specific contracts to relay script

* remove network prefixes, and rename bridgeComet to usdceComet

* rename/refactor usdc -> usdc.e, and usdc.n -> usdc. Also rename deplyoment name for  to  and  to

* luckily by the time of testing now Jul 6th 1:40PM PST, we have enough liquidity in the uniswap USDC.e:USDC pool to cover the unchanged volume liquidation scenarios test

* rename usdc.n to usdc

* make yarn lint happy

* rename bridged version to .e to match with mainnet

* ported changes to testnet

* update on workflow

* hmm the error is gone

* change default supply reward speed on new comet to be 0

* move migration steps out of this branch

* add readme.md to corner cases when deploy new market on the chain with an existing market already

* add line

* removed USDC in relations

* update version to unblock deploy workerflow for now

* use dummy requested_network id

* try arbitrum goerli network id right away

* change a bit on how it locates the hardhat config base

* remove hardcoded network chain-id

* no more manual wallet project id input

* use env.GOV_NETWORK

* GOV_NETWORK got some errors :[

* try this seacrest with fixes

* try new seacrest :D

* Modified deployment roots from GitHub Actions

* Migrate Arbitrum Goerli Native usdc (#779)

* migration scripts commits

* set supply and borrow speeds to be non zero

* add diff check

* add diff checker

* added comments on checks

* now scenario run is passing, but with the cost of removing linea's contract addresses from goerli/roots.json

* add linea back, but scenario run will fail. But it's not related to arbitrum-goerli

* Upgrade git action to use new seacrest (#782)

* upgrade git action to use new seacrest

* Fix unverified Linea Goerli contract issue (#787)

* addressed comments

* first initial working version of CCTP attestation script to help check with circle attestation status to mint native USDC to destination

* attestation script with sending txn on user behalf

* fix lint

* fix lint

* Modified migration from GitHub Actions

---------

Co-authored-by: Kevin Cheng <[email protected]>
Co-authored-by: GitHub Actions Bot <>

* removed asdf config file that should've been ignored

* add native usdc whale for arbitrum goerli

---------

Co-authored-by: GitHub Actions Bot <>
Co-authored-by: Kevin Cheng <[email protected]>
kevincheng96 added a commit that referenced this pull request Jul 21, 2023
* Deploy Arbitrum goerli for usdc native (#778)

* initial gen

* remove files

* rename directory

* add scenario

* upadte deploy script

* renamde to usdc.n

* added relations for scenario test

* add scenario test to CI

* add migration scrtips, but just changed the USDC reference address

* update migration script

* since it's native, we shouldn't need usdc bridge things in migration

* try to fix the liquidator scenario errors

* intent

* change those to be 0 initially

* FINALLY scneario passed :D

* don't re-deploy bulker

* set a number in configuration to make bulker tests pass

* set configuration to 0 supply cap for initialization, although it will fail the bulker test

* update liquidity pool to use the one with better liquidity

* after new pool use better liquidity, now able to bump up the volume

* remove v2 rewards config step, crank down borrowMin

* update migration description

* remove trailing newline

* ok need to referencing existing rewards in deploy script to share the rewards'

* naming changes

* added cctp contracts address to roots and update relayArbitrummessage

* add l2 cctp

* depositForBurn() to use CCTP to send native USDC to arbitrum comet

* finally relayArbitrum works with CCTP

* format

* update to turn off bridge market's reward speed

* fix scenarios and slightly reduced volume in liquidator scenarios (somehow during testing the pool the bot uses to flashloan have been withdrew and don't have full liquidity to cover tests

* now it has just enough liquidity to pass the test, reverted the liquidation scenario back to usual amount

* address comments: remove network prefixes, move contract import from deploy to migration scripts, move relay specific contracts to relay script

* remove network prefixes, and rename bridgeComet to usdceComet

* rename/refactor usdc -> usdc.e, and usdc.n -> usdc. Also rename deplyoment name for  to  and  to

* luckily by the time of testing now Jul 6th 1:40PM PST, we have enough liquidity in the uniswap USDC.e:USDC pool to cover the unchanged volume liquidation scenarios test

* rename usdc.n to usdc

* make yarn lint happy

* rename bridged version to .e to match with mainnet

* ported changes to testnet

* update on workflow

* hmm the error is gone

* change default supply reward speed on new comet to be 0

* move migration steps out of this branch

* add readme.md to corner cases when deploy new market on the chain with an existing market already

* add line

* removed USDC in relations

* update version to unblock deploy workerflow for now

* use dummy requested_network id

* try arbitrum goerli network id right away

* change a bit on how it locates the hardhat config base

* remove hardcoded network chain-id

* no more manual wallet project id input

* use env.GOV_NETWORK

* GOV_NETWORK got some errors :[

* try this seacrest with fixes

* try new seacrest :D

* Modified deployment roots from GitHub Actions

* Migrate Arbitrum Goerli Native usdc (#779)

* migration scripts commits

* set supply and borrow speeds to be non zero

* add diff check

* add diff checker

* added comments on checks

* now scenario run is passing, but with the cost of removing linea's contract addresses from goerli/roots.json

* add linea back, but scenario run will fail. But it's not related to arbitrum-goerli

* Upgrade git action to use new seacrest (#782)

* upgrade git action to use new seacrest

* Fix unverified Linea Goerli contract issue (#787)

* addressed comments

* first initial working version of CCTP attestation script to help check with circle attestation status to mint native USDC to destination

* attestation script with sending txn on user behalf

* fix lint

* fix lint

* Modified migration from GitHub Actions

---------

Co-authored-by: Kevin Cheng <[email protected]>
Co-authored-by: GitHub Actions Bot <>

* removed asdf config file that should've been ignored

* add native usdc whale for arbitrum goerli

---------

Co-authored-by: GitHub Actions Bot <>
Co-authored-by: Kevin Cheng <[email protected]>

* revert some mixed up changes when extracted from #769

* fix name

* update reference path

* fix lint

* Update hardhat.config.ts

Co-authored-by: Kevin Cheng <[email protected]>

* Update hardhat.config.ts

Co-authored-by: Kevin Cheng <[email protected]>

* fix error

---------

Co-authored-by: Kevin Cheng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants