From 141d0f14bc410802525b2bb6dfdb69ad71f79069 Mon Sep 17 00:00:00 2001 From: Jonathan Reem Date: Tue, 25 Apr 2023 21:19:11 -0700 Subject: [PATCH] Add preliminary support for updating emode category parameters with the config engine. --- ...pdate_postTestEngineEModeCategoryUpdate.md | 18 + reports/postTestEngineArbV3.json | 16 +- .../postTestEngineEModeCategoryUpdate.json | 721 ++++++++++++++++++ reports/preTestEngineArbV3.json | 16 +- reports/preTestEngineEModeCategoryUpdate.json | 721 ++++++++++++++++++ src/test/AaveV3ConfigEngineTest.t.sol | 22 + .../AaveV3PolygonEModeCategoryUpdate.sol | 34 + src/v3-config-engine/AaveV3ConfigEngine.sol | 120 ++- src/v3-config-engine/AaveV3PayloadBase.sol | 11 + src/v3-config-engine/EngineFlags.sol | 8 + src/v3-config-engine/IAaveV3ConfigEngine.sol | 27 + 11 files changed, 1692 insertions(+), 22 deletions(-) create mode 100644 diffs/preTestEngineEModeCategoryUpdate_postTestEngineEModeCategoryUpdate.md create mode 100644 reports/postTestEngineEModeCategoryUpdate.json create mode 100644 reports/preTestEngineEModeCategoryUpdate.json create mode 100644 src/test/mocks/AaveV3PolygonEModeCategoryUpdate.sol diff --git a/diffs/preTestEngineEModeCategoryUpdate_postTestEngineEModeCategoryUpdate.md b/diffs/preTestEngineEModeCategoryUpdate_postTestEngineEModeCategoryUpdate.md new file mode 100644 index 000000000..d27185858 --- /dev/null +++ b/diffs/preTestEngineEModeCategoryUpdate_postTestEngineEModeCategoryUpdate.md @@ -0,0 +1,18 @@ +## Raw diff + +```json +{ + "eModes": { + "1": { + "liquidationThreshold": { + "from": 9750, + "to": 9760 + }, + "ltv": { + "from": 9700, + "to": 9740 + } + } + } +} +``` \ No newline at end of file diff --git a/reports/postTestEngineArbV3.json b/reports/postTestEngineArbV3.json index f04b08d3f..768634813 100644 --- a/reports/postTestEngineArbV3.json +++ b/reports/postTestEngineArbV3.json @@ -49,7 +49,7 @@ "oracle": "0x6ce185860a4963106506C203335A2910413708e9", "oracleDecimals": 8, "oracleDescription": "BTC / USD", - "oracleLatestAnswer": 2205356460000, + "oracleLatestAnswer": 2251904551524, "reserveFactor": 2000, "stableBorrowRateEnabled": false, "stableDebtToken": "0x633b207Dd676331c413D4C013a6294B0FE47cD0e", @@ -80,7 +80,7 @@ "liquidationThreshold": 7900, "ltv": 7000, "oracle": "0x230E0321Cf38F09e247e50Afc7801EA2351fe56F", - "oracleLatestAnswer": 172282926283, + "oracleLatestAnswer": 174617740755, "oracleName": "wstETH/stETH/USD", "reserveFactor": 1500, "stableBorrowRateEnabled": false, @@ -114,7 +114,7 @@ "oracle": "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612", "oracleDecimals": 8, "oracleDescription": "ETH / USD", - "oracleLatestAnswer": 154304500000, + "oracleLatestAnswer": 157415620890, "reserveFactor": 1500, "stableBorrowRateEnabled": false, "stableDebtToken": "0xD8Ad37849950903571df17049516a5CD4cbE55F6", @@ -147,7 +147,7 @@ "oracle": "0xA14d53bC1F1c0F31B4aA3BD109344E5009051a84", "oracleDecimals": 8, "oracleDescription": "EUR / USD", - "oracleLatestAnswer": 105964000, + "oracleLatestAnswer": 106790000, "reserveFactor": 1000, "stableBorrowRateEnabled": true, "stableDebtToken": "0xF15F26710c827DDe8ACBA678682F3Ce24f2Fb56E", @@ -180,7 +180,7 @@ "oracle": "0xc5C8E77B397E531B8EC06BFb0048328B30E9eCfB", "oracleDecimals": 8, "oracleDescription": "DAI / USD", - "oracleLatestAnswer": 99992560, + "oracleLatestAnswer": 99980000, "reserveFactor": 1000, "stableBorrowRateEnabled": true, "stableDebtToken": "0xd94112B5B62d53C9402e7A60289c6810dEF1dC9B", @@ -246,7 +246,7 @@ "oracle": "0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7", "oracleDecimals": 8, "oracleDescription": "USDT / USD", - "oracleLatestAnswer": 99995500, + "oracleLatestAnswer": 99987999, "reserveFactor": 1000, "stableBorrowRateEnabled": true, "stableDebtToken": "0x70eFfc565DB6EEf7B927610155602d31b670e802", @@ -279,7 +279,7 @@ "oracle": "0xaD1d5344AaDE45F43E596773Bcc4c423EAbdD034", "oracleDecimals": 8, "oracleDescription": "AAVE / USD", - "oracleLatestAnswer": 7419690000, + "oracleLatestAnswer": 7696586705, "reserveFactor": 0, "stableBorrowRateEnabled": false, "stableDebtToken": "0xfAeF6A702D15428E588d4C0614AEFb4348D83D48", @@ -312,7 +312,7 @@ "oracle": "0x86E53CF1B870786351Da77A57575e79CB55812CB", "oracleDecimals": 8, "oracleDescription": "LINK / USD", - "oracleLatestAnswer": 672437202, + "oracleLatestAnswer": 692105870, "reserveFactor": 2000, "stableBorrowRateEnabled": false, "stableDebtToken": "0x89D976629b7055ff1ca02b927BA3e020F22A44e4", diff --git a/reports/postTestEngineEModeCategoryUpdate.json b/reports/postTestEngineEModeCategoryUpdate.json new file mode 100644 index 000000000..a803dc303 --- /dev/null +++ b/reports/postTestEngineEModeCategoryUpdate.json @@ -0,0 +1,721 @@ +{ + "chainId": 137, + "eModes": { + "1": { + "eModeCategory": 1, + "label": "Stablecoins", + "liquidationBonus": 10100, + "liquidationThreshold": 9760, + "ltv": 9740, + "priceSource": "0x0000000000000000000000000000000000000000" + }, + "2": { + "eModeCategory": 2, + "label": "MATIC correlated", + "liquidationBonus": 10100, + "liquidationThreshold": 9500, + "ltv": 9250, + "priceSource": "0x0000000000000000000000000000000000000000" + } + }, + "poolConfig": { + "oracle": "0xb023e699F5a33916Ea823A16485e259257cA8Bd1", + "pool": "0x794a61358D6845594F94dc1DB02A252b5b4814aD", + "poolAddressesProvider": "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", + "poolConfigurator": "0x8145eddDf43f50276641b55bd3AD95944510021E", + "poolConfiguratorImpl": "0xD6FA681E22306b0F4E605B979b7c9a1dFa865ade", + "poolImpl": "0xDF9e4ABdbd94107932265319479643D3B05809dc", + "protocolDataProvider": "0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654" + }, + "reserves": { + "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a": { + "aToken": "0xc45A479877e1e9Dfe9FcD4056c699575a1045dAA", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 102484, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 4500, + "ltv": 2000, + "oracle": "0x49B0c695039243BBfEb8EcD054EB70061fd54aa0", + "oracleDecimals": 8, + "oracleDescription": "SUSHI / USD", + "oracleLatestAnswer": 121170720, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x78246294a4c6fBf614Ed73CcC9F8b875ca8eE841", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 299320, + "symbol": "SUSHI", + "underlying": "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x34e2eD44EF7466D5f9E0b782B5c08b57475e7907", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270": { + "aToken": "0x6d80113e533a2C0fe82EaBD35f1875DcEA89Ea97", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 39950000, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 2, + "interestRateStrategy": "0xFB0898dCFb69DF9E01DBE625A5988D6542e5BdC5", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 7000, + "ltv": 6500, + "oracle": "0xAB594600376Ec9fD91F8e885dADF0CE036862dE0", + "oracleDecimals": 8, + "oracleDescription": "MATIC / USD", + "oracleLatestAnswer": 113095493, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0xF15F26710c827DDe8ACBA678682F3Ce24f2Fb56E", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 47000000, + "symbol": "WMATIC", + "underlying": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x4a1c3aD6Ed28a636ee1751C69071f6be75DEb8B8", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x172370d5Cd63279eFa6d502DAB29171933a610AF": { + "aToken": "0x513c7E3a9c69cA3e22550eF58AC1C0088e918FFf", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 640437, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8000, + "ltv": 7500, + "oracle": "0x336584C8E6Dc19637A5b36206B1c79923111b405", + "oracleDecimals": 8, + "oracleDescription": "CRV / USD", + "oracleLatestAnswer": 95800000, + "reserveFactor": 1000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x08Cb71192985E936C7Cd166A8b268035e400c3c3", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 937700, + "symbol": "CRV", + "underlying": "0x172370d5Cd63279eFa6d502DAB29171933a610AF", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x77CA01483f379E58174739308945f044e1a764dc", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6": { + "aToken": "0x078f358208685046a11C85e8ad32895DED33A249", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 851, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 8, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10650, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 7500, + "ltv": 7000, + "oracle": "0xc907E116054Ad103354f2D350FD2514433D57F6f", + "oracleDecimals": 8, + "oracleDescription": "BTC / USD", + "oracleLatestAnswer": 2244136000000, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x633b207Dd676331c413D4C013a6294B0FE47cD0e", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 1548, + "symbol": "WBTC", + "underlying": "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x92b42c66840C7AD907b4BF74879FF3eF7c529473", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174": { + "aToken": "0x625E7708f30cA75bfd92586e17077590C60eb4cD", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 100000000, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 6, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": true, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10400, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8500, + "ltv": 8250, + "oracle": "0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7", + "oracleDecimals": 8, + "oracleDescription": "USDC / USD", + "oracleLatestAnswer": 99994500, + "reserveFactor": 1000, + "stableBorrowRateEnabled": true, + "stableDebtToken": "0x307ffe186F84a3bc2613D1eA417A5737D69A7007", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 150000000, + "symbol": "USDC", + "underlying": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xFCCf3cAbbe80101232d343252614b6A3eE81C989", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7": { + "aToken": "0x8Eb270e296023E9D92081fdF967dDd7878724424", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 3234000, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 4500, + "ltv": 2500, + "oracle": "0xDD229Ce42f11D8Ee7fFf29bDB71C7b81352e11be", + "oracleDecimals": 8, + "oracleDescription": "GHST / USD", + "oracleLatestAnswer": 153968584, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x3EF10DFf4928279c004308EbADc4Db8B7620d6fc", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 5876000, + "symbol": "GHST", + "underlying": "0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xCE186F6Cccb0c955445bb9d10C59caE488Fea559", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4": { + "aToken": "0xEA1132120ddcDDA2F119e99Fa7A27a0d036F7Ac9", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 0, + "borrowingEnabled": false, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 2, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 2000, + "liquidationThreshold": 6500, + "ltv": 5000, + "oracle": "0x97371dF4492605486e23Da797fA68e55Fc38a13f", + "oracleDecimals": 8, + "oracleDescription": "Calculated stMATIC / USD", + "oracleLatestAnswer": 120239385, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x1fFD28689DA7d0148ff0fCB669e9f9f0Fc13a219", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 7500000, + "symbol": "stMATIC", + "underlying": "0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x6b030Ff3FB9956B1B69f475B77aE0d3Cf2CC5aFa", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x4e3Decbb3645551B8A19f0eA1678079FCB33fB4c": { + "aToken": "0x6533afac2E7BCCB20dca161449A13A32D391fb00", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 0, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": true, + "isSiloed": false, + "liquidationBonus": 0, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 0, + "ltv": 0, + "oracle": "0x73366Fe0AA0Ded304479862808e02506FE556a98", + "oracleDecimals": 8, + "oracleDescription": "EUR / USD", + "oracleLatestAnswer": 106759000, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x6B4b37618D85Db2a7b469983C888040F7F05Ea3D", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 0, + "symbol": "jEUR", + "underlying": "0x4e3Decbb3645551B8A19f0eA1678079FCB33fB4c", + "usageAsCollateralEnabled": false, + "variableDebtToken": "0x44705f578135cC5d703b4c9c122528C73Eb87145", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39": { + "aToken": "0x191c10Aa4AF7C30e871E70C95dB0E4eb77237530", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 163702, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10750, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 6500, + "ltv": 5000, + "oracle": "0xd9FFdb71EbE7496cC440152d43986Aae0AB76665", + "oracleDecimals": 8, + "oracleDescription": "LINK / USD", + "oracleLatestAnswer": 691600000, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x89D976629b7055ff1ca02b927BA3e020F22A44e4", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 297640, + "symbol": "LINK", + "underlying": "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x953A573793604aF8d41F306FEb8274190dB4aE0e", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619": { + "aToken": "0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 14795, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8250, + "ltv": 8000, + "oracle": "0xF9680D99D6C9589e2a93a78A04A279e509205945", + "oracleDecimals": 8, + "oracleDescription": "ETH / USD", + "oracleLatestAnswer": 156981339277, + "reserveFactor": 1000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0xD8Ad37849950903571df17049516a5CD4cbE55F6", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 26900, + "symbol": "WETH", + "underlying": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x0c84331e39d6658Cd6e6b9ba04736cC4c4734351", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x85955046DF4668e1DD369D2DE9f3AEB98DD2A369": { + "aToken": "0x724dc807b04555b71ed48a6896b6F41593b8C637", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 779, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 4500, + "ltv": 2000, + "oracle": "0x2e48b7924FBe04d575BA229A59b64547d9da16e9", + "oracleDecimals": 8, + "oracleDescription": "DPI / USD", + "oracleLatestAnswer": 8829621299, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0xDC1fad70953Bb3918592b6fCc374fe05F5811B6a", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 1417, + "symbol": "DPI", + "underlying": "0x85955046DF4668e1DD369D2DE9f3AEB98DD2A369", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xf611aEb5013fD2c0511c9CD55c7dc5C1140741A6", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063": { + "aToken": "0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 30000000, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 1, + "interestRateStrategy": "0xA9F3C3caE095527061e6d270DBE163693e6fda9D", + "isActive": true, + "isBorrowableInIsolation": true, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8000, + "ltv": 7500, + "oracle": "0x4746DeC9e833A82EC7C2C1356372CcF2cfcD2F3D", + "oracleDecimals": 8, + "oracleDescription": "DAI / USD", + "oracleLatestAnswer": 99987213, + "reserveFactor": 1000, + "stableBorrowRateEnabled": true, + "stableDebtToken": "0xd94112B5B62d53C9402e7A60289c6810dEF1dC9B", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 45000000, + "symbol": "DAI", + "underlying": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x8619d80FB0141ba7F184CbF22fd724116D9f7ffC", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3": { + "aToken": "0x8ffDf2DE812095b1D19CB146E4c004587C0A0692", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 256140, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x4b8D3277d49E114C8F2D6E0B2eD310e29226fe16", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 4500, + "ltv": 2000, + "oracle": "0xD106B538F2A868c28Ca1Ec7E298C3325E0251d66", + "oracleDecimals": 8, + "oracleDescription": "BAL / USD", + "oracleLatestAnswer": 649789451, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0xa5e408678469d23efDB7694b1B0A85BB0669e8bd", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 361000, + "symbol": "BAL", + "underlying": "0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xA8669021776Bc142DfcA87c21b4A52595bCbB40a", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xD6DF932A45C0f255f85145f286eA0b292B21C90B": { + "aToken": "0xf329e36C7bF6E5E86ce2150875a84Ce77f477375", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 0, + "borrowingEnabled": false, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10750, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 7000, + "ltv": 6000, + "oracle": "0x72484B12719E23115761D5DA1646945632979bB6", + "oracleDecimals": 8, + "oracleDescription": "AAVE / USD", + "oracleLatestAnswer": 7673000000, + "reserveFactor": 0, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0xfAeF6A702D15428E588d4C0614AEFb4348D83D48", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 36820, + "symbol": "AAVE", + "underlying": "0xD6DF932A45C0f255f85145f286eA0b292B21C90B", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xE80761Ea617F66F96274eA5e8c37f03960ecC679", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xE0B52e49357Fd4DAf2c15e02058DCE6BC0057db4": { + "aToken": "0x8437d7C167dFB82ED4Cb79CD44B7a32A1dd95c77", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 0, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 0, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 0, + "ltv": 0, + "oracle": "0x73366Fe0AA0Ded304479862808e02506FE556a98", + "oracleDecimals": 8, + "oracleDescription": "EUR / USD", + "oracleLatestAnswer": 106759000, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x40B4BAEcc69B882e8804f9286b12228C27F8c9BF", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 0, + "symbol": "agEUR", + "underlying": "0xE0B52e49357Fd4DAf2c15e02058DCE6BC0057db4", + "usageAsCollateralEnabled": false, + "variableDebtToken": "0x3ca5FA07689F266e907439aFd1fBB59c44fe12f6", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xE111178A87A3BFf0c8d18DECBa5798827539Ae99": { + "aToken": "0x38d693cE1dF5AaDF7bC62595A37D667aD57922e5", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 947000, + "borrowingEnabled": true, + "debtCeiling": 500000000, + "decimals": 2, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10750, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 7000, + "ltv": 6500, + "oracle": "0x73366Fe0AA0Ded304479862808e02506FE556a98", + "oracleDecimals": 8, + "oracleDescription": "EUR / USD", + "oracleLatestAnswer": 106759000, + "reserveFactor": 1000, + "stableBorrowRateEnabled": true, + "stableDebtToken": "0x8a9FdE6925a839F6B1932d16B36aC026F8d3FbdB", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 4000000, + "symbol": "EURS", + "underlying": "0xE111178A87A3BFf0c8d18DECBa5798827539Ae99", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x5D557B07776D12967914379C71a1310e917C7555", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xa3Fa99A148fA48D14Ed51d610c367C61876997F1": { + "aToken": "0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 600000, + "borrowingEnabled": true, + "debtCeiling": 200000000, + "decimals": 18, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8000, + "ltv": 7500, + "oracle": "0xd8d483d813547CfB624b8Dc33a00F2fcbCd2D428", + "oracleDecimals": 8, + "oracleDescription": "MIMATIC / USD", + "oracleLatestAnswer": 99638912, + "reserveFactor": 1000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x687871030477bf974725232F764aa04318A8b9c8", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 1100000, + "symbol": "miMATIC", + "underlying": "0xa3Fa99A148fA48D14Ed51d610c367C61876997F1", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x18248226C16BF76c032817854E7C83a2113B4f06", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xc2132D05D31c914a87C6611C10748AEb04B58e8F": { + "aToken": "0x6ab707Aca953eDAeFBc4fD23bA73294241490620", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 30000000, + "borrowingEnabled": true, + "debtCeiling": 500000000, + "decimals": 6, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": true, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8000, + "ltv": 7500, + "oracle": "0x0A6513e40db6EB1b165753AD52E80663aeA50545", + "oracleDecimals": 8, + "oracleDescription": "USDT / USD", + "oracleLatestAnswer": 100000000, + "reserveFactor": 1000, + "stableBorrowRateEnabled": true, + "stableDebtToken": "0x70eFfc565DB6EEf7B927610155602d31b670e802", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 45000000, + "symbol": "USDT", + "underlying": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xfb00AC187a8Eb5AFAE4eACE434F493Eb62672df7", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6": { + "aToken": "0x80cA0d8C38d2e2BcbaB66aA1648Bd1C7160500FE", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 0, + "borrowingEnabled": false, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 2, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 2000, + "liquidationThreshold": 6500, + "ltv": 5000, + "oracle": "0x5d37E4b374E6907de8Fc7fb33EE3b0af403C7403", + "oracleDecimals": 8, + "oracleDescription": "Calculated MaticX / USD", + "oracleLatestAnswer": 119458629, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x62fC96b27a510cF4977B59FF952Dc32378Cc221d", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 6000000, + "symbol": "MaticX", + "underlying": "0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xB5b46F918C2923fC7f26DB76e8a6A6e9C4347Cf9", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + } + }, + "strategies": { + "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F": { + "baseStableBorrowRate": 90000000000000000000000000, + "baseVariableBorrowRate": 0, + "maxExcessStableToTotalDebtRatio": 800000000000000000000000000, + "maxExcessUsageRatio": 550000000000000000000000000, + "optimalStableToTotalDebtRatio": 200000000000000000000000000, + "optimalUsageRatio": 450000000000000000000000000, + "stableRateSlope1": 0, + "stableRateSlope2": 0, + "variableRateSlope1": 70000000000000000000000000, + "variableRateSlope2": 3000000000000000000000000000 + }, + "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4": { + "baseStableBorrowRate": 50000000000000000000000000, + "baseVariableBorrowRate": 0, + "maxExcessStableToTotalDebtRatio": 800000000000000000000000000, + "maxExcessUsageRatio": 100000000000000000000000000, + "optimalStableToTotalDebtRatio": 200000000000000000000000000, + "optimalUsageRatio": 900000000000000000000000000, + "stableRateSlope1": 5000000000000000000000000, + "stableRateSlope2": 600000000000000000000000000, + "variableRateSlope1": 40000000000000000000000000, + "variableRateSlope2": 600000000000000000000000000 + }, + "0x4b8D3277d49E114C8F2D6E0B2eD310e29226fe16": { + "baseStableBorrowRate": 160000000000000000000000000, + "baseVariableBorrowRate": 30000000000000000000000000, + "maxExcessStableToTotalDebtRatio": 800000000000000000000000000, + "maxExcessUsageRatio": 200000000000000000000000000, + "optimalStableToTotalDebtRatio": 200000000000000000000000000, + "optimalUsageRatio": 800000000000000000000000000, + "stableRateSlope1": 0, + "stableRateSlope2": 0, + "variableRateSlope1": 140000000000000000000000000, + "variableRateSlope2": 1500000000000000000000000000 + }, + "0xA9F3C3caE095527061e6d270DBE163693e6fda9D": { + "baseStableBorrowRate": 50000000000000000000000000, + "baseVariableBorrowRate": 0, + "maxExcessStableToTotalDebtRatio": 800000000000000000000000000, + "maxExcessUsageRatio": 200000000000000000000000000, + "optimalStableToTotalDebtRatio": 200000000000000000000000000, + "optimalUsageRatio": 800000000000000000000000000, + "stableRateSlope1": 5000000000000000000000000, + "stableRateSlope2": 750000000000000000000000000, + "variableRateSlope1": 40000000000000000000000000, + "variableRateSlope2": 750000000000000000000000000 + }, + "0xFB0898dCFb69DF9E01DBE625A5988D6542e5BdC5": { + "baseStableBorrowRate": 81000000000000000000000000, + "baseVariableBorrowRate": 0, + "maxExcessStableToTotalDebtRatio": 800000000000000000000000000, + "maxExcessUsageRatio": 250000000000000000000000000, + "optimalStableToTotalDebtRatio": 200000000000000000000000000, + "optimalUsageRatio": 750000000000000000000000000, + "stableRateSlope1": 0, + "stableRateSlope2": 0, + "variableRateSlope1": 61000000000000000000000000, + "variableRateSlope2": 1000000000000000000000000000 + } + } +} \ No newline at end of file diff --git a/reports/preTestEngineArbV3.json b/reports/preTestEngineArbV3.json index 3a51781dc..829b6a285 100644 --- a/reports/preTestEngineArbV3.json +++ b/reports/preTestEngineArbV3.json @@ -49,7 +49,7 @@ "oracle": "0x6ce185860a4963106506C203335A2910413708e9", "oracleDecimals": 8, "oracleDescription": "BTC / USD", - "oracleLatestAnswer": 2205356460000, + "oracleLatestAnswer": 2251904551524, "reserveFactor": 2000, "stableBorrowRateEnabled": false, "stableDebtToken": "0x633b207Dd676331c413D4C013a6294B0FE47cD0e", @@ -80,7 +80,7 @@ "liquidationThreshold": 7900, "ltv": 7000, "oracle": "0x230E0321Cf38F09e247e50Afc7801EA2351fe56F", - "oracleLatestAnswer": 172282926283, + "oracleLatestAnswer": 174617740755, "oracleName": "wstETH/stETH/USD", "reserveFactor": 1500, "stableBorrowRateEnabled": false, @@ -114,7 +114,7 @@ "oracle": "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612", "oracleDecimals": 8, "oracleDescription": "ETH / USD", - "oracleLatestAnswer": 154304500000, + "oracleLatestAnswer": 157415620890, "reserveFactor": 1000, "stableBorrowRateEnabled": false, "stableDebtToken": "0xD8Ad37849950903571df17049516a5CD4cbE55F6", @@ -147,7 +147,7 @@ "oracle": "0xA14d53bC1F1c0F31B4aA3BD109344E5009051a84", "oracleDecimals": 8, "oracleDescription": "EUR / USD", - "oracleLatestAnswer": 105964000, + "oracleLatestAnswer": 106790000, "reserveFactor": 1000, "stableBorrowRateEnabled": true, "stableDebtToken": "0xF15F26710c827DDe8ACBA678682F3Ce24f2Fb56E", @@ -180,7 +180,7 @@ "oracle": "0xc5C8E77B397E531B8EC06BFb0048328B30E9eCfB", "oracleDecimals": 8, "oracleDescription": "DAI / USD", - "oracleLatestAnswer": 99992560, + "oracleLatestAnswer": 99980000, "reserveFactor": 1000, "stableBorrowRateEnabled": true, "stableDebtToken": "0xd94112B5B62d53C9402e7A60289c6810dEF1dC9B", @@ -246,7 +246,7 @@ "oracle": "0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7", "oracleDecimals": 8, "oracleDescription": "USDT / USD", - "oracleLatestAnswer": 99995500, + "oracleLatestAnswer": 99987999, "reserveFactor": 1000, "stableBorrowRateEnabled": true, "stableDebtToken": "0x70eFfc565DB6EEf7B927610155602d31b670e802", @@ -279,7 +279,7 @@ "oracle": "0xaD1d5344AaDE45F43E596773Bcc4c423EAbdD034", "oracleDecimals": 8, "oracleDescription": "AAVE / USD", - "oracleLatestAnswer": 7419690000, + "oracleLatestAnswer": 7696586705, "reserveFactor": 0, "stableBorrowRateEnabled": false, "stableDebtToken": "0xfAeF6A702D15428E588d4C0614AEFb4348D83D48", @@ -312,7 +312,7 @@ "oracle": "0x86E53CF1B870786351Da77A57575e79CB55812CB", "oracleDecimals": 8, "oracleDescription": "LINK / USD", - "oracleLatestAnswer": 672437202, + "oracleLatestAnswer": 692105870, "reserveFactor": 2000, "stableBorrowRateEnabled": false, "stableDebtToken": "0x89D976629b7055ff1ca02b927BA3e020F22A44e4", diff --git a/reports/preTestEngineEModeCategoryUpdate.json b/reports/preTestEngineEModeCategoryUpdate.json new file mode 100644 index 000000000..680213651 --- /dev/null +++ b/reports/preTestEngineEModeCategoryUpdate.json @@ -0,0 +1,721 @@ +{ + "chainId": 137, + "eModes": { + "1": { + "eModeCategory": 1, + "label": "Stablecoins", + "liquidationBonus": 10100, + "liquidationThreshold": 9750, + "ltv": 9700, + "priceSource": "0x0000000000000000000000000000000000000000" + }, + "2": { + "eModeCategory": 2, + "label": "MATIC correlated", + "liquidationBonus": 10100, + "liquidationThreshold": 9500, + "ltv": 9250, + "priceSource": "0x0000000000000000000000000000000000000000" + } + }, + "poolConfig": { + "oracle": "0xb023e699F5a33916Ea823A16485e259257cA8Bd1", + "pool": "0x794a61358D6845594F94dc1DB02A252b5b4814aD", + "poolAddressesProvider": "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", + "poolConfigurator": "0x8145eddDf43f50276641b55bd3AD95944510021E", + "poolConfiguratorImpl": "0xD6FA681E22306b0F4E605B979b7c9a1dFa865ade", + "poolImpl": "0xDF9e4ABdbd94107932265319479643D3B05809dc", + "protocolDataProvider": "0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654" + }, + "reserves": { + "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a": { + "aToken": "0xc45A479877e1e9Dfe9FcD4056c699575a1045dAA", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 102484, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 4500, + "ltv": 2000, + "oracle": "0x49B0c695039243BBfEb8EcD054EB70061fd54aa0", + "oracleDecimals": 8, + "oracleDescription": "SUSHI / USD", + "oracleLatestAnswer": 121170720, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x78246294a4c6fBf614Ed73CcC9F8b875ca8eE841", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 299320, + "symbol": "SUSHI", + "underlying": "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x34e2eD44EF7466D5f9E0b782B5c08b57475e7907", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270": { + "aToken": "0x6d80113e533a2C0fe82EaBD35f1875DcEA89Ea97", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 39950000, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 2, + "interestRateStrategy": "0xFB0898dCFb69DF9E01DBE625A5988D6542e5BdC5", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 7000, + "ltv": 6500, + "oracle": "0xAB594600376Ec9fD91F8e885dADF0CE036862dE0", + "oracleDecimals": 8, + "oracleDescription": "MATIC / USD", + "oracleLatestAnswer": 113095493, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0xF15F26710c827DDe8ACBA678682F3Ce24f2Fb56E", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 47000000, + "symbol": "WMATIC", + "underlying": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x4a1c3aD6Ed28a636ee1751C69071f6be75DEb8B8", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x172370d5Cd63279eFa6d502DAB29171933a610AF": { + "aToken": "0x513c7E3a9c69cA3e22550eF58AC1C0088e918FFf", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 640437, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8000, + "ltv": 7500, + "oracle": "0x336584C8E6Dc19637A5b36206B1c79923111b405", + "oracleDecimals": 8, + "oracleDescription": "CRV / USD", + "oracleLatestAnswer": 95800000, + "reserveFactor": 1000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x08Cb71192985E936C7Cd166A8b268035e400c3c3", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 937700, + "symbol": "CRV", + "underlying": "0x172370d5Cd63279eFa6d502DAB29171933a610AF", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x77CA01483f379E58174739308945f044e1a764dc", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6": { + "aToken": "0x078f358208685046a11C85e8ad32895DED33A249", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 851, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 8, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10650, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 7500, + "ltv": 7000, + "oracle": "0xc907E116054Ad103354f2D350FD2514433D57F6f", + "oracleDecimals": 8, + "oracleDescription": "BTC / USD", + "oracleLatestAnswer": 2244136000000, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x633b207Dd676331c413D4C013a6294B0FE47cD0e", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 1548, + "symbol": "WBTC", + "underlying": "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x92b42c66840C7AD907b4BF74879FF3eF7c529473", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174": { + "aToken": "0x625E7708f30cA75bfd92586e17077590C60eb4cD", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 100000000, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 6, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": true, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10400, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8500, + "ltv": 8250, + "oracle": "0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7", + "oracleDecimals": 8, + "oracleDescription": "USDC / USD", + "oracleLatestAnswer": 99994500, + "reserveFactor": 1000, + "stableBorrowRateEnabled": true, + "stableDebtToken": "0x307ffe186F84a3bc2613D1eA417A5737D69A7007", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 150000000, + "symbol": "USDC", + "underlying": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xFCCf3cAbbe80101232d343252614b6A3eE81C989", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7": { + "aToken": "0x8Eb270e296023E9D92081fdF967dDd7878724424", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 3234000, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 4500, + "ltv": 2500, + "oracle": "0xDD229Ce42f11D8Ee7fFf29bDB71C7b81352e11be", + "oracleDecimals": 8, + "oracleDescription": "GHST / USD", + "oracleLatestAnswer": 153968584, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x3EF10DFf4928279c004308EbADc4Db8B7620d6fc", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 5876000, + "symbol": "GHST", + "underlying": "0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xCE186F6Cccb0c955445bb9d10C59caE488Fea559", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4": { + "aToken": "0xEA1132120ddcDDA2F119e99Fa7A27a0d036F7Ac9", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 0, + "borrowingEnabled": false, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 2, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 2000, + "liquidationThreshold": 6500, + "ltv": 5000, + "oracle": "0x97371dF4492605486e23Da797fA68e55Fc38a13f", + "oracleDecimals": 8, + "oracleDescription": "Calculated stMATIC / USD", + "oracleLatestAnswer": 120239385, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x1fFD28689DA7d0148ff0fCB669e9f9f0Fc13a219", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 7500000, + "symbol": "stMATIC", + "underlying": "0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x6b030Ff3FB9956B1B69f475B77aE0d3Cf2CC5aFa", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x4e3Decbb3645551B8A19f0eA1678079FCB33fB4c": { + "aToken": "0x6533afac2E7BCCB20dca161449A13A32D391fb00", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 0, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": true, + "isSiloed": false, + "liquidationBonus": 0, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 0, + "ltv": 0, + "oracle": "0x73366Fe0AA0Ded304479862808e02506FE556a98", + "oracleDecimals": 8, + "oracleDescription": "EUR / USD", + "oracleLatestAnswer": 106759000, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x6B4b37618D85Db2a7b469983C888040F7F05Ea3D", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 0, + "symbol": "jEUR", + "underlying": "0x4e3Decbb3645551B8A19f0eA1678079FCB33fB4c", + "usageAsCollateralEnabled": false, + "variableDebtToken": "0x44705f578135cC5d703b4c9c122528C73Eb87145", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39": { + "aToken": "0x191c10Aa4AF7C30e871E70C95dB0E4eb77237530", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 163702, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10750, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 6500, + "ltv": 5000, + "oracle": "0xd9FFdb71EbE7496cC440152d43986Aae0AB76665", + "oracleDecimals": 8, + "oracleDescription": "LINK / USD", + "oracleLatestAnswer": 691600000, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x89D976629b7055ff1ca02b927BA3e020F22A44e4", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 297640, + "symbol": "LINK", + "underlying": "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x953A573793604aF8d41F306FEb8274190dB4aE0e", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619": { + "aToken": "0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 14795, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8250, + "ltv": 8000, + "oracle": "0xF9680D99D6C9589e2a93a78A04A279e509205945", + "oracleDecimals": 8, + "oracleDescription": "ETH / USD", + "oracleLatestAnswer": 156981339277, + "reserveFactor": 1000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0xD8Ad37849950903571df17049516a5CD4cbE55F6", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 26900, + "symbol": "WETH", + "underlying": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x0c84331e39d6658Cd6e6b9ba04736cC4c4734351", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x85955046DF4668e1DD369D2DE9f3AEB98DD2A369": { + "aToken": "0x724dc807b04555b71ed48a6896b6F41593b8C637", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 779, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 4500, + "ltv": 2000, + "oracle": "0x2e48b7924FBe04d575BA229A59b64547d9da16e9", + "oracleDecimals": 8, + "oracleDescription": "DPI / USD", + "oracleLatestAnswer": 8829621299, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0xDC1fad70953Bb3918592b6fCc374fe05F5811B6a", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 1417, + "symbol": "DPI", + "underlying": "0x85955046DF4668e1DD369D2DE9f3AEB98DD2A369", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xf611aEb5013fD2c0511c9CD55c7dc5C1140741A6", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063": { + "aToken": "0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 30000000, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 1, + "interestRateStrategy": "0xA9F3C3caE095527061e6d270DBE163693e6fda9D", + "isActive": true, + "isBorrowableInIsolation": true, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8000, + "ltv": 7500, + "oracle": "0x4746DeC9e833A82EC7C2C1356372CcF2cfcD2F3D", + "oracleDecimals": 8, + "oracleDescription": "DAI / USD", + "oracleLatestAnswer": 99987213, + "reserveFactor": 1000, + "stableBorrowRateEnabled": true, + "stableDebtToken": "0xd94112B5B62d53C9402e7A60289c6810dEF1dC9B", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 45000000, + "symbol": "DAI", + "underlying": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x8619d80FB0141ba7F184CbF22fd724116D9f7ffC", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3": { + "aToken": "0x8ffDf2DE812095b1D19CB146E4c004587C0A0692", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 256140, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x4b8D3277d49E114C8F2D6E0B2eD310e29226fe16", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 4500, + "ltv": 2000, + "oracle": "0xD106B538F2A868c28Ca1Ec7E298C3325E0251d66", + "oracleDecimals": 8, + "oracleDescription": "BAL / USD", + "oracleLatestAnswer": 649789451, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0xa5e408678469d23efDB7694b1B0A85BB0669e8bd", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 361000, + "symbol": "BAL", + "underlying": "0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xA8669021776Bc142DfcA87c21b4A52595bCbB40a", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xD6DF932A45C0f255f85145f286eA0b292B21C90B": { + "aToken": "0xf329e36C7bF6E5E86ce2150875a84Ce77f477375", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 0, + "borrowingEnabled": false, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 0, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10750, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 7000, + "ltv": 6000, + "oracle": "0x72484B12719E23115761D5DA1646945632979bB6", + "oracleDecimals": 8, + "oracleDescription": "AAVE / USD", + "oracleLatestAnswer": 7673000000, + "reserveFactor": 0, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0xfAeF6A702D15428E588d4C0614AEFb4348D83D48", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 36820, + "symbol": "AAVE", + "underlying": "0xD6DF932A45C0f255f85145f286eA0b292B21C90B", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xE80761Ea617F66F96274eA5e8c37f03960ecC679", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xE0B52e49357Fd4DAf2c15e02058DCE6BC0057db4": { + "aToken": "0x8437d7C167dFB82ED4Cb79CD44B7a32A1dd95c77", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 0, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 0, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 0, + "ltv": 0, + "oracle": "0x73366Fe0AA0Ded304479862808e02506FE556a98", + "oracleDecimals": 8, + "oracleDescription": "EUR / USD", + "oracleLatestAnswer": 106759000, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x40B4BAEcc69B882e8804f9286b12228C27F8c9BF", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 0, + "symbol": "agEUR", + "underlying": "0xE0B52e49357Fd4DAf2c15e02058DCE6BC0057db4", + "usageAsCollateralEnabled": false, + "variableDebtToken": "0x3ca5FA07689F266e907439aFd1fBB59c44fe12f6", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xE111178A87A3BFf0c8d18DECBa5798827539Ae99": { + "aToken": "0x38d693cE1dF5AaDF7bC62595A37D667aD57922e5", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 947000, + "borrowingEnabled": true, + "debtCeiling": 500000000, + "decimals": 2, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10750, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 7000, + "ltv": 6500, + "oracle": "0x73366Fe0AA0Ded304479862808e02506FE556a98", + "oracleDecimals": 8, + "oracleDescription": "EUR / USD", + "oracleLatestAnswer": 106759000, + "reserveFactor": 1000, + "stableBorrowRateEnabled": true, + "stableDebtToken": "0x8a9FdE6925a839F6B1932d16B36aC026F8d3FbdB", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 4000000, + "symbol": "EURS", + "underlying": "0xE111178A87A3BFf0c8d18DECBa5798827539Ae99", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x5D557B07776D12967914379C71a1310e917C7555", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xa3Fa99A148fA48D14Ed51d610c367C61876997F1": { + "aToken": "0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 600000, + "borrowingEnabled": true, + "debtCeiling": 200000000, + "decimals": 18, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8000, + "ltv": 7500, + "oracle": "0xd8d483d813547CfB624b8Dc33a00F2fcbCd2D428", + "oracleDecimals": 8, + "oracleDescription": "MIMATIC / USD", + "oracleLatestAnswer": 99638912, + "reserveFactor": 1000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x687871030477bf974725232F764aa04318A8b9c8", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 1100000, + "symbol": "miMATIC", + "underlying": "0xa3Fa99A148fA48D14Ed51d610c367C61876997F1", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x18248226C16BF76c032817854E7C83a2113B4f06", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xc2132D05D31c914a87C6611C10748AEb04B58e8F": { + "aToken": "0x6ab707Aca953eDAeFBc4fD23bA73294241490620", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 30000000, + "borrowingEnabled": true, + "debtCeiling": 500000000, + "decimals": 6, + "eModeCategory": 1, + "interestRateStrategy": "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4", + "isActive": true, + "isBorrowableInIsolation": true, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 10500, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 8000, + "ltv": 7500, + "oracle": "0x0A6513e40db6EB1b165753AD52E80663aeA50545", + "oracleDecimals": 8, + "oracleDescription": "USDT / USD", + "oracleLatestAnswer": 100000000, + "reserveFactor": 1000, + "stableBorrowRateEnabled": true, + "stableDebtToken": "0x70eFfc565DB6EEf7B927610155602d31b670e802", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 45000000, + "symbol": "USDT", + "underlying": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xfb00AC187a8Eb5AFAE4eACE434F493Eb62672df7", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + }, + "0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6": { + "aToken": "0x80cA0d8C38d2e2BcbaB66aA1648Bd1C7160500FE", + "aTokenImpl": "0xa5ba6E5EC19a1Bf23C857991c857dB62b2Aa187B", + "borrowCap": 0, + "borrowingEnabled": false, + "debtCeiling": 0, + "decimals": 18, + "eModeCategory": 2, + "interestRateStrategy": "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": false, + "isFrozen": false, + "isSiloed": false, + "liquidationBonus": 11000, + "liquidationProtocolFee": 2000, + "liquidationThreshold": 6500, + "ltv": 5000, + "oracle": "0x5d37E4b374E6907de8Fc7fb33EE3b0af403C7403", + "oracleDecimals": 8, + "oracleDescription": "Calculated MaticX / USD", + "oracleLatestAnswer": 119458629, + "reserveFactor": 2000, + "stableBorrowRateEnabled": false, + "stableDebtToken": "0x62fC96b27a510cF4977B59FF952Dc32378Cc221d", + "stableDebtTokenImpl": "0x52A1CeB68Ee6b7B5D13E0376A1E0E4423A8cE26e", + "supplyCap": 6000000, + "symbol": "MaticX", + "underlying": "0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0xB5b46F918C2923fC7f26DB76e8a6A6e9C4347Cf9", + "variableDebtTokenImpl": "0x81387c40EB75acB02757C1Ae55D5936E78c9dEd3" + } + }, + "strategies": { + "0x03733F4E008d36f2e37F0080fF1c8DF756622E6F": { + "baseStableBorrowRate": 90000000000000000000000000, + "baseVariableBorrowRate": 0, + "maxExcessStableToTotalDebtRatio": 800000000000000000000000000, + "maxExcessUsageRatio": 550000000000000000000000000, + "optimalStableToTotalDebtRatio": 200000000000000000000000000, + "optimalUsageRatio": 450000000000000000000000000, + "stableRateSlope1": 0, + "stableRateSlope2": 0, + "variableRateSlope1": 70000000000000000000000000, + "variableRateSlope2": 3000000000000000000000000000 + }, + "0x41B66b4b6b4c9dab039d96528D1b88f7BAF8C5A4": { + "baseStableBorrowRate": 50000000000000000000000000, + "baseVariableBorrowRate": 0, + "maxExcessStableToTotalDebtRatio": 800000000000000000000000000, + "maxExcessUsageRatio": 100000000000000000000000000, + "optimalStableToTotalDebtRatio": 200000000000000000000000000, + "optimalUsageRatio": 900000000000000000000000000, + "stableRateSlope1": 5000000000000000000000000, + "stableRateSlope2": 600000000000000000000000000, + "variableRateSlope1": 40000000000000000000000000, + "variableRateSlope2": 600000000000000000000000000 + }, + "0x4b8D3277d49E114C8F2D6E0B2eD310e29226fe16": { + "baseStableBorrowRate": 160000000000000000000000000, + "baseVariableBorrowRate": 30000000000000000000000000, + "maxExcessStableToTotalDebtRatio": 800000000000000000000000000, + "maxExcessUsageRatio": 200000000000000000000000000, + "optimalStableToTotalDebtRatio": 200000000000000000000000000, + "optimalUsageRatio": 800000000000000000000000000, + "stableRateSlope1": 0, + "stableRateSlope2": 0, + "variableRateSlope1": 140000000000000000000000000, + "variableRateSlope2": 1500000000000000000000000000 + }, + "0xA9F3C3caE095527061e6d270DBE163693e6fda9D": { + "baseStableBorrowRate": 50000000000000000000000000, + "baseVariableBorrowRate": 0, + "maxExcessStableToTotalDebtRatio": 800000000000000000000000000, + "maxExcessUsageRatio": 200000000000000000000000000, + "optimalStableToTotalDebtRatio": 200000000000000000000000000, + "optimalUsageRatio": 800000000000000000000000000, + "stableRateSlope1": 5000000000000000000000000, + "stableRateSlope2": 750000000000000000000000000, + "variableRateSlope1": 40000000000000000000000000, + "variableRateSlope2": 750000000000000000000000000 + }, + "0xFB0898dCFb69DF9E01DBE625A5988D6542e5BdC5": { + "baseStableBorrowRate": 81000000000000000000000000, + "baseVariableBorrowRate": 0, + "maxExcessStableToTotalDebtRatio": 800000000000000000000000000, + "maxExcessUsageRatio": 250000000000000000000000000, + "optimalStableToTotalDebtRatio": 200000000000000000000000000, + "optimalUsageRatio": 750000000000000000000000000, + "stableRateSlope1": 0, + "stableRateSlope2": 0, + "variableRateSlope1": 61000000000000000000000000, + "variableRateSlope2": 1000000000000000000000000000 + } + } +} \ No newline at end of file diff --git a/src/test/AaveV3ConfigEngineTest.t.sol b/src/test/AaveV3ConfigEngineTest.t.sol index c91fff936..2c096c029 100644 --- a/src/test/AaveV3ConfigEngineTest.t.sol +++ b/src/test/AaveV3ConfigEngineTest.t.sol @@ -8,6 +8,7 @@ import {AaveV3EthereumMockCapUpdate} from './mocks/AaveV3EthereumMockCapUpdate.s import {AaveV3AvalancheCollateralUpdate} from './mocks/AaveV3AvalancheCollateralUpdate.sol'; import {AaveV3PolygonBorrowUpdate} from './mocks/AaveV3PolygonBorrowUpdate.sol'; import {AaveV3PolygonPriceFeedUpdate} from './mocks/AaveV3PolygonPriceFeedUpdate.sol'; +import {AaveV3PolygonEModeCategoryUpdate} from './mocks/AaveV3PolygonEModeCategoryUpdate.sol'; import {AaveV3OptimismMockRatesUpdate} from './mocks/AaveV3OptimismMockRatesUpdate.sol'; import {DeployRatesFactoryPolLib, DeployRatesFactoryEthLib, DeployRatesFactoryAvaLib, DeployRatesFactoryArbLib, DeployRatesFactoryOptLib} from '../../scripts/V3RateStrategyFactory.s.sol'; import {DeployEnginePolLib, DeployEngineEthLib, DeployEngineAvaLib, DeployEngineOptLib, DeployEngineArbLib} from '../../scripts/AaveV3ConfigEngine.s.sol'; @@ -490,6 +491,27 @@ contract AaveV3ConfigEngineTest is ProtocolV3TestBase { ); } + function testEModeCategoryUpdates() public { + vm.createSelectFork(vm.rpcUrl('polygon'), 40037250); + + IAaveV3ConfigEngine engine = IAaveV3ConfigEngine(DeployEnginePolLib.deploy()); + AaveV3PolygonEModeCategoryUpdate payload = new AaveV3PolygonEModeCategoryUpdate(engine); + + vm.startPrank(AaveV3Polygon.ACL_ADMIN); + AaveV3Polygon.ACL_MANAGER.addPoolAdmin(address(payload)); + vm.stopPrank(); + + createConfigurationSnapshot('preTestEngineEModeCategoryUpdate', AaveV3Polygon.POOL); + + payload.execute(); + + createConfigurationSnapshot('postTestEngineEModeCategoryUpdate', AaveV3Polygon.POOL); + + diffReports('preTestEngineEModeCategoryUpdate', 'postTestEngineEModeCategoryUpdate'); + + // TODO: Add validation function + } + function _bpsToRay(uint256 amount) internal pure returns (uint256) { return (amount * 1e27) / 10_000; } diff --git a/src/test/mocks/AaveV3PolygonEModeCategoryUpdate.sol b/src/test/mocks/AaveV3PolygonEModeCategoryUpdate.sol new file mode 100644 index 000000000..11f681e79 --- /dev/null +++ b/src/test/mocks/AaveV3PolygonEModeCategoryUpdate.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import '../../v3-config-engine/AaveV3PayloadBase.sol'; +import {AaveV3PolygonAssets} from 'aave-address-book/AaveV3Polygon.sol'; + +/** + * @dev Smart contract for a mock update, to be able to test + * IMPORTANT Parameters are pseudo-random, DON'T USE THIS ANYHOW IN PRODUCTION + * @dev Inheriting directly from AaveV3PayloadBase for being able to inject a custom engine + * @author BGD Labs + */ +contract AaveV3PolygonEModeCategoryUpdate is AaveV3PayloadBase { + constructor(IEngine customEngine) AaveV3PayloadBase(customEngine) {} + + function eModeCategoryUpdates() public pure override returns (IEngine.EModeUpdate[] memory) { + IEngine.EModeUpdate[] memory eModeUpdates = new IEngine.EModeUpdate[](1); + + eModeUpdates[0] = IEngine.EModeUpdate({ + eModeCategory: 1, + ltv: 9740, + liqThreshold: 9760, + liqBonus: EngineFlags.KEEP_CURRENT, + priceSource: EngineFlags.KEEP_CURRENT_ADDRESS, + label: EngineFlags.KEEP_CURRENT_STRING + }); + + return eModeUpdates; + } + + function getPoolContext() public pure override returns (IEngine.PoolContext memory) { + return IEngine.PoolContext({networkName: 'Polygon', networkAbbreviation: 'Pol'}); + } +} diff --git a/src/v3-config-engine/AaveV3ConfigEngine.sol b/src/v3-config-engine/AaveV3ConfigEngine.sol index 0485718ef..6f2d77e96 100644 --- a/src/v3-config-engine/AaveV3ConfigEngine.sol +++ b/src/v3-config-engine/AaveV3ConfigEngine.sol @@ -29,6 +29,7 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { Collateral[] collaterals; Caps[] caps; IV3RateStrategyFactory.RateStrategyParams[] rates; + EModeCategories[] eModeCategories; } struct Basic { @@ -61,6 +62,15 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { uint256 borrowCap; // Always configured, no matter if enabled for borrowing or not. Same format as supply cap } + struct EModeCategories { + uint8 eModeCategory; + uint256 ltv; // Only considered if liqThreshold > 0. With 2 digits precision, `10_00` for 10%. Should be lower than liquidationThreshold + uint256 liqThreshold; // If `0`, the asset will not be enabled as collateral. Same format as ltv, and should be higher + uint256 liqBonus; // Only considered if liqThreshold > 0. Same format as ltv + address priceSource; // A custom price oracle for the eMode category + string label; // The label for the eMode category + } + IPool public immutable POOL; IPoolConfigurator public immutable POOL_CONFIGURATOR; IAaveOracle public immutable ORACLE; @@ -186,6 +196,15 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { _configRateStrategies(configs.ids, configs.rates); } + /// @inheritdoc IAaveV3ConfigEngine + function updateEModeCategories(EModeUpdate[] memory updates) public { + require(updates.length != 0, 'AT_LEAST_ONE_UPDATE_REQUIRED'); + + AssetsConfig memory configs = _repackEModeUpdate(updates); + + _configEModeCategories(configs.eModeCategories); + } + function _setPriceFeeds(address[] memory ids, Basic[] memory basics) internal { address[] memory assets = new address[](ids.length); address[] memory sources = new address[](ids.length); @@ -453,6 +472,59 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { } } + function _configEModeCategories(EModeCategories[] memory updates) internal { + for (uint256 i = 0; i < updates.length; i++) { + if ( + updates[i].ltv == EngineFlags.KEEP_CURRENT || + updates[i].liqThreshold == EngineFlags.KEEP_CURRENT || + updates[i].liqBonus == EngineFlags.KEEP_CURRENT || + updates[i].priceSource == EngineFlags.KEEP_CURRENT_ADDRESS || + keccak256(abi.encode(updates[i].label)) == keccak256(abi.encode(EngineFlags.KEEP_CURRENT_STRING)) + ) { + DataTypes.EModeCategory memory configuration = POOL.getEModeCategoryData(updates[i].eModeCategory); + uint256 currentLtv= configuration.ltv; + uint256 currentLiqThreshold = configuration.liquidationThreshold; + uint256 currentLiqBonus = configuration.liquidationBonus; + address currentPriceSource = configuration.priceSource; + string memory currentLabel = configuration.label; + + if (updates[i].ltv == EngineFlags.KEEP_CURRENT) { + updates[i].ltv = currentLtv; + } + + if (updates[i].liqThreshold == EngineFlags.KEEP_CURRENT) { + updates[i].liqThreshold = currentLiqThreshold; + } + + if (updates[i].liqBonus == EngineFlags.KEEP_CURRENT) { + updates[i].liqBonus = currentLiqBonus; + } + + if (updates[i].priceSource == EngineFlags.KEEP_CURRENT_ADDRESS) { + updates[i].priceSource = currentPriceSource; + } + + if (keccak256(abi.encode(updates[i].label)) == keccak256(abi.encode(EngineFlags.KEEP_CURRENT_STRING))) { + updates[i].label = currentLabel; + } + } + + require( + updates[i].liqThreshold + updates[i].liqBonus < 100_00, + 'INVALID_LIQ_PARAMS_ABOVE_100' + ); + + POOL_CONFIGURATOR.setEModeCategory( + updates[i].eModeCategory, + uint16(updates[i].ltv), + uint16(updates[i].liqThreshold), + uint16(updates[i].liqBonus), + updates[i].priceSource, + updates[i].label + ); + } + } + function _repackListing(ListingWithCustomImpl[] memory listings) internal pure @@ -505,7 +577,8 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { borrows: borrows, collaterals: collaterals, caps: caps, - rates: rates + rates: rates, + eModeCategories: new EModeCategories[](0) }); } @@ -529,7 +602,8 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { basics: new Basic[](0), borrows: new Borrow[](0), collaterals: new Collateral[](0), - rates: new IV3RateStrategyFactory.RateStrategyParams[](0) + rates: new IV3RateStrategyFactory.RateStrategyParams[](0), + eModeCategories: new EModeCategories[](0) }); } @@ -554,7 +628,8 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { basics: new Basic[](0), borrows: new Borrow[](0), caps: new Caps[](0), - collaterals: new Collateral[](0) + collaterals: new Collateral[](0), + eModeCategories: new EModeCategories[](0) }); } @@ -585,7 +660,8 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { basics: new Basic[](0), borrows: new Borrow[](0), collaterals: collaterals, - rates: new IV3RateStrategyFactory.RateStrategyParams[](0) + rates: new IV3RateStrategyFactory.RateStrategyParams[](0), + eModeCategories: new EModeCategories[](0) }); } @@ -616,7 +692,8 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { basics: new Basic[](0), borrows: borrows, collaterals: new Collateral[](0), - rates: new IV3RateStrategyFactory.RateStrategyParams[](0) + rates: new IV3RateStrategyFactory.RateStrategyParams[](0), + eModeCategories: new EModeCategories[](0) }); } @@ -645,7 +722,38 @@ contract AaveV3ConfigEngine is IAaveV3ConfigEngine { basics: basics, borrows: new Borrow[](0), collaterals: new Collateral[](0), - rates: new IV3RateStrategyFactory.RateStrategyParams[](0) + rates: new IV3RateStrategyFactory.RateStrategyParams[](0), + eModeCategories: new EModeCategories[](0) + }); + } + + function _repackEModeUpdate(EModeUpdate[] memory updates) + internal + pure + returns (AssetsConfig memory) + { + EModeCategories[] memory eModeCategories = new EModeCategories[](updates.length); + + for (uint256 i = 0; i < updates.length; i++) { + eModeCategories[i] = EModeCategories({ + eModeCategory: updates[i].eModeCategory, + ltv: updates[i].ltv, + liqThreshold: updates[i].liqThreshold, + liqBonus: updates[i].liqBonus, + priceSource: updates[i].priceSource, + label: updates[i].label + }); + } + + return + AssetsConfig({ + ids: new address[](0), + caps: new Caps[](0), + basics: new Basic[](0), + borrows: new Borrow[](0), + collaterals: new Collateral[](0), + rates: new IV3RateStrategyFactory.RateStrategyParams[](0), + eModeCategories: eModeCategories }); } diff --git a/src/v3-config-engine/AaveV3PayloadBase.sol b/src/v3-config-engine/AaveV3PayloadBase.sol index ffc86fea2..def00cce7 100644 --- a/src/v3-config-engine/AaveV3PayloadBase.sol +++ b/src/v3-config-engine/AaveV3PayloadBase.sol @@ -18,6 +18,7 @@ import {EngineFlags} from './EngineFlags.sol'; * - Updates of price feeds * - Updates of borrow parameters (flashloanable, stableRateModeEnabled, borrowableInIsolation, withSiloedBorrowing, reserveFactor) * - Updates of collateral parameters (ltv, liq threshold, liq bonus, liq protocol fee, debt ceiling) + * - Updates of emode category parameters (ltv, liq threshold, liq bonus, price source, label) * @author BGD Labs */ abstract contract AaveV3PayloadBase { @@ -45,6 +46,7 @@ abstract contract AaveV3PayloadBase { IEngine.BorrowUpdate[] memory borrows = borrowsUpdates(); IEngine.PriceFeedUpdate[] memory priceFeeds = priceFeedsUpdates(); IEngine.RateStrategyUpdate[] memory rates = rateStrategiesUpdates(); + IEngine.EModeUpdate[] memory eModeCategories = eModeCategoryUpdates(); if (listings.length != 0) { address(LISTING_ENGINE).functionDelegateCall( @@ -92,6 +94,12 @@ abstract contract AaveV3PayloadBase { ); } + if (eModeCategories.length != 0) { + address(LISTING_ENGINE).functionDelegateCall( + abi.encodeWithSelector(LISTING_ENGINE.updateEModeCategories.selector, eModeCategories) + ); + } + _postExecute(); } @@ -125,6 +133,9 @@ abstract contract AaveV3PayloadBase { /// @dev to be defined in the child with a list of priceFeeds to update function priceFeedsUpdates() public view virtual returns (IEngine.PriceFeedUpdate[] memory) {} + /// @dev to be defined in the child with a list of eMode categories to update + function eModeCategoryUpdates() public view virtual returns (IEngine.EModeUpdate[] memory) {} + /// @dev to be defined in the child with a list of set of parameters of rate strategies function rateStrategiesUpdates() public diff --git a/src/v3-config-engine/EngineFlags.sol b/src/v3-config-engine/EngineFlags.sol index f727aa071..a34a9bfa1 100644 --- a/src/v3-config-engine/EngineFlags.sol +++ b/src/v3-config-engine/EngineFlags.sol @@ -6,6 +6,14 @@ library EngineFlags { /// Strongly assumes that the value `type(uint256).max - 42` will never be used, which seems reasonable uint256 internal constant KEEP_CURRENT = type(uint256).max - 42; + /// @dev magic value to be used as flag to keep unchanged any current configuration + /// Strongly assumes that the value `AaveV3ConfigEngine.EngineFlags.KEEP_CURRENT_STRING` will never be used, which seems reasonable + string internal constant KEEP_CURRENT_STRING = 'AaveV3ConfigEngine.EngineFlags.KEEP_CURRENT_STRING'; + + /// @dev magic value to be used as flag to keep unchanged any current configuration + /// Strongly assumes that the value `0x00000000000000000000000000000000000042` will never be used, which seems reasonable + address internal constant KEEP_CURRENT_ADDRESS = address(0x00000000000000000000000000000000000042); + /// @dev value to be used as flag for bool value true uint256 internal constant ENABLED = 1; diff --git a/src/v3-config-engine/IAaveV3ConfigEngine.sol b/src/v3-config-engine/IAaveV3ConfigEngine.sol index 35f1499a3..1343b5c65 100644 --- a/src/v3-config-engine/IAaveV3ConfigEngine.sol +++ b/src/v3-config-engine/IAaveV3ConfigEngine.sol @@ -155,6 +155,26 @@ interface IAaveV3ConfigEngine { uint256 reserveFactor; } + /** + * @dev Example (mock): + * EModeUpdate({ + * eModeCategory: 1, // STABLECOINS + * ltv: 60_00, + * liqThreshold: 70_00, + * liqBonus: EngineFlags.KEEP_CURRENT, + * priceSource: EngineFlags.KEEP_CURRENT_ADDRESS, + * label: EngineFlags.KEEP_CURRENT_STRING + * }) + */ + struct EModeUpdate { + uint8 eModeCategory; + uint256 ltv; + uint256 liqThreshold; + uint256 liqBonus; + address priceSource; + string label; + } + /** * @dev Example (mock): * RateStrategyUpdate({ @@ -233,6 +253,13 @@ interface IAaveV3ConfigEngine { */ function updateBorrowSide(BorrowUpdate[] memory updates) external; + /** + * @notice Performs an update of the borrow-related params of the assets, in the Aave pool configured in this engine instance + * @param updates `BorrowUpdate[]` list of declarative updates containing the new parameters + * More information on the documentation of the struct. + */ + function updateEModeCategories(EModeUpdate[] memory updates) external; + function RATE_STRATEGIES_FACTORY() external view returns (IV3RateStrategyFactory); function POOL() external view returns (IPool);