Skip to content

Commit 68cd639

Browse files
Deploy cUSDCv3 on Unichain (#961)
Co-authored-by: dmitriy-woof-software <[email protected]> Co-authored-by: GitHub Actions Bot <>
1 parent 2a132d2 commit 68cd639

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1373
-58
lines changed

.github/workflows/deploy-market.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- base
1515
- optimism
1616
- mantle
17+
- unichain
1718
- scroll
1819
deployment:
1920
description: Deployment Name (e.g. "usdc")
@@ -39,13 +40,14 @@ jobs:
3940
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
4041
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
4142
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
43+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
4244
steps:
4345
- name: Seacrest
44-
uses: hayesgm/seacrest@5748b3a066f517973ca2ca03d0af39bbf2b82d10
46+
uses: hayesgm/seacrest@5c129519f47a472e4924416e56eb74756087b028
4547
with:
4648
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
4749
requested_network: "${{ inputs.network }}"
48-
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
50+
ethereum_url: "${{ fromJSON('{\"unichain\":\"https://multi-boldest-patina.unichain-mainnet.quiknode.pro/${UNICHAIN_QUICKNODE_KEY}\",\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
4951
port: 8585
5052
if: github.event.inputs.eth_pk == ''
5153

.github/workflows/enact-migration.yaml

+8-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- base
1515
- optimism
1616
- mantle
17+
- unichain
1718
- scroll
1819
deployment:
1920
description: Deployment Name (e.g. "usdc")
@@ -56,11 +57,13 @@ jobs:
5657
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
5758
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
5859
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
60+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
61+
GOV_NETWORK: ${{ secrets.GOV_NETWORK }}
5962
steps:
6063
- name: Get governance network
6164
run: |
6265
case ${{ github.event.inputs.network }} in
63-
polygon | arbitrum | base | optimism | mantle | scroll)
66+
polygon | arbitrum | base | optimism | mantle | scroll | unichain)
6467
echo "GOV_NETWORK=mainnet" >> $GITHUB_ENV ;;
6568
sepolia)
6669
echo "GOV_NETWORK=sepolia" >> $GITHUB_ENV ;;
@@ -69,20 +72,20 @@ jobs:
6972
esac
7073
7174
- name: Seacrest
72-
uses: hayesgm/seacrest@42330b57a0554d5b9f4b47b186d483b5e18addbf
75+
uses: hayesgm/seacrest@5c129519f47a472e4924416e56eb74756087b028
7376
with:
7477
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
7578
requested_network: "${{ inputs.network }}"
76-
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
79+
ethereum_url: "${{ fromJSON('{\"unichain\":\"https://multi-boldest-patina.unichain-mainnet.quiknode.pro/${UNICHAIN_QUICKNODE_KEY}\",\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
7780
port: 8585
7881
if: github.event.inputs.eth_pk == ''
7982

8083
- name: Seacrest (governance network)
81-
uses: hayesgm/seacrest@42330b57a0554d5b9f4b47b186d483b5e18addbf
84+
uses: hayesgm/seacrest@5c129519f47a472e4924416e56eb74756087b028
8285
with:
8386
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
8487
requested_network: "${{ env.GOV_NETWORK }}"
85-
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\"}')[env.GOV_NETWORK] }}"
88+
ethereum_url: "${{ fromJSON('{\"unichain\":\"https://multi-boldest-patina.unichain-mainnet.quiknode.pro/${UNICHAIN_QUICKNODE_KEY}\",\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\"}')[env.GOV_NETWORK] }}"
8689
port: 8685
8790
if: github.event.inputs.eth_pk == '' && env.GOV_NETWORK != '' && github.event.inputs.impersonateAccount == ''
8891

.github/workflows/prepare-migration.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- base
1515
- optimism
1616
- mantle
17+
- unichain
1718
- scroll
1819
deployment:
1920
description: Deployment Name (e.g. "usdc")
@@ -42,13 +43,14 @@ jobs:
4243
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
4344
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
4445
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
46+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
4547
steps:
4648
- name: Seacrest
47-
uses: hayesgm/seacrest@5748b3a066f517973ca2ca03d0af39bbf2b82d10
49+
uses: hayesgm/seacrest@5c129519f47a472e4924416e56eb74756087b028
4850
with:
4951
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
5052
requested_network: "${{ inputs.network }}"
51-
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
53+
ethereum_url: "${{ fromJSON('{\"unichain\":\"https://multi-boldest-patina.unichain-mainnet.quiknode.pro/${UNICHAIN_QUICKNODE_KEY}\",\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
5254
port: 8585
5355
if: github.event.inputs.eth_pk == ''
5456

.github/workflows/run-contract-linter.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
1818
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
1919
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
20+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
2021
steps:
2122
- uses: actions/checkout@v4
2223
with:

.github/workflows/run-coverage.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
2020
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
2121
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
22+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
2223
steps:
2324
- name: Checkout repository
2425
uses: actions/checkout@v4

.github/workflows/run-eslint.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
1818
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
1919
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
20+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
2021
steps:
2122
- name: Checkout repository
2223
uses: actions/checkout@v4

.github/workflows/run-forge-tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
3333
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
3434
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
35+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
3536

3637
- name: Build Comet with older solc versions
3738
run: |

.github/workflows/run-gas-profiler.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
1919
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
2020
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
21+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
2122
steps:
2223
- name: Checkout repository
2324
uses: actions/checkout@v4

.github/workflows/run-scenarios.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
bases: [ development, mainnet, mainnet-weth, mainnet-wbtc, mainnet-usdt, mainnet-wsteth, mainnet-usds, sepolia-usdc, sepolia-weth, fuji, polygon, polygon-usdt, arbitrum-usdc.e, arbitrum-usdc, arbitrum-weth, arbitrum-usdt, base-usdbc, base-weth, base-usdc, base-aero, base-usds, optimism-usdc, optimism-usdt, optimism-weth, mantle-usde, scroll-usdc]
10+
bases: [ development, mainnet, mainnet-weth, mainnet-usdt, mainnet-wsteth, mainnet-usds, mainnet-wbtc, sepolia-usdc, sepolia-weth, fuji, polygon, polygon-usdt, arbitrum-usdc.e, arbitrum-usdc, arbitrum-weth, arbitrum-usdt, base-usdbc, base-weth, base-usdc, base-aero, base-usds, optimism-usdc, optimism-usdt, optimism-weth, mantle-usde, scroll-usdc, unichain-usdc]
1111
name: Run scenarios
1212
env:
1313
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
@@ -21,6 +21,7 @@ jobs:
2121
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
2222
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
2323
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
24+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
2425
runs-on: ubuntu-latest
2526
steps:
2627
- name: Checkout repository

.github/workflows/run-semgrep.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
2323
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
2424
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
25+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
2526
container:
2627
# A Docker image with Semgrep installed. Do not change this.
2728
image: returntocorp/semgrep

.github/workflows/run-unit-tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
1818
MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }}
1919
SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }}
20+
UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }}
2021
steps:
2122
- name: Checkout repository
2223
uses: actions/checkout@v4

contracts/IGovernorBravo.sol

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ interface IGovernorBravo {
4949
function MIN_VOTING_DELAY() external view returns (uint256);
5050
function MIN_PROPOSAL_THRESHOLD() external view returns (uint256);
5151

52+
function comp() external view returns (address); // for testnet only
5253
function token() external view returns (address);
5354
function proposalEta(uint256) external view returns (uint256);
5455
function proposalCount() external view returns (uint256);

deployments/mainnet/usdc/relations.ts

+13
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,19 @@ export default {
7979
}
8080
}
8181
},
82+
unichainL1CrossDomainMessenger: {
83+
delegates: {
84+
field: async () => '0xD3494713A5cfaD3F5359379DfA074E2Ac8C6Fd65'
85+
}
86+
},
87+
unichainL1StandardBridge: {
88+
delegates: {
89+
field: {
90+
slot:
91+
'0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc'
92+
}
93+
}
94+
},
8295
scrollMessenger: {
8396
delegates: {
8497
field: {

deployments/mainnet/usdc/roots.json

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
"opL1StandardBridge": "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1",
1717
"mantleL1CrossDomainMessenger": "0x676A795fe6E43C17c668de16730c3F690FEB7120",
1818
"mantleL1StandardBridge": "0x95fC37A27a2f68e3A647CDc081F0A89bb47c3012",
19+
"unichainL1CrossDomainMessenger": "0x9A3D64E386C18Cb1d6d5179a9596A4B5736e98A6",
20+
"unichainL1StandardBridge": "0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA",
1921
"scrollMessenger": "0x6774Bcbd5ceCeF1336b5300fb5186a12DDD8b367",
2022
"scrollL1USDCGateway": "0xf1AF3b23DE0A5Ca3CAb7261cb0061C0D779A5c7B"
2123
}

deployments/relations.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ const relationConfigMap: RelationConfigMap = {
106106
},
107107
relations: {
108108
COMP: {
109-
field: async (governor) => governor.token(),
109+
field: async (governor) => {
110+
if (governor.address === '0x309a862bbC1A00e45506cB8A802D1ff10004c8C0') return governor.token();
111+
return governor.comp();
112+
},
110113
}
111114
}
112115
},

deployments/sepolia/usdc/relations.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,18 @@ export default {
7474
slot: '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc'
7575
}
7676
}
77-
}
77+
},
78+
unichainSepoliaL1CrossDomainMessenger: {
79+
delegates: {
80+
field: async () => '0x61e0DA8FEC03C5e3252D742e78534CE24B82634e'
81+
}
82+
},
83+
unichainSepoliaL1StandardBridge: {
84+
delegates: {
85+
field: {
86+
slot:
87+
'0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc'
88+
}
89+
}
90+
},
7891
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "Compound USDC",
3+
"symbol": "cUSDCv3",
4+
"baseToken": "USDC",
5+
"baseTokenAddress": "0x078D782b760474a361dDA0AF3839290b0EF57AD6",
6+
"borrowMin": "1e6",
7+
"storeFrontPriceFactor": 0.6,
8+
"targetReserves": "20_000_000e6",
9+
"pauseGuardian": "0x6784FC9e931D7d5B1075e665A4016c299ee6C31B",
10+
"rates": {
11+
"borrowBase": 0.015,
12+
"borrowSlopeLow": 0.05,
13+
"borrowKink": 0.9,
14+
"borrowSlopeHigh": 3.4,
15+
"supplyBase": 0,
16+
"supplySlopeLow": 0.054,
17+
"supplyKink": 0.9,
18+
"supplySlopeHigh": 3.034
19+
},
20+
"tracking": {
21+
"indexScale": "1e15",
22+
"baseSupplySpeed": "11574074074e0",
23+
"baseBorrowSpeed": "11574074074e0",
24+
"baseMinForRewards": "10000e6"
25+
},
26+
"assets": {
27+
"UNI": {
28+
"address": "0x8f187aa05619a017077f5308904739877ce9ea21",
29+
"decimals": "18",
30+
"borrowCF": 0.68,
31+
"liquidateCF": 0.74,
32+
"liquidationFactor": 0.83,
33+
"supplyCap": "7000e18"
34+
},
35+
"WETH": {
36+
"address": "0x4200000000000000000000000000000000000006",
37+
"decimals": "18",
38+
"borrowCF": 0.83,
39+
"liquidateCF": 0.90,
40+
"liquidationFactor": 0.95,
41+
"supplyCap": "50e18"
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)