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

Add AIP for GHO Cross-Chain Launch #350

Merged
merged 33 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
24a3f7d
Add proposal for Gho Incident Report 20231113 (#1)
parth-15 Dec 5, 2023
4aa6143
fix: Make new impl constant (#3)
miguelmtzinf Dec 6, 2023
27dd485
fix: Amend AIP text (#4)
miguelmtzinf Dec 6, 2023
2f242a6
test: Tweak default tests with borrow cap update (#5)
miguelmtzinf Dec 7, 2023
4812d01
fix: lint issue (#6)
parth-15 Dec 7, 2023
43a7687
test: Add diffs from test running (#7)
miguelmtzinf Dec 7, 2023
4c79bb9
fix: Add payload address (#8)
miguelmtzinf Dec 7, 2023
76cd4b6
fix: Fix payload address in script (#9)
miguelmtzinf Dec 7, 2023
120f564
fix: Remove unneeded diff file (#10)
miguelmtzinf Dec 7, 2023
4d6a3d9
Merge branch 'bgd-labs:main' into main
miguelmtzinf Dec 13, 2023
4cb8573
Merge branch 'bgd-labs:main' into main
miguelmtzinf Jan 16, 2024
0e39df3
Merge branch 'bgd-labs:main' into main
miguelmtzinf May 28, 2024
f9a83f1
feat: Add AIP code
miguelmtzinf Jun 3, 2024
19c623b
fix: Fix AIP docs and imports
miguelmtzinf Jun 3, 2024
29d4a25
fix: Remove unnecesary test
miguelmtzinf Jun 3, 2024
1aa1fd6
fix: Updates risk params
miguelmtzinf Jun 4, 2024
76283d9
test: Add ccip e2e tests
miguelmtzinf Jun 5, 2024
17eb17c
fix: Fix Arbitrum payload max bytecode size exceeded
miguelmtzinf Jun 6, 2024
06b890f
feat: Add sophisticated defensive aave seed (#13)
miguelmtzinf Jun 10, 2024
a2e9336
fix: Reduce Utils lib bytecode size
miguelmtzinf Jun 10, 2024
3a94184
fix: Fix error in Utils
miguelmtzinf Jun 10, 2024
0c2e4cc
fix: Add Capped gho usd price oracle
miguelmtzinf Jun 10, 2024
fb77e1f
fix: Add AIP draft text
miguelmtzinf Jun 10, 2024
9ab927b
fix: Update block number for tests
miguelmtzinf Jun 11, 2024
14bc98b
fix: Remove unneeded files
miguelmtzinf Jun 11, 2024
345f5e7
fix: Install latest version of gho and ccip repos
miguelmtzinf Jun 11, 2024
e026d39
fix: Remove unused helper function
miguelmtzinf Jun 11, 2024
8d735ec
fix: Fix AIP text
miguelmtzinf Jun 11, 2024
d98dd50
fix: Remove defensive and use create2
miguelmtzinf Jun 12, 2024
1bfb95f
fix: Add fixed price oracle
miguelmtzinf Jun 12, 2024
f055eec
fix: Remove unnecessary memory variables
miguelmtzinf Jun 12, 2024
7bb0504
fix: Use create1 and move listing out
miguelmtzinf Jun 13, 2024
bed1298
fix: Remove listing aip
miguelmtzinf Jun 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .assets/9022a13f2614d3be8c036bc1ad6a4db84543e1df.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/c73865a243e2110291617da971e6614d404cd2c5.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "lib/aave-helpers"]
path = lib/aave-helpers
url = https://github.com/bgd-labs/aave-helpers
[submodule "lib/ccip"]
miguelmtzinf marked this conversation as resolved.
Show resolved Hide resolved
path = lib/ccip
url = https://github.com/aave/ccip
[submodule "lib/gho-core"]
path = lib/gho-core
url = https://github.com/aave/gho-core
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
## Reserve changes

### Reserves added

#### GHO ([0x9124bc807e1e9c79b3225b25D8B77BacB65FE622](https://arbiscan.io/address/0x9124bc807e1e9c79b3225b25D8B77BacB65FE622))

| description | value |
| --- | --- |
| decimals | 18 |
| isActive | true |
| isFrozen | false |
| supplyCap | 1,000,000 GHO |
| borrowCap | 900,000 GHO |
| debtCeiling | 0 $ |
| isSiloed | false |
| isFlashloanable | true |
| eModeCategory | 0 |
| oracle | [0x3c786e934F23375Ca345C9b8D5aD54838796E8e7](https://arbiscan.io/address/0x3c786e934F23375Ca345C9b8D5aD54838796E8e7) |
| oracleDecimals | 8 |
| oracleDescription | GHO / USD |
| oracleLatestAnswer | 1.00055373 |
| usageAsCollateralEnabled | false |
| ltv | 0 % |
| liquidationThreshold | 0 % |
| liquidationBonus | 0 % |
| liquidationProtocolFee | 0 % |
| reserveFactor | 10 % |
| aToken | [0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D](https://arbiscan.io/address/0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D) |
| aTokenImpl | [0x1Be1798b70aEe431c2986f7ff48d9D1fa350786a](https://arbiscan.io/address/0x1Be1798b70aEe431c2986f7ff48d9D1fa350786a) |
| variableDebtToken | [0x18248226C16BF76c032817854E7C83a2113B4f06](https://arbiscan.io/address/0x18248226C16BF76c032817854E7C83a2113B4f06) |
| variableDebtTokenImpl | [0x5E76E98E0963EcDC6A065d1435F84065b7523f39](https://arbiscan.io/address/0x5E76E98E0963EcDC6A065d1435F84065b7523f39) |
| stableDebtToken | [0x687871030477bf974725232F764aa04318A8b9c8](https://arbiscan.io/address/0x687871030477bf974725232F764aa04318A8b9c8) |
| stableDebtTokenImpl | [0x0c2C95b24529664fE55D4437D7A31175CFE6c4f7](https://arbiscan.io/address/0x0c2C95b24529664fE55D4437D7A31175CFE6c4f7) |
| borrowingEnabled | true |
| stableBorrowRateEnabled | false |
| isBorrowableInIsolation | false |
| interestRateStrategy | [0x4011fcd421b9E90f131B164EC1d162DBE269621C](https://arbiscan.io/address/0x4011fcd421b9E90f131B164EC1d162DBE269621C) |
| liquidityIndex | 1 |
| variableBorrowIndex | 1 |
| aTokenName | Aave Arbitrum GHO |
| aTokenSymbol | aArbGHO |
| currentLiquidityRate | 0 % |
| currentVariableBorrowRate | 0 % |
| isPaused | false |
| stableDebtTokenName | Aave Arbitrum Stable Debt GHO |
| stableDebtTokenSymbol | stableDebtArbGHO |
| variableDebtTokenName | Aave Arbitrum Variable Debt GHO |
| variableDebtTokenSymbol | variableDebtArbGHO |
| optimalUsageRatio | 90 % |
| maxExcessStableToTotalDebtRatio | 100 % |
| maxExcessUsageRatio | 10 % |
| optimalStableToTotalDebtRatio | 0 % |
| baseVariableBorrowRate | 0 % |
| variableRateSlope1 | 13 % |
| variableRateSlope2 | 65 % |
| baseStableBorrowRate | 13 % |
| stableRateSlope1 | 0 % |
| stableRateSlope2 | 0 % |
| interestRate | ![ir](/.assets/27f24261be79502c45933baaa28f73a9f1adae83.svg) |


## Raw diff

```json
{
"reserves": {
"0x9124bc807e1e9c79b3225b25D8B77BacB65FE622": {
"from": null,
"to": {
"aToken": "0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D",
"aTokenImpl": "0x1Be1798b70aEe431c2986f7ff48d9D1fa350786a",
"aTokenName": "Aave Arbitrum GHO",
"aTokenSymbol": "aArbGHO",
"borrowCap": 900000,
"borrowingEnabled": true,
"currentLiquidityRate": 0,
"currentVariableBorrowRate": 0,
"debtCeiling": 0,
"decimals": 18,
"eModeCategory": 0,
"interestRateStrategy": "0x4011fcd421b9E90f131B164EC1d162DBE269621C",
"isActive": true,
"isBorrowableInIsolation": false,
"isFlashloanable": true,
"isFrozen": false,
"isPaused": false,
"isSiloed": false,
"liquidationBonus": 0,
"liquidationProtocolFee": 0,
"liquidationThreshold": 0,
"liquidityIndex": "1000000000000000000000000000",
"ltv": 0,
"oracle": "0x3c786e934F23375Ca345C9b8D5aD54838796E8e7",
"oracleDecimals": 8,
"oracleDescription": "GHO / USD",
"oracleLatestAnswer": 100055373,
"reserveFactor": 1000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x687871030477bf974725232F764aa04318A8b9c8",
"stableDebtTokenImpl": "0x0c2C95b24529664fE55D4437D7A31175CFE6c4f7",
"stableDebtTokenName": "Aave Arbitrum Stable Debt GHO",
"stableDebtTokenSymbol": "stableDebtArbGHO",
"supplyCap": 1000000,
"symbol": "GHO",
"underlying": "0x9124bc807e1e9c79b3225b25D8B77BacB65FE622",
"usageAsCollateralEnabled": false,
"variableBorrowIndex": "1000000000000000000000000000",
"variableDebtToken": "0x18248226C16BF76c032817854E7C83a2113B4f06",
"variableDebtTokenImpl": "0x5E76E98E0963EcDC6A065d1435F84065b7523f39",
"variableDebtTokenName": "Aave Arbitrum Variable Debt GHO",
"variableDebtTokenSymbol": "variableDebtArbGHO"
}
}
},
"strategies": {
"0x9124bc807e1e9c79b3225b25D8B77BacB65FE622": {
"from": null,
"to": {
"address": "0x4011fcd421b9E90f131B164EC1d162DBE269621C",
"baseStableBorrowRate": "130000000000000000000000000",
"baseVariableBorrowRate": 0,
"maxExcessStableToTotalDebtRatio": "1000000000000000000000000000",
"maxExcessUsageRatio": "100000000000000000000000000",
"optimalStableToTotalDebtRatio": 0,
"optimalUsageRatio": "900000000000000000000000000",
"stableRateSlope1": 0,
"stableRateSlope2": 0,
"variableRateSlope1": "130000000000000000000000000",
"variableRateSlope2": "650000000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
## Reserve changes

### Reserves added

#### GHO ([0x9124bc807e1e9c79b3225b25D8B77BacB65FE622](https://arbiscan.io/address/0x9124bc807e1e9c79b3225b25D8B77BacB65FE622))

| description | value |
| --- | --- |
| decimals | 18 |
| isActive | true |
| isFrozen | false |
| supplyCap | 1,000,000 GHO |
| borrowCap | 900,000 GHO |
| debtCeiling | 0 $ |
| isSiloed | false |
| isFlashloanable | true |
| eModeCategory | 0 |
| oracle | [0x3c786e934F23375Ca345C9b8D5aD54838796E8e7](https://arbiscan.io/address/0x3c786e934F23375Ca345C9b8D5aD54838796E8e7) |
| oracleDecimals | 8 |
| oracleDescription | GHO / USD |
| oracleLatestAnswer | 1.00055373 |
| usageAsCollateralEnabled | false |
| ltv | 0 % |
| liquidationThreshold | 0 % |
| liquidationBonus | 0 % |
| liquidationProtocolFee | 0 % |
| reserveFactor | 10 % |
| aToken | [0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D](https://arbiscan.io/address/0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D) |
| aTokenImpl | [0x1Be1798b70aEe431c2986f7ff48d9D1fa350786a](https://arbiscan.io/address/0x1Be1798b70aEe431c2986f7ff48d9D1fa350786a) |
| variableDebtToken | [0x18248226C16BF76c032817854E7C83a2113B4f06](https://arbiscan.io/address/0x18248226C16BF76c032817854E7C83a2113B4f06) |
| variableDebtTokenImpl | [0x5E76E98E0963EcDC6A065d1435F84065b7523f39](https://arbiscan.io/address/0x5E76E98E0963EcDC6A065d1435F84065b7523f39) |
| stableDebtToken | [0x687871030477bf974725232F764aa04318A8b9c8](https://arbiscan.io/address/0x687871030477bf974725232F764aa04318A8b9c8) |
| stableDebtTokenImpl | [0x0c2C95b24529664fE55D4437D7A31175CFE6c4f7](https://arbiscan.io/address/0x0c2C95b24529664fE55D4437D7A31175CFE6c4f7) |
| borrowingEnabled | true |
| stableBorrowRateEnabled | false |
| isBorrowableInIsolation | false |
| interestRateStrategy | [0x4011fcd421b9E90f131B164EC1d162DBE269621C](https://arbiscan.io/address/0x4011fcd421b9E90f131B164EC1d162DBE269621C) |
| liquidityIndex | 1 |
| variableBorrowIndex | 1 |
| aTokenName | Aave Arbitrum GHO |
| aTokenSymbol | aArbGHO |
| currentLiquidityRate | 0 % |
| currentVariableBorrowRate | 0 % |
| isPaused | false |
| stableDebtTokenName | Aave Arbitrum Stable Debt GHO |
| stableDebtTokenSymbol | stableDebtArbGHO |
| variableDebtTokenName | Aave Arbitrum Variable Debt GHO |
| variableDebtTokenSymbol | variableDebtArbGHO |
| optimalUsageRatio | 90 % |
| maxExcessStableToTotalDebtRatio | 100 % |
| maxExcessUsageRatio | 10 % |
| optimalStableToTotalDebtRatio | 0 % |
| baseVariableBorrowRate | 0 % |
| variableRateSlope1 | 13 % |
| variableRateSlope2 | 65 % |
| baseStableBorrowRate | 13 % |
| stableRateSlope1 | 0 % |
| stableRateSlope2 | 0 % |
| interestRate | ![ir](/.assets/27f24261be79502c45933baaa28f73a9f1adae83.svg) |


## Raw diff

```json
{
"reserves": {
"0x9124bc807e1e9c79b3225b25D8B77BacB65FE622": {
"from": null,
"to": {
"aToken": "0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D",
"aTokenImpl": "0x1Be1798b70aEe431c2986f7ff48d9D1fa350786a",
"aTokenName": "Aave Arbitrum GHO",
"aTokenSymbol": "aArbGHO",
"borrowCap": 900000,
"borrowingEnabled": true,
"currentLiquidityRate": 0,
"currentVariableBorrowRate": 0,
"debtCeiling": 0,
"decimals": 18,
"eModeCategory": 0,
"interestRateStrategy": "0x4011fcd421b9E90f131B164EC1d162DBE269621C",
"isActive": true,
"isBorrowableInIsolation": false,
"isFlashloanable": true,
"isFrozen": false,
"isPaused": false,
"isSiloed": false,
"liquidationBonus": 0,
"liquidationProtocolFee": 0,
"liquidationThreshold": 0,
"liquidityIndex": "1000000000000000000000000000",
"ltv": 0,
"oracle": "0x3c786e934F23375Ca345C9b8D5aD54838796E8e7",
"oracleDecimals": 8,
"oracleDescription": "GHO / USD",
"oracleLatestAnswer": 100055373,
"reserveFactor": 1000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x687871030477bf974725232F764aa04318A8b9c8",
"stableDebtTokenImpl": "0x0c2C95b24529664fE55D4437D7A31175CFE6c4f7",
"stableDebtTokenName": "Aave Arbitrum Stable Debt GHO",
"stableDebtTokenSymbol": "stableDebtArbGHO",
"supplyCap": 1000000,
"symbol": "GHO",
"underlying": "0x9124bc807e1e9c79b3225b25D8B77BacB65FE622",
"usageAsCollateralEnabled": false,
"variableBorrowIndex": "1000000000000000000000000000",
"variableDebtToken": "0x18248226C16BF76c032817854E7C83a2113B4f06",
"variableDebtTokenImpl": "0x5E76E98E0963EcDC6A065d1435F84065b7523f39",
"variableDebtTokenName": "Aave Arbitrum Variable Debt GHO",
"variableDebtTokenSymbol": "variableDebtArbGHO"
}
}
},
"strategies": {
"0x9124bc807e1e9c79b3225b25D8B77BacB65FE622": {
"from": null,
"to": {
"address": "0x4011fcd421b9E90f131B164EC1d162DBE269621C",
"baseStableBorrowRate": "130000000000000000000000000",
"baseVariableBorrowRate": 0,
"maxExcessStableToTotalDebtRatio": "1000000000000000000000000000",
"maxExcessUsageRatio": "100000000000000000000000000",
"optimalStableToTotalDebtRatio": 0,
"optimalUsageRatio": "900000000000000000000000000",
"stableRateSlope1": 0,
"stableRateSlope2": 0,
"variableRateSlope1": "130000000000000000000000000",
"variableRateSlope2": "650000000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Raw diff

```json
{}
```
1 change: 1 addition & 0 deletions lib/ccip
Submodule ccip added at f0f910
1 change: 1 addition & 0 deletions lib/gho-core
Submodule gho-core added at d8e36c
4 changes: 3 additions & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ aave-v3-core/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-core/
aave-v3-periphery/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-periphery/
ds-test/=lib/aave-helpers/lib/forge-std/lib/ds-test/src/
forge-std/=lib/aave-helpers/lib/forge-std/src/
solidity-utils/=lib/aave-helpers/lib/solidity-utils/src/
solidity-utils/=lib/aave-helpers/lib/solidity-utils/src/
ccip/=lib/ccip/contracts/src/
gho-core/=lib/gho-core/src/contracts/
Loading
Loading