Skip to content

Commit

Permalink
feat: snapshot collateralManager (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra authored Nov 8, 2023
1 parent 2111f26 commit a4676d2
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 159 deletions.
2 changes: 1 addition & 1 deletion lib/aave-address-book
Submodule aave-address-book updated 48 files
+8 −0 CHANGELOG.md
+4 −4 package.json
+0 −6 scripts/configs/pools/base.ts
+0 −6 scripts/configs/pools/gnosis.ts
+1 −1 scripts/generator/assetsLibraryGenerator.ts
+1 −1 scripts/generator/clients.ts
+5 −1 scripts/generator/protocolV2Generator.ts
+2 −0 scripts/generator/safetyModuleGenerator.ts
+6 −0 src/AaveSafetyModule.sol
+11 −7 src/AaveV2Avalanche.sol
+41 −37 src/AaveV2Ethereum.sol
+27 −23 src/AaveV2EthereumAMM.sol
+4 −0 src/AaveV2EthereumArc.sol
+8 −4 src/AaveV2Fuji.sol
+25 −21 src/AaveV2Goerli.sol
+11 −7 src/AaveV2Mumbai.sol
+17 −13 src/AaveV2Polygon.sol
+15 −15 src/AaveV3Arbitrum.sol
+76 −76 src/AaveV3ArbitrumGoerli.sol
+12 −12 src/AaveV3Avalanche.sol
+3 −3 src/AaveV3Base.sol
+25 −25 src/AaveV3Ethereum.sol
+10 −10 src/AaveV3Fantom.sol
+10 −10 src/AaveV3FantomTestnet.sol
+8 −8 src/AaveV3Fuji.sol
+152 −2 src/AaveV3Gnosis.sol
+6 −6 src/AaveV3GoerliGho.sol
+8 −8 src/AaveV3Harmony.sol
+5 −5 src/AaveV3Metis.sol
+16 −16 src/AaveV3Mumbai.sol
+13 −13 src/AaveV3Optimism.sol
+8 −8 src/AaveV3OptimismGoerli.sol
+20 −20 src/AaveV3Polygon.sol
+8 −8 src/AaveV3ScrollAlpha.sol
+8 −8 src/AaveV3ScrollSepolia.sol
+8 −8 src/AaveV3Sepolia.sol
+6 −0 src/ts/AaveSafetyModule.ts
+3 −0 src/ts/AaveV2Avalanche.ts
+3 −0 src/ts/AaveV2Ethereum.ts
+3 −0 src/ts/AaveV2EthereumAMM.ts
+3 −0 src/ts/AaveV2EthereumArc.ts
+3 −0 src/ts/AaveV2Fuji.ts
+3 −0 src/ts/AaveV2Goerli.ts
+3 −0 src/ts/AaveV2Mumbai.ts
+3 −0 src/ts/AaveV2Polygon.ts
+20 −20 src/ts/AaveV3ArbitrumGoerli.ts
+69 −2 src/ts/AaveV3Gnosis.ts
+75 −255 yarn.lock
118 changes: 39 additions & 79 deletions reports/default_after.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"oracle": "0xc929ad75B72593967DE83E7F7Cda0493458261D9",
"oracleDecimals": 8,
"oracleDescription": "1INCH / USD",
"oracleLatestAnswer": 29500000,
"oracleLatestAnswer": 25000000,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x4b62bFAff61AB3985798e5202D2d167F567D0BCD",
Expand Down Expand Up @@ -85,7 +85,7 @@
"oracle": "0x553303d460EE0afB37EdFf9bE42922D8FF63220e",
"oracleDecimals": 8,
"oracleDescription": "UNI / USD",
"oracleLatestAnswer": 423354120,
"oracleLatestAnswer": 411404424,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x2FEc76324A0463c46f32e74A86D1cf94C02158DC",
Expand Down Expand Up @@ -124,7 +124,7 @@
"ltv": 7300,
"oracle": "0x230E0321Cf38F09e247e50Afc7801EA2351fe56F",
"oracleDecimals": 8,
"oracleLatestAnswer": 3450056510505,
"oracleLatestAnswer": 2806730000000,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0xA1773F1ccF6DB192Ad8FE826D15fe1d328B03284",
Expand All @@ -150,7 +150,7 @@
"debtCeiling": 0,
"decimals": 18,
"eModeCategory": 0,
"interestRateStrategy": "0x1255fC8DC8E76761995aCF544eea54f1B7fB0459",
"interestRateStrategy": "0x9210E5477dCA5bdF579ef0E1Ae84F9E823a5A3bA",
"isActive": true,
"isBorrowableInIsolation": false,
"isFlashloanable": false,
Expand Down Expand Up @@ -203,7 +203,7 @@
"oracle": "0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c",
"oracleDecimals": 8,
"oracleDescription": "LINK / USD",
"oracleLatestAnswer": 1156304849,
"oracleLatestAnswer": 746380000,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x63B1129ca97D2b9F97f45670787Ac12a9dF1110a",
Expand Down Expand Up @@ -242,7 +242,7 @@
"ltv": 4000,
"oracle": "0xb01e6C9af83879B8e06a092f0DD94309c0D497E4",
"oracleDecimals": 8,
"oracleLatestAnswer": 182142735,
"oracleLatestAnswer": 160987783,
"oracleName": "LDO/ETH/USD",
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
Expand Down Expand Up @@ -283,7 +283,7 @@
"oracle": "0x3D7aE7E594f2f2091Ad8798313450130d0Aba3a0",
"oracleDecimals": 8,
"oracleDescription": "LUSD / USD",
"oracleLatestAnswer": 99600976,
"oracleLatestAnswer": 99718318,
"reserveFactor": 1000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x37A6B708FDB1483C231961b9a7F145261E815fc3",
Expand Down Expand Up @@ -323,7 +323,7 @@
"oracle": "0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9",
"oracleDecimals": 8,
"oracleDescription": "DAI / USD",
"oracleLatestAnswer": 100003485,
"oracleLatestAnswer": 99991810,
"reserveFactor": 1000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x413AdaC9E2Ef8683ADf5DDAEce8f19613d60D1bb",
Expand All @@ -341,7 +341,7 @@
},
"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9": {
"aToken": "0xA700b4eB416Be35b2911fd5Dee80678ff64fF6C9",
"aTokenImpl": "0x7EfFD7b47Bfd17e52fB7559d3f924201b9DbfF3d",
"aTokenImpl": "0x6acCc155626E0CF8bFe97e68A17a567394D51238",
"aTokenName": "Aave Ethereum AAVE",
"aTokenSymbol": "aEthAAVE",
"borrowCap": 0,
Expand All @@ -363,7 +363,7 @@
"oracle": "0x547a514d5e3769680Ce22B2361c10Ea13619e8a9",
"oracleDecimals": 8,
"oracleDescription": "AAVE / USD",
"oracleLatestAnswer": 8295267307,
"oracleLatestAnswer": 6392072768,
"reserveFactor": 0,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x268497bF083388B1504270d0E717222d3A87D6F2",
Expand Down Expand Up @@ -403,7 +403,7 @@
"oracle": "0x8B6851156023f4f5A66F68BEA80851c3D905Ac93",
"oracleDecimals": 8,
"oracleDescription": "wstETH/ETH/USD",
"oracleLatestAnswer": 207483260565,
"oracleLatestAnswer": 180781627706,
"reserveFactor": 1500,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x39739943199c0fBFe9E5f1B5B160cd73a64CB85D",
Expand Down Expand Up @@ -443,7 +443,7 @@
"oracle": "0x29081f7aB5a644716EfcDC10D5c926c5fEe9F72B",
"oracleDecimals": 8,
"oracleDescription": "sDAI/DAI/USD",
"oracleLatestAnswer": 104091808,
"oracleLatestAnswer": 103872239,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x48Bc45f084988bC01933EA93EeFfEBC0416534f6",
Expand Down Expand Up @@ -483,7 +483,7 @@
"oracle": "0xB9E1E3A9feFf48998E45Fa90847ed4D467E8BcfD",
"oracleDecimals": 8,
"oracleDescription": "FRAX / USD",
"oracleLatestAnswer": 99972342,
"oracleLatestAnswer": 100030087,
"reserveFactor": 1000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x219640546c0DFDDCb9ab3bcdA89B324e0a376367",
Expand Down Expand Up @@ -523,7 +523,7 @@
"oracle": "0xec1D1B3b0443256cc3860e24a46F108e699484Aa",
"oracleDecimals": 8,
"oracleDescription": "MKR / USD",
"oracleLatestAnswer": 139499700000,
"oracleLatestAnswer": 142595285000,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x0496372BE7e426D28E89DEBF01f19F014d5938bE",
Expand Down Expand Up @@ -563,7 +563,7 @@
"oracle": "0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6",
"oracleDecimals": 8,
"oracleDescription": "USDC / USD",
"oracleLatestAnswer": 100001048,
"oracleLatestAnswer": 100007300,
"reserveFactor": 1000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0xB0fe3D292f4bd50De902Ba5bDF120Ad66E9d7a39",
Expand Down Expand Up @@ -603,7 +603,7 @@
"oracle": "0x7A9f34a0Aa917D438e9b6E630067062B7F8f6f3d",
"oracleDecimals": 8,
"oracleDescription": "STG / USD",
"oracleLatestAnswer": 48401233,
"oracleLatestAnswer": 40724428,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0xc3115D0660b93AeF10F298886ae22E3Dd477E482",
Expand Down Expand Up @@ -642,7 +642,7 @@
"ltv": 7450,
"oracle": "0x5f4d15d761528c57a5C30c43c1DAb26Fc5452731",
"oracleDecimals": 8,
"oracleLatestAnswer": 190327788725,
"oracleLatestAnswer": 166071032453,
"oracleName": "cbETH/ETH/USD",
"reserveFactor": 1500,
"stableBorrowRateEnabled": false,
Expand Down Expand Up @@ -683,7 +683,7 @@
"oracle": "0xDC3EA94CD0AC27d9A86C180091e7f78C683d3699",
"oracleDecimals": 8,
"oracleDescription": "SNX / USD",
"oracleLatestAnswer": 233791143,
"oracleLatestAnswer": 189002000,
"reserveFactor": 3500,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x478E1ec1A2BeEd94c1407c951E4B9e22d53b2501",
Expand Down Expand Up @@ -723,7 +723,7 @@
"oracle": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
"oracleDecimals": 8,
"oracleDescription": "ETH / USD",
"oracleLatestAnswer": 181226991771,
"oracleLatestAnswer": 158151704967,
"reserveFactor": 1500,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x102633152313C81cD80419b6EcF66d14Ad68949A",
Expand Down Expand Up @@ -763,7 +763,7 @@
"oracle": "0x5C00128d4d1c2F4f652C267d7bcdD7aC99C16E16",
"oracleDecimals": 8,
"oracleDescription": "ENS / USD",
"oracleLatestAnswer": 793532147,
"oracleLatestAnswer": 716707869,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x7617d02E311CdE347A0cb45BB7DF2926BBaf5347",
Expand All @@ -784,7 +784,7 @@
"aTokenImpl": "0x7EfFD7b47Bfd17e52fB7559d3f924201b9DbfF3d",
"aTokenName": "Aave Ethereum RPL",
"aTokenSymbol": "aEthRPL",
"borrowCap": 240000,
"borrowCap": 160000,
"borrowingEnabled": true,
"debtCeiling": 0,
"decimals": 18,
Expand All @@ -803,7 +803,7 @@
"oracle": "0x4E155eD98aFE9034b7A5962f6C84c86d869daA9d",
"oracleDecimals": 8,
"oracleDescription": "RPL / USD",
"oracleLatestAnswer": 2358607311,
"oracleLatestAnswer": 1952970458,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x41e330fd8F7eA31E2e8F02cC0C9392D1403597B4",
Expand Down Expand Up @@ -843,7 +843,7 @@
"oracle": "0xCd627aA160A6fA45Eb793D19Ef54f5062F20f33f",
"oracleDecimals": 8,
"oracleDescription": "CRV / USD",
"oracleLatestAnswer": 48988309,
"oracleLatestAnswer": 43952197,
"reserveFactor": 3500,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x90D9CD005E553111EB8C9c31Abe9706a186b6048",
Expand Down Expand Up @@ -881,7 +881,7 @@
"liquidationThreshold": 7700,
"ltv": 7450,
"oracle": "0x05225Cd708bCa9253789C1374e4337a019e99D56",
"oracleLatestAnswer": 197161152159,
"oracleLatestAnswer": 171838970942,
"oracleName": "rETH/ETH/USD",
"reserveFactor": 1500,
"stableBorrowRateEnabled": false,
Expand Down Expand Up @@ -922,14 +922,14 @@
"oracle": "0xdF2917806E30300537aEB49A7663062F4d1F2b5F",
"oracleDecimals": 8,
"oracleDescription": "BAL / USD",
"oracleLatestAnswer": 342859215,
"oracleLatestAnswer": 311046636,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0xB368d45aaAa07ee2c6275Cb320D140b22dE43CDD",
"stableDebtTokenImpl": "0x15C5620dfFaC7c7366EED66C20Ad222DDbB1eD57",
"stableDebtTokenName": "Aave Ethereum Stable Debt BAL",
"stableDebtTokenSymbol": "stableDebtEthBAL",
"supplyCap": 700000,
"supplyCap": 350000,
"symbol": "BAL",
"underlying": "0xba100000625a3754423978a60c9317c58a424e3D",
"usageAsCollateralEnabled": true,
Expand Down Expand Up @@ -962,7 +962,7 @@
"oracle": "0x3E7d1eAB13ad0104d2750B8863b489D65364e32D",
"oracleDecimals": 8,
"oracleDescription": "USDT / USD",
"oracleLatestAnswer": 100039454,
"oracleLatestAnswer": 100000319,
"reserveFactor": 1000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0x822Fa72Df1F229C3900f5AD6C3Fa2C424D691622",
Expand All @@ -977,46 +977,6 @@
"variableDebtTokenImpl": "0xaC725CB59D16C81061BDeA61041a8A5e73DA9EC6",
"variableDebtTokenName": "Aave Ethereum Variable Debt USDT",
"variableDebtTokenSymbol": "variableDebtEthUSDT"
},
"0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202": {
"aToken": "0x5b502e3796385E1e9755d7043B9C945C3aCCeC9C",
"aTokenImpl": "0x7EfFD7b47Bfd17e52fB7559d3f924201b9DbfF3d",
"aTokenName": "Aave Ethereum KNC",
"aTokenSymbol": "aEthKNC",
"borrowCap": 650000,
"borrowingEnabled": true,
"debtCeiling": 100000000,
"decimals": 18,
"eModeCategory": 0,
"interestRateStrategy": "0xf6733B9842883BFE0e0a940eA2F572676af31bde",
"isActive": true,
"isBorrowableInIsolation": false,
"isFlashloanable": true,
"isFrozen": false,
"isPaused": false,
"isSiloed": false,
"liquidationBonus": 11000,
"liquidationProtocolFee": 1000,
"liquidationThreshold": 4000,
"ltv": 3500,
"oracle": "0xf8fF43E991A81e6eC886a3D281A2C6cC19aE70Fc",
"oracleDecimals": 8,
"oracleDescription": "KNC / USD",
"oracleLatestAnswer": 76632590,
"reserveFactor": 2000,
"stableBorrowRateEnabled": false,
"stableDebtToken": "0xdfEE0C9eA1309cB9611F33972E72a72166fcF548",
"stableDebtTokenImpl": "0x15C5620dfFaC7c7366EED66C20Ad222DDbB1eD57",
"stableDebtTokenName": "Aave Ethereum Stable Debt KNC",
"stableDebtTokenSymbol": "stableDebtEthKNC",
"supplyCap": 1200000,
"symbol": "KNC",
"underlying": "0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202",
"usageAsCollateralEnabled": true,
"variableDebtToken": "0x253127Ffc04981cEA8932F406710661c2f2c3fD2",
"variableDebtTokenImpl": "0xaC725CB59D16C81061BDeA61041a8A5e73DA9EC6",
"variableDebtTokenName": "Aave Ethereum Variable Debt KNC",
"variableDebtTokenSymbol": "variableDebtEthKNC"
}
},
"strategies": {
Expand All @@ -1032,18 +992,6 @@
"variableRateSlope1": 40000000000000000000000000,
"variableRateSlope2": 3000000000000000000000000000
},
"0x1255fC8DC8E76761995aCF544eea54f1B7fB0459": {
"baseStableBorrowRate": 0,
"baseVariableBorrowRate": 30000000000000000000000000,
"maxExcessStableToTotalDebtRatio": 0,
"maxExcessUsageRatio": 0,
"optimalStableToTotalDebtRatio": 0,
"optimalUsageRatio": 0,
"stableRateSlope1": 0,
"stableRateSlope2": 0,
"variableRateSlope1": 0,
"variableRateSlope2": 0
},
"0x24701A6368Ff6D2874d6b8cDadd461552B8A5283": {
"baseStableBorrowRate": 90000000000000000000000000,
"baseVariableBorrowRate": 0,
Expand Down Expand Up @@ -1128,6 +1076,18 @@
"variableRateSlope1": 35000000000000000000000000,
"variableRateSlope2": 600000000000000000000000000
},
"0x9210E5477dCA5bdF579ef0E1Ae84F9E823a5A3bA": {
"baseStableBorrowRate": 0,
"baseVariableBorrowRate": 25000000000000000000000000,
"maxExcessStableToTotalDebtRatio": 0,
"maxExcessUsageRatio": 0,
"optimalStableToTotalDebtRatio": 0,
"optimalUsageRatio": 0,
"stableRateSlope1": 0,
"stableRateSlope2": 0,
"variableRateSlope1": 0,
"variableRateSlope2": 0
},
"0x9a158802cD924747EF336cA3F9DE3bdb60Cf43D3": {
"baseStableBorrowRate": 60000000000000000000000000,
"baseVariableBorrowRate": 0,
Expand Down
Loading

0 comments on commit a4676d2

Please sign in to comment.