Skip to content

Commit

Permalink
feat: gnosis activation proposal (bgd-labs#8)
Browse files Browse the repository at this point in the history
* fix: typo

* chore: fix text

* feat: add new e-mode category via the generator

* fix: KEEP_CURRENT_STRING

* fix: emode label

* fix: generator booleanSelect ENABLED DISABLED

* fix: collateral updates code artifacts

* refactor: eModesUpdates

* fix: lint

* fix: generator shadows an existing priceFeedsUpdates var

* fix: v3 config engine rates import generator

* fix: v2 v3 engine rates import generator

* forge install: aave-address-book

v2.8.0

* chore: update address book

* fix: use correct contract an asset listings

- targets bgd-labs#3

* fix: some minor patches

* fix: remapping

* chore: some cleanup

* fix: do not revert when no e-mode category exists on the pool

* feat: initial gnosis listing payload

* chore: update aave-helpers lib

* fix: update payloads and add reports

* fix: tests

* fix: token amount

* feat: add sDAI

* feat: add aip text

* fix: lint

* fix: add more tests

* fix: add sDAI to aip text table

* fix: use forceApprove

* chore: update test block

* fix: ci

* refactor: supply

* fix: make guardian the pool admin

* chore: update aave helpers lib

* Update src/20231026_AaveV3Gnosis_AaveV3GnosisActivation/AaveV3GnosisActivation.md

Co-authored-by: Ernesto Boado <[email protected]>

* fix: update latest risk params

* fix: readme

* chore: check ci

* fix: ci

* fix: script

* fix: update aave helpers

* Update src/20231026_AaveV3Gnosis_AaveV3GnosisActivation/AaveV3GnosisActivation.md

Co-authored-by: Ernesto Boado <[email protected]>

* chore: add deploy address

---------

Co-authored-by: sakulstra <[email protected]>
Co-authored-by: Ernesto Boado <[email protected]>
  • Loading branch information
3 people authored and Rozengarden committed Nov 2, 2023
1 parent 008ac76 commit a2cfc7d
Show file tree
Hide file tree
Showing 18 changed files with 1,916 additions and 30 deletions.
1 change: 1 addition & 0 deletions .assets/380953098cfaf9c52baabfd063712d8e6bcef690.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/541043868751fc5ea1344f681b00906bdf734fdf.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/64a0110786c519e361963abb7399874664375a85.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/b5cb0fd07fde8594230045982589445fc02ace52.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RPC_HARMONY=https://api.harmony.one
RPC_METIS=https://andromeda.metis.io/?owner=1088
RPC_BASE=https://mainnet.base.org
RPC_ZKEVM=https://zkevm-rpc.com
RPC_GNOSIS=https://rpc.gnosischain.com
RPC_GNOSIS=https://rpc.ankr.com/gnosis
RPC_BNB=https://binance.llamarpc.com

# Etherscan api keys for verification & download utils
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
src = 'src'
test = 'tests'
script = 'scripts'
solc = '0.8.19'
out = 'out'
libs = ['lib']
remappings = [
Expand Down
2 changes: 1 addition & 1 deletion generator/utils/importsResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function findMatch(code: string, needle: string) {
}

/**
* @dev Returnes the input string prefixed with imports
* @dev Returns the input string prefixed with imports
* @param code
* @returns
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@bgd-labs/aave-address-book": "^2.8.0",
"@bgd-labs/aave-cli": "0.0.27-454eafdfe0f9813ef73c81bc25457e3efd418c50.0",
"@bgd-labs/aave-cli": "0.0.27-0a01f2a07efe0ec4c875cf479004d20350235f64.0",
"@inquirer/prompts": "^3.2.0",
"commander": "^11.0.0",
"tsx": "^3.13.0",
Expand Down
355 changes: 355 additions & 0 deletions reports/AaveV3Gnosis_AaveV3GnosisActivation_20231026_after.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,355 @@
{
"chainId": 100,
"eModes": {
"1": {
"eModeCategory": 1,
"label": "ETH correlated",
"liquidationBonus": 10100,
"liquidationThreshold": 9300,
"ltv": 9000,
"priceSource": "0x0000000000000000000000000000000000000000"
}
},
"poolConfig": {
"oracle": "0xeb0a051be10228213BAEb449db63719d6742F7c4",
"pool": "0xb50201558B00496A145fE76f7424749556E326D8",
"poolAddressesProvider": "0x36616cf17557639614c1cdDb356b1B83fc0B2132",
"poolConfigurator": "0x7304979ec9E4EaA0273b6A037a31c4e9e5A75D16",
"poolConfiguratorImpl": "0x25Ec457d1778b0E5316e7f38f3c22baF413F1A8C",
"poolImpl": "0xB1532b76D054c9F9E61b25c4d91f69B4133E4671",
"priceOracleSentinel": "0x0000000000000000000000000000000000000000",
"protocolDataProvider": "0x501B4c19dd9C2e06E94dA7b6D5Ed4ddA013EC741"
},
"reserves": {
"0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1": {
"aToken": "0xa818F1B57c201E092C4A2017A91815034326Efd1",
"aTokenImpl": "0x589750BA8aF186cE5B55391B0b7148cAD43a1619",
"aTokenName": "Aave Gnosis WETH",
"aTokenSymbol": "aGnoWETH",
"borrowCap": 3500,
"borrowingEnabled": true,
"debtCeiling": 0,
"decimals": 18,
"eModeCategory": 1,
"interestRateStrategy": "0xD84d86083010FB683f1e8fA3809ee8DC90A4C4DB",
"isActive": true,
"isBorrowableInIsolation": false,
"isFlashloanable": true,
"isFrozen": false,
"isPaused": false,
"isSiloed": false,
"liquidationBonus": 10600,
"liquidationProtocolFee": 1000,
"liquidationThreshold": 7800,
"ltv": 7500,
"oracle": "0xa767f745331D267c7751297D982b050c93985627",
"oracleDecimals": 8,
"oracleDescription": "ETH / USD",
"oracleLatestAnswer": 179974305000,
"reserveFactor": 1500,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x436D82d905b014926a2375C576500B6fea0D2496",
"stableDebtTokenImpl": "0x06C35Cfd3FC61eC2aC437f0d08840d5776b945af",
"stableDebtTokenName": "Aave Gnosis Stable Debt WETH",
"stableDebtTokenSymbol": "stableDebtGnoWETH",
"supplyCap": 4000,
"symbol": "WETH",
"underlying": "0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1",
"usageAsCollateralEnabled": true,
"variableDebtToken": "0x0c0fce05F2314540EcB095bF4D069e5E0ED90fF8",
"variableDebtTokenImpl": "0xBeC519531F0E78BcDdB295242fA4EC5251B38574",
"variableDebtTokenName": "Aave Gnosis Variable Debt WETH",
"variableDebtTokenSymbol": "variableDebtGnoWETH"
},
"0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6": {
"aToken": "0x23e4E76D01B2002BE436CE8d6044b0aA2f68B68a",
"aTokenImpl": "0x589750BA8aF186cE5B55391B0b7148cAD43a1619",
"aTokenName": "Aave Gnosis wstETH",
"aTokenSymbol": "aGnowstETH",
"borrowCap": 400,
"borrowingEnabled": true,
"debtCeiling": 0,
"decimals": 18,
"eModeCategory": 1,
"interestRateStrategy": "0x9E57695Dab0DCdb42BC220ff1E9eb2e22a31209b",
"isActive": true,
"isBorrowableInIsolation": false,
"isFlashloanable": true,
"isFrozen": false,
"isPaused": false,
"isSiloed": false,
"liquidationBonus": 10600,
"liquidationProtocolFee": 1000,
"liquidationThreshold": 7800,
"ltv": 7500,
"oracle": "0xcb0670258e5961CCA85D8F71D29C1167Ef20De99",
"oracleDecimals": 8,
"oracleDescription": "wstETH/ETH/USD",
"oracleLatestAnswer": 206026942495,
"reserveFactor": 1500,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x5CBc43c339F5202D2dcB59583D33cA8498b75031",
"stableDebtTokenImpl": "0x06C35Cfd3FC61eC2aC437f0d08840d5776b945af",
"stableDebtTokenName": "Aave Gnosis Stable Debt wstETH",
"stableDebtTokenSymbol": "stableDebtGnowstETH",
"supplyCap": 4000,
"symbol": "wstETH",
"underlying": "0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6",
"usageAsCollateralEnabled": true,
"variableDebtToken": "0x9D881f67F20B49243c98f53d2B9E91E39d02Ae09",
"variableDebtTokenImpl": "0xBeC519531F0E78BcDdB295242fA4EC5251B38574",
"variableDebtTokenName": "Aave Gnosis Variable Debt wstETH",
"variableDebtTokenSymbol": "variableDebtGnowstETH"
},
"0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb": {
"aToken": "0xA1Fa064A85266E2Ca82DEe5C5CcEC84DF445760e",
"aTokenImpl": "0x589750BA8aF186cE5B55391B0b7148cAD43a1619",
"aTokenName": "Aave Gnosis GNO",
"aTokenSymbol": "aGnoGNO",
"borrowCap": 0,
"borrowingEnabled": false,
"debtCeiling": 100000000,
"decimals": 18,
"eModeCategory": 0,
"interestRateStrategy": "0x9E57695Dab0DCdb42BC220ff1E9eb2e22a31209b",
"isActive": true,
"isBorrowableInIsolation": false,
"isFlashloanable": true,
"isFrozen": false,
"isPaused": false,
"isSiloed": false,
"liquidationBonus": 11000,
"liquidationProtocolFee": 1000,
"liquidationThreshold": 3600,
"ltv": 3100,
"oracle": "0x22441d81416430A54336aB28765abd31a792Ad37",
"oracleDecimals": 8,
"oracleDescription": "GNO / USD",
"oracleLatestAnswer": 10666043400,
"reserveFactor": 1500,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x1A126F613D7705E59ADb39909b25E1223aDF05dd",
"stableDebtTokenImpl": "0x06C35Cfd3FC61eC2aC437f0d08840d5776b945af",
"stableDebtTokenName": "Aave Gnosis Stable Debt GNO",
"stableDebtTokenSymbol": "stableDebtGnoGNO",
"supplyCap": 30000,
"symbol": "GNO",
"underlying": "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb",
"usageAsCollateralEnabled": true,
"variableDebtToken": "0xBc59E99198DbA71985A66E1713cC89FFEC53f7FC",
"variableDebtTokenImpl": "0xBeC519531F0E78BcDdB295242fA4EC5251B38574",
"variableDebtTokenName": "Aave Gnosis Variable Debt GNO",
"variableDebtTokenSymbol": "variableDebtGnoGNO"
},
"0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83": {
"aToken": "0xc6B7AcA6DE8a6044E0e32d0c841a89244A10D284",
"aTokenImpl": "0x589750BA8aF186cE5B55391B0b7148cAD43a1619",
"aTokenName": "Aave Gnosis USDC",
"aTokenSymbol": "aGnoUSDC",
"borrowCap": 1000000,
"borrowingEnabled": true,
"debtCeiling": 0,
"decimals": 6,
"eModeCategory": 0,
"interestRateStrategy": "0x345f7fcd88207fe060AD03c2656A23A3Ab596479",
"isActive": true,
"isBorrowableInIsolation": true,
"isFlashloanable": true,
"isFrozen": false,
"isPaused": false,
"isSiloed": false,
"liquidationBonus": 10500,
"liquidationProtocolFee": 2000,
"liquidationThreshold": 8000,
"ltv": 7700,
"oracle": "0x26C31ac71010aF62E6B486D1132E266D6298857D",
"oracleDecimals": 8,
"oracleDescription": "USDC / USD",
"oracleLatestAnswer": 100005376,
"reserveFactor": 1000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x8220133C3a631de3C7A5B679A2417BD61431FEcf",
"stableDebtTokenImpl": "0x06C35Cfd3FC61eC2aC437f0d08840d5776b945af",
"stableDebtTokenName": "Aave Gnosis Stable Debt USDC",
"stableDebtTokenSymbol": "stableDebtGnoUSDC",
"supplyCap": 1000000,
"symbol": "USDC",
"underlying": "0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83",
"usageAsCollateralEnabled": true,
"variableDebtToken": "0x5F6f7B0a87CA3CF3d0b431Ae03EF3305180BFf4d",
"variableDebtTokenImpl": "0xBeC519531F0E78BcDdB295242fA4EC5251B38574",
"variableDebtTokenName": "Aave Gnosis Variable Debt USDC",
"variableDebtTokenSymbol": "variableDebtGnoUSDC"
},
"0xaf204776c7245bF4147c2612BF6e5972Ee483701": {
"aToken": "0x7a5c3860a77a8DC1b225BD46d0fb2ac1C6D191BC",
"aTokenImpl": "0x589750BA8aF186cE5B55391B0b7148cAD43a1619",
"aTokenName": "Aave Gnosis sDAI",
"aTokenSymbol": "aGnosDAI",
"borrowCap": 0,
"borrowingEnabled": false,
"debtCeiling": 0,
"decimals": 18,
"eModeCategory": 0,
"interestRateStrategy": "0x6c3b7e7B8b9609D57C70C3F630228F979EAbb450",
"isActive": true,
"isBorrowableInIsolation": false,
"isFlashloanable": true,
"isFrozen": false,
"isPaused": false,
"isSiloed": false,
"liquidationBonus": 10500,
"liquidationProtocolFee": 2000,
"liquidationThreshold": 8000,
"ltv": 7700,
"oracle": "0x1D0f881Ce1a646E2f27Dec3c57Fa056cB838BCC2",
"oracleDecimals": 8,
"oracleDescription": "sDAI/DAI/USD",
"oracleLatestAnswer": 102071584,
"reserveFactor": 1000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0xa2E0335175Da40b081717FfD394C0E1de738cb9B",
"stableDebtTokenImpl": "0x06C35Cfd3FC61eC2aC437f0d08840d5776b945af",
"stableDebtTokenName": "Aave Gnosis Stable Debt sDAI",
"stableDebtTokenSymbol": "stableDebtGnosDAI",
"supplyCap": 1500000,
"symbol": "sDAI",
"underlying": "0xaf204776c7245bF4147c2612BF6e5972Ee483701",
"usageAsCollateralEnabled": true,
"variableDebtToken": "0x8Fe06E1D8Aff42Bf6812CacF7854A2249a00bED7",
"variableDebtTokenImpl": "0xBeC519531F0E78BcDdB295242fA4EC5251B38574",
"variableDebtTokenName": "Aave Gnosis Variable Debt sDAI",
"variableDebtTokenSymbol": "variableDebtGnosDAI"
},
"0xcB444e90D8198415266c6a2724b7900fb12FC56E": {
"aToken": "0xEdBC7449a9b594CA4E053D9737EC5Dc4CbCcBfb2",
"aTokenImpl": "0x589750BA8aF186cE5B55391B0b7148cAD43a1619",
"aTokenName": "Aave Gnosis EURe",
"aTokenSymbol": "aGnoEURe",
"borrowCap": 500000,
"borrowingEnabled": true,
"debtCeiling": 0,
"decimals": 18,
"eModeCategory": 0,
"interestRateStrategy": "0x6c3b7e7B8b9609D57C70C3F630228F979EAbb450",
"isActive": true,
"isBorrowableInIsolation": false,
"isFlashloanable": true,
"isFrozen": false,
"isPaused": false,
"isSiloed": false,
"liquidationBonus": 0,
"liquidationProtocolFee": 0,
"liquidationThreshold": 0,
"ltv": 0,
"oracle": "0xab70BCB260073d036d1660201e9d5405F5829b7a",
"oracleDecimals": 8,
"oracleDescription": "EUR / USD",
"oracleLatestAnswer": 106030000,
"reserveFactor": 1500,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x916E13857FeeD0d982Df148DBe8d8542519aB96e",
"stableDebtTokenImpl": "0x06C35Cfd3FC61eC2aC437f0d08840d5776b945af",
"stableDebtTokenName": "Aave Gnosis Stable Debt EURe",
"stableDebtTokenSymbol": "stableDebtGnoEURe",
"supplyCap": 500000,
"symbol": "EURe",
"underlying": "0xcB444e90D8198415266c6a2724b7900fb12FC56E",
"usageAsCollateralEnabled": false,
"variableDebtToken": "0xb96404e475f337A7E98e4a541C9b71309BB66c5A",
"variableDebtTokenImpl": "0xBeC519531F0E78BcDdB295242fA4EC5251B38574",
"variableDebtTokenName": "Aave Gnosis Variable Debt EURe",
"variableDebtTokenSymbol": "variableDebtGnoEURe"
},
"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d": {
"aToken": "0xd0Dd6cEF72143E22cCED4867eb0d5F2328715533",
"aTokenImpl": "0x589750BA8aF186cE5B55391B0b7148cAD43a1619",
"aTokenName": "Aave Gnosis WXDAI",
"aTokenSymbol": "aGnoWXDAI",
"borrowCap": 1500000,
"borrowingEnabled": true,
"debtCeiling": 0,
"decimals": 18,
"eModeCategory": 0,
"interestRateStrategy": "0x345f7fcd88207fe060AD03c2656A23A3Ab596479",
"isActive": true,
"isBorrowableInIsolation": true,
"isFlashloanable": true,
"isFrozen": false,
"isPaused": false,
"isSiloed": false,
"liquidationBonus": 10500,
"liquidationProtocolFee": 2000,
"liquidationThreshold": 8000,
"ltv": 7700,
"oracle": "0x678df3415fc31947dA4324eC63212874be5a82f8",
"oracleDecimals": 8,
"oracleDescription": "DAI / USD",
"oracleLatestAnswer": 100005900,
"reserveFactor": 1000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0xaC8b1cE0548C69318920C3e0b21Db296d5770D57",
"stableDebtTokenImpl": "0x06C35Cfd3FC61eC2aC437f0d08840d5776b945af",
"stableDebtTokenName": "Aave Gnosis Stable Debt WXDAI",
"stableDebtTokenSymbol": "stableDebtGnoWXDAI",
"supplyCap": 1500000,
"symbol": "WXDAI",
"underlying": "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d",
"usageAsCollateralEnabled": true,
"variableDebtToken": "0x281963D7471eCdC3A2Bd4503e24e89691cfe420D",
"variableDebtTokenImpl": "0xBeC519531F0E78BcDdB295242fA4EC5251B38574",
"variableDebtTokenName": "Aave Gnosis Variable Debt WXDAI",
"variableDebtTokenSymbol": "variableDebtGnoWXDAI"
}
},
"strategies": {
"0x345f7fcd88207fe060AD03c2656A23A3Ab596479": {
"baseStableBorrowRate": 60000000000000000000000000,
"baseVariableBorrowRate": 0,
"maxExcessStableToTotalDebtRatio": 800000000000000000000000000,
"maxExcessUsageRatio": 100000000000000000000000000,
"optimalStableToTotalDebtRatio": 200000000000000000000000000,
"optimalUsageRatio": 900000000000000000000000000,
"stableRateSlope1": 50000000000000000000000000,
"stableRateSlope2": 750000000000000000000000000,
"variableRateSlope1": 50000000000000000000000000,
"variableRateSlope2": 750000000000000000000000000
},
"0x6c3b7e7B8b9609D57C70C3F630228F979EAbb450": {
"baseStableBorrowRate": 50000000000000000000000000,
"baseVariableBorrowRate": 0,
"maxExcessStableToTotalDebtRatio": 800000000000000000000000000,
"maxExcessUsageRatio": 100000000000000000000000000,
"optimalStableToTotalDebtRatio": 200000000000000000000000000,
"optimalUsageRatio": 900000000000000000000000000,
"stableRateSlope1": 40000000000000000000000000,
"stableRateSlope2": 750000000000000000000000000,
"variableRateSlope1": 40000000000000000000000000,
"variableRateSlope2": 750000000000000000000000000
},
"0x9E57695Dab0DCdb42BC220ff1E9eb2e22a31209b": {
"baseStableBorrowRate": 90000000000000000000000000,
"baseVariableBorrowRate": 0,
"maxExcessStableToTotalDebtRatio": 800000000000000000000000000,
"maxExcessUsageRatio": 550000000000000000000000000,
"optimalStableToTotalDebtRatio": 200000000000000000000000000,
"optimalUsageRatio": 450000000000000000000000000,
"stableRateSlope1": 70000000000000000000000000,
"stableRateSlope2": 3000000000000000000000000000,
"variableRateSlope1": 70000000000000000000000000,
"variableRateSlope2": 3000000000000000000000000000
},
"0xD84d86083010FB683f1e8fA3809ee8DC90A4C4DB": {
"baseStableBorrowRate": 53000000000000000000000000,
"baseVariableBorrowRate": 0,
"maxExcessStableToTotalDebtRatio": 800000000000000000000000000,
"maxExcessUsageRatio": 200000000000000000000000000,
"optimalStableToTotalDebtRatio": 200000000000000000000000000,
"optimalUsageRatio": 800000000000000000000000000,
"stableRateSlope1": 40000000000000000000000000,
"stableRateSlope2": 800000000000000000000000000,
"variableRateSlope1": 33000000000000000000000000,
"variableRateSlope2": 800000000000000000000000000
}
}
}
Loading

0 comments on commit a2cfc7d

Please sign in to comment.