diff --git a/diffs/AaveV2Ethereum_ReserveFactorUpdates_20240102_before_AaveV2Ethereum_ReserveFactorUpdates_20240102_after.md b/diffs/AaveV2Ethereum_ReserveFactorUpdates_20240102_before_AaveV2Ethereum_ReserveFactorUpdates_20240102_after.md new file mode 100644 index 000000000..0aaae1a72 --- /dev/null +++ b/diffs/AaveV2Ethereum_ReserveFactorUpdates_20240102_before_AaveV2Ethereum_ReserveFactorUpdates_20240102_after.md @@ -0,0 +1,454 @@ +## Reserve changes + +### Reserve altered + +#### TUSD ([0x0000000000085d4780B73119b644AE5ecd22b376](https://etherscan.io/address/0x0000000000085d4780B73119b644AE5ecd22b376)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99.9 % | 99.99 % | + + +#### RAI ([0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919](https://etherscan.io/address/0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### GUSD ([0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd](https://etherscan.io/address/0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 20 % | 25 % | + + +#### BAT ([0x0D8775F648430679A709E98d2b0Cb6250d2887EF](https://etherscan.io/address/0x0D8775F648430679A709E98d2b0Cb6250d2887EF)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### MANA ([0x0F5D2fB29fb7d3CFeE444a200298f468908cC942](https://etherscan.io/address/0x0F5D2fB29fb7d3CFeE444a200298f468908cC942)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### YFI ([0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e](https://etherscan.io/address/0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### 1INCH ([0x111111111117dC0aa78b770fA6A738034120C302](https://etherscan.io/address/0x111111111117dC0aa78b770fA6A738034120C302)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### DPI ([0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b](https://etherscan.io/address/0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### UNI ([0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984](https://etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### WBTC ([0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599](https://etherscan.io/address/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 30 % | 35 % | + + +#### REN ([0x408e41876cCCDC0F92210600ef50372656052a38](https://etherscan.io/address/0x408e41876cCCDC0F92210600ef50372656052a38)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### BUSD ([0x4Fabb145d64652a948d72533023f6E7A623C7C53](https://etherscan.io/address/0x4Fabb145d64652a948d72533023f6E7A623C7C53)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99.9 % | 99.99 % | + + +#### CVX ([0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B](https://etherscan.io/address/0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### LINK ([0x514910771AF9Ca656af840dff83E8264EcF986CA](https://etherscan.io/address/0x514910771AF9Ca656af840dff83E8264EcF986CA)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 30 % | 35 % | + + +#### sUSD ([0x57Ab1ec28D129707052df4dF418D58a2D46d5f51](https://etherscan.io/address/0x57Ab1ec28D129707052df4dF418D58a2D46d5f51)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 30 % | 35 % | + + +#### LUSD ([0x5f98805A4E8be255a32880FDeC7F6728C6568bA0](https://etherscan.io/address/0x5f98805A4E8be255a32880FDeC7F6728C6568bA0)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 25 % | 30 % | + + +#### DAI ([0x6B175474E89094C44Da98b954EedeAC495271d0F](https://etherscan.io/address/0x6B175474E89094C44Da98b954EedeAC495271d0F)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 25 % | 30 % | + + +#### FRAX ([0x853d955aCEf822Db058eb8505911ED77F175b99e](https://etherscan.io/address/0x853d955aCEf822Db058eb8505911ED77F175b99e)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 30 % | 35 % | + + +#### xSUSHI ([0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272](https://etherscan.io/address/0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### USDP ([0x8E870D67F660D95d5be530380D0eC0bd388289E1](https://etherscan.io/address/0x8E870D67F660D95d5be530380D0eC0bd388289E1)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 20 % | 25 % | + + +#### FEI ([0x956F47F50A910163D8BF957Cf5846D573E7f87CA](https://etherscan.io/address/0x956F47F50A910163D8BF957Cf5846D573E7f87CA)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### MKR ([0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2](https://etherscan.io/address/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### USDC ([0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48](https://etherscan.io/address/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 25 % | 30 % | + + +#### SNX ([0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F](https://etherscan.io/address/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### WETH ([0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2](https://etherscan.io/address/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 25 % | 30 % | + + +#### ENS ([0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72](https://etherscan.io/address/0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### AMPL ([0xD46bA6D942050d489DBd938a2C909A5d5039A161](https://etherscan.io/address/0xD46bA6D942050d489DBd938a2C909A5d5039A161)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99.9 % | 99.99 % | + + +#### CRV ([0xD533a949740bb3306d119CC777fa900bA034cd52](https://etherscan.io/address/0xD533a949740bb3306d119CC777fa900bA034cd52)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### ZRX ([0xE41d2489571d322189246DaFA5ebDe1F4699F498](https://etherscan.io/address/0xE41d2489571d322189246DaFA5ebDe1F4699F498)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### ENJ ([0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c](https://etherscan.io/address/0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### UST ([0xa693B19d2931d498c5B318dF961919BB4aee87a5](https://etherscan.io/address/0xa693B19d2931d498c5B318dF961919BB4aee87a5)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### BAL ([0xba100000625a3754423978a60c9317c58a424e3D](https://etherscan.io/address/0xba100000625a3754423978a60c9317c58a424e3D)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +#### USDT ([0xdAC17F958D2ee523a2206206994597C13D831ec7](https://etherscan.io/address/0xdAC17F958D2ee523a2206206994597C13D831ec7)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 25 % | 30 % | + + +#### KNC ([0xdd974D5C2e2928deA5F71b9825b8b646686BD200](https://etherscan.io/address/0xdd974D5C2e2928deA5F71b9825b8b646686BD200)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 99 % | 99.99 % | + + +## Raw diff + +```json +{ + "reserves": { + "0x0000000000085d4780B73119b644AE5ecd22b376": { + "reserveFactor": { + "from": 9990, + "to": 9999 + } + }, + "0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd": { + "reserveFactor": { + "from": 2000, + "to": 2500 + } + }, + "0x0D8775F648430679A709E98d2b0Cb6250d2887EF": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x0F5D2fB29fb7d3CFeE444a200298f468908cC942": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x111111111117dC0aa78b770fA6A738034120C302": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599": { + "reserveFactor": { + "from": 3000, + "to": 3500 + } + }, + "0x408e41876cCCDC0F92210600ef50372656052a38": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x4Fabb145d64652a948d72533023f6E7A623C7C53": { + "reserveFactor": { + "from": 9990, + "to": 9999 + } + }, + "0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x514910771AF9Ca656af840dff83E8264EcF986CA": { + "reserveFactor": { + "from": 3000, + "to": 3500 + } + }, + "0x57Ab1ec28D129707052df4dF418D58a2D46d5f51": { + "reserveFactor": { + "from": 3000, + "to": 3500 + } + }, + "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0": { + "reserveFactor": { + "from": 2500, + "to": 3000 + } + }, + "0x6B175474E89094C44Da98b954EedeAC495271d0F": { + "reserveFactor": { + "from": 2500, + "to": 3000 + } + }, + "0x853d955aCEf822Db058eb8505911ED77F175b99e": { + "reserveFactor": { + "from": 3000, + "to": 3500 + } + }, + "0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x8E870D67F660D95d5be530380D0eC0bd388289E1": { + "reserveFactor": { + "from": 2000, + "to": 2500 + } + }, + "0x956F47F50A910163D8BF957Cf5846D573E7f87CA": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": { + "reserveFactor": { + "from": 2500, + "to": 3000 + } + }, + "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": { + "reserveFactor": { + "from": 2500, + "to": 3000 + } + }, + "0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0xD46bA6D942050d489DBd938a2C909A5d5039A161": { + "reserveFactor": { + "from": 9990, + "to": 9999 + } + }, + "0xD533a949740bb3306d119CC777fa900bA034cd52": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0xE41d2489571d322189246DaFA5ebDe1F4699F498": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0xa693B19d2931d498c5B318dF961919BB4aee87a5": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0xba100000625a3754423978a60c9317c58a424e3D": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + }, + "0xdAC17F958D2ee523a2206206994597C13D831ec7": { + "reserveFactor": { + "from": 2500, + "to": 3000 + } + }, + "0xdd974D5C2e2928deA5F71b9825b8b646686BD200": { + "reserveFactor": { + "from": 9900, + "to": 9999 + } + } + } +} +``` \ No newline at end of file diff --git a/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304.sol b/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304.sol new file mode 100644 index 000000000..539bcc338 --- /dev/null +++ b/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; +import {AaveV2Ethereum, AaveV2EthereumAssets, ILendingPoolConfigurator} from 'aave-address-book/AaveV2Ethereum.sol'; + +/** + * @title Ethereum v2 Reserve Factor Adjustment + * @author Karpatkey, TokenLogic, ChaosLabs + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x26a03c08359c340f63b78b0c3e96d37aa0adeda65814643b0886d4719048ea7e + * - Discussion: https://governance.aave.com/t/arfc-ethereum-v2-reserve-factor-adjustment/16764 + */ +contract AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304 is IProposalGenericExecutor { + ILendingPoolConfigurator public constant POOL_CONFIGURATOR = + ILendingPoolConfigurator(AaveV2Ethereum.POOL_CONFIGURATOR); + + uint256 public constant ONE_INCH_RF = 99_99; + uint256 public constant AMPL_RF = 99_99; + uint256 public constant BUSD_RF = 99_99; + uint256 public constant BAL_RF = 99_99; + uint256 public constant BAT_RF = 99_99; + uint256 public constant CRV_RF = 99_99; + uint256 public constant CVX_RF = 99_99; + uint256 public constant DAI_RF = 30_00; + uint256 public constant DPI_RF = 99_99; + uint256 public constant ENS_RF = 99_99; + uint256 public constant ENJ_RF = 99_99; + uint256 public constant FEI_RF = 99_99; + uint256 public constant FRAX_RF = 35_00; + uint256 public constant GUSD_RF = 25_00; + uint256 public constant KNC_RF = 99_99; + uint256 public constant LINK_RF = 35_00; + uint256 public constant LUSD_RF = 30_00; + uint256 public constant MANA_RF = 99_99; + uint256 public constant MKR_RF = 99_99; + uint256 public constant RAI_RF = 99_99; + uint256 public constant REN_RF = 99_99; + uint256 public constant SNX_RF = 99_99; + uint256 public constant sUSD_RF = 35_00; + uint256 public constant xSUSHI_RF = 99_99; + uint256 public constant TUSD_RF = 99_99; + uint256 public constant UNI_RF = 99_99; + uint256 public constant USDC_RF = 30_00; + uint256 public constant USDP_RF = 25_00; + uint256 public constant USDT_RF = 30_00; + uint256 public constant UST_RF = 99_99; + uint256 public constant WBTC_RF = 35_00; + uint256 public constant WETH_RF = 30_00; + uint256 public constant YFI_RF = 99_99; + uint256 public constant ZRX_RF = 99_99; + + function execute() external { + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.ONE_INCH_UNDERLYING, ONE_INCH_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.AMPL_UNDERLYING, AMPL_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.BUSD_UNDERLYING, BUSD_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.BAL_UNDERLYING, BAL_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.BAT_UNDERLYING, BAT_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.CRV_UNDERLYING, CRV_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.CVX_UNDERLYING, CVX_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.DAI_UNDERLYING, DAI_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.DPI_UNDERLYING, DPI_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.ENS_UNDERLYING, ENS_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.ENJ_UNDERLYING, ENJ_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.FEI_UNDERLYING, FEI_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.FRAX_UNDERLYING, FRAX_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.GUSD_UNDERLYING, GUSD_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.KNC_UNDERLYING, KNC_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.LINK_UNDERLYING, LINK_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.LUSD_UNDERLYING, LUSD_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.MANA_UNDERLYING, MANA_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.MKR_UNDERLYING, MKR_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.RAI_UNDERLYING, RAI_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.REN_UNDERLYING, REN_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.SNX_UNDERLYING, SNX_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.sUSD_UNDERLYING, sUSD_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.xSUSHI_UNDERLYING, xSUSHI_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.TUSD_UNDERLYING, TUSD_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.UNI_UNDERLYING, UNI_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.USDC_UNDERLYING, USDC_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.USDP_UNDERLYING, USDP_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.USDT_UNDERLYING, USDT_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.UST_UNDERLYING, UST_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.WBTC_UNDERLYING, WBTC_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.WETH_UNDERLYING, WETH_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.YFI_UNDERLYING, YFI_RF); + POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.ZRX_UNDERLYING, ZRX_RF); + } +} diff --git a/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304.t.sol b/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304.t.sol new file mode 100644 index 000000000..2c4790cf7 --- /dev/null +++ b/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304.t.sol @@ -0,0 +1,218 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV2TestBase, ReserveConfig} from 'aave-helpers/ProtocolV2TestBase.sol'; +import {AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304} from './AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304.sol'; + +/** + * @dev Test for AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304 + * command: make test-contract filter=AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304 + */ +contract AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304_Test is ProtocolV2TestBase { + AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304 internal proposal; + + struct Changes { + address asset; + uint256 reserveFactor; + } + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 19363829); + proposal = new AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + (ReserveConfig[] memory allConfigsBefore, ReserveConfig[] memory allConfigsAfter) = defaultTest( + 'AaveV2Ethereum_ReserveFactorUpdates_20240102', + AaveV2Ethereum.POOL, + address(proposal) + ); + + address[] memory assetsChanged = new address[](34); + assetsChanged[0] = AaveV2EthereumAssets.ONE_INCH_UNDERLYING; + assetsChanged[1] = AaveV2EthereumAssets.AMPL_UNDERLYING; + assetsChanged[2] = AaveV2EthereumAssets.BUSD_UNDERLYING; + assetsChanged[3] = AaveV2EthereumAssets.BAL_UNDERLYING; + assetsChanged[4] = AaveV2EthereumAssets.BAT_UNDERLYING; + assetsChanged[5] = AaveV2EthereumAssets.CRV_UNDERLYING; + assetsChanged[6] = AaveV2EthereumAssets.CVX_UNDERLYING; + assetsChanged[7] = AaveV2EthereumAssets.DAI_UNDERLYING; + assetsChanged[8] = AaveV2EthereumAssets.DPI_UNDERLYING; + assetsChanged[9] = AaveV2EthereumAssets.ENS_UNDERLYING; + assetsChanged[10] = AaveV2EthereumAssets.ENJ_UNDERLYING; + assetsChanged[11] = AaveV2EthereumAssets.FEI_UNDERLYING; + assetsChanged[12] = AaveV2EthereumAssets.FRAX_UNDERLYING; + assetsChanged[13] = AaveV2EthereumAssets.GUSD_UNDERLYING; + assetsChanged[14] = AaveV2EthereumAssets.KNC_UNDERLYING; + assetsChanged[15] = AaveV2EthereumAssets.LINK_UNDERLYING; + assetsChanged[16] = AaveV2EthereumAssets.LUSD_UNDERLYING; + assetsChanged[17] = AaveV2EthereumAssets.MANA_UNDERLYING; + assetsChanged[18] = AaveV2EthereumAssets.MKR_UNDERLYING; + assetsChanged[19] = AaveV2EthereumAssets.RAI_UNDERLYING; + assetsChanged[20] = AaveV2EthereumAssets.REN_UNDERLYING; + assetsChanged[21] = AaveV2EthereumAssets.SNX_UNDERLYING; + assetsChanged[22] = AaveV2EthereumAssets.sUSD_UNDERLYING; + assetsChanged[23] = AaveV2EthereumAssets.xSUSHI_UNDERLYING; + assetsChanged[24] = AaveV2EthereumAssets.TUSD_UNDERLYING; + assetsChanged[25] = AaveV2EthereumAssets.UNI_UNDERLYING; + assetsChanged[26] = AaveV2EthereumAssets.USDC_UNDERLYING; + assetsChanged[27] = AaveV2EthereumAssets.USDP_UNDERLYING; + assetsChanged[28] = AaveV2EthereumAssets.USDT_UNDERLYING; + assetsChanged[29] = AaveV2EthereumAssets.UST_UNDERLYING; + assetsChanged[30] = AaveV2EthereumAssets.WBTC_UNDERLYING; + assetsChanged[31] = AaveV2EthereumAssets.WETH_UNDERLYING; + assetsChanged[32] = AaveV2EthereumAssets.YFI_UNDERLYING; + assetsChanged[33] = AaveV2EthereumAssets.ZRX_UNDERLYING; + + Changes[] memory assetChanges = new Changes[](34); + assetChanges[0] = Changes({ + asset: AaveV2EthereumAssets.ONE_INCH_UNDERLYING, + reserveFactor: proposal.ONE_INCH_RF() + }); + assetChanges[1] = Changes({ + asset: AaveV2EthereumAssets.AMPL_UNDERLYING, + reserveFactor: proposal.AMPL_RF() + }); + assetChanges[2] = Changes({ + asset: AaveV2EthereumAssets.BUSD_UNDERLYING, + reserveFactor: proposal.BUSD_RF() + }); + assetChanges[3] = Changes({ + asset: AaveV2EthereumAssets.BAL_UNDERLYING, + reserveFactor: proposal.BAL_RF() + }); + assetChanges[4] = Changes({ + asset: AaveV2EthereumAssets.BAT_UNDERLYING, + reserveFactor: proposal.BAT_RF() + }); + assetChanges[5] = Changes({ + asset: AaveV2EthereumAssets.CRV_UNDERLYING, + reserveFactor: proposal.CRV_RF() + }); + assetChanges[6] = Changes({ + asset: AaveV2EthereumAssets.CVX_UNDERLYING, + reserveFactor: proposal.CVX_RF() + }); + assetChanges[7] = Changes({ + asset: AaveV2EthereumAssets.DAI_UNDERLYING, + reserveFactor: proposal.DAI_RF() + }); + assetChanges[8] = Changes({ + asset: AaveV2EthereumAssets.DPI_UNDERLYING, + reserveFactor: proposal.DPI_RF() + }); + assetChanges[9] = Changes({ + asset: AaveV2EthereumAssets.ENS_UNDERLYING, + reserveFactor: proposal.ENS_RF() + }); + assetChanges[10] = Changes({ + asset: AaveV2EthereumAssets.ENJ_UNDERLYING, + reserveFactor: proposal.ENJ_RF() + }); + assetChanges[11] = Changes({ + asset: AaveV2EthereumAssets.FEI_UNDERLYING, + reserveFactor: proposal.FEI_RF() + }); + assetChanges[12] = Changes({ + asset: AaveV2EthereumAssets.FRAX_UNDERLYING, + reserveFactor: proposal.FRAX_RF() + }); + assetChanges[13] = Changes({ + asset: AaveV2EthereumAssets.GUSD_UNDERLYING, + reserveFactor: proposal.GUSD_RF() + }); + assetChanges[14] = Changes({ + asset: AaveV2EthereumAssets.KNC_UNDERLYING, + reserveFactor: proposal.KNC_RF() + }); + assetChanges[15] = Changes({ + asset: AaveV2EthereumAssets.LINK_UNDERLYING, + reserveFactor: proposal.LINK_RF() + }); + assetChanges[16] = Changes({ + asset: AaveV2EthereumAssets.LUSD_UNDERLYING, + reserveFactor: proposal.LUSD_RF() + }); + assetChanges[17] = Changes({ + asset: AaveV2EthereumAssets.MANA_UNDERLYING, + reserveFactor: proposal.MANA_RF() + }); + assetChanges[18] = Changes({ + asset: AaveV2EthereumAssets.MKR_UNDERLYING, + reserveFactor: proposal.MKR_RF() + }); + assetChanges[19] = Changes({ + asset: AaveV2EthereumAssets.RAI_UNDERLYING, + reserveFactor: proposal.RAI_RF() + }); + assetChanges[20] = Changes({ + asset: AaveV2EthereumAssets.REN_UNDERLYING, + reserveFactor: proposal.REN_RF() + }); + assetChanges[21] = Changes({ + asset: AaveV2EthereumAssets.SNX_UNDERLYING, + reserveFactor: proposal.SNX_RF() + }); + assetChanges[22] = Changes({ + asset: AaveV2EthereumAssets.sUSD_UNDERLYING, + reserveFactor: proposal.sUSD_RF() + }); + assetChanges[23] = Changes({ + asset: AaveV2EthereumAssets.xSUSHI_UNDERLYING, + reserveFactor: proposal.xSUSHI_RF() + }); + assetChanges[24] = Changes({ + asset: AaveV2EthereumAssets.TUSD_UNDERLYING, + reserveFactor: proposal.TUSD_RF() + }); + assetChanges[25] = Changes({ + asset: AaveV2EthereumAssets.UNI_UNDERLYING, + reserveFactor: proposal.UNI_RF() + }); + assetChanges[26] = Changes({ + asset: AaveV2EthereumAssets.USDC_UNDERLYING, + reserveFactor: proposal.USDC_RF() + }); + assetChanges[27] = Changes({ + asset: AaveV2EthereumAssets.USDP_UNDERLYING, + reserveFactor: proposal.USDP_RF() + }); + assetChanges[28] = Changes({ + asset: AaveV2EthereumAssets.USDT_UNDERLYING, + reserveFactor: proposal.USDT_RF() + }); + assetChanges[29] = Changes({ + asset: AaveV2EthereumAssets.UST_UNDERLYING, + reserveFactor: proposal.UST_RF() + }); + assetChanges[30] = Changes({ + asset: AaveV2EthereumAssets.WBTC_UNDERLYING, + reserveFactor: proposal.WBTC_RF() + }); + assetChanges[31] = Changes({ + asset: AaveV2EthereumAssets.WETH_UNDERLYING, + reserveFactor: proposal.WETH_RF() + }); + assetChanges[32] = Changes({ + asset: AaveV2EthereumAssets.YFI_UNDERLYING, + reserveFactor: proposal.YFI_RF() + }); + assetChanges[33] = Changes({ + asset: AaveV2EthereumAssets.ZRX_UNDERLYING, + reserveFactor: proposal.ZRX_RF() + }); + + _noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged); + + for (uint i = 0; i < assetChanges.length; i++) { + ReserveConfig memory cfg = _findReserveConfig(allConfigsAfter, assetChanges[i].asset); + assertEq(cfg.reserveFactor, assetChanges[i].reserveFactor); + } + } +} diff --git a/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/EthereumV2ReserveFactorAdjustment.md b/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/EthereumV2ReserveFactorAdjustment.md new file mode 100644 index 000000000..7374a3e6f --- /dev/null +++ b/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/EthereumV2ReserveFactorAdjustment.md @@ -0,0 +1,78 @@ +--- +title: "Ethereum v2 Reserve Factor Adjustment" +author: "Karpatkey, TokenLogic, ChaosLabs" +discussions: "https://governance.aave.com/t/arfc-ethereum-v2-reserve-factor-adjustment/16764" +snapshot: "https://snapshot.org/#/aave.eth/proposal/0x26a03c08359c340f63b78b0c3e96d37aa0adeda65814643b0886d4719048ea7e" +--- + +## Simple Summary + +This publication proposes periodically increasing the Aave v2 Ethereum Reserve Factor (RF) to encourage users to migrate to Aave v3. + +## Motivation + +With Aave v3 now crossing the $8 Billion TVL threshold and $3 Billion remaining in Aave v2, this publication seeks to encourage users to migrate from v2 to v3 by increasing the RF. + +With all other variables held constant, increasing the RF over time in isolation will result in a reduced deposit rate. Users are encourage to migrate to v3 in search of higher yield. + +With market conditions permitting, we propose initiating a periodic 5.00% RF increase across all assets every 14 days as mentioned [here](https://governance.aave.com/t/arfc-chaos-labs-incremental-reserve-factor-updates-aave-v2-ethereum/13766) up to a threshold of 99.99%. During each increase cycle we will monitor how users respond and, if any potential risks are identified, the next RF increase will be delayed until it is safe to implement. + +Do note that increasing the RF parameter does not directly affect users' health factor, and this method has already been [implemented on Polygon v2](https://governance.aave.com/t/temp-check-polygon-v2-to-v3-liquidity-migration/12350) for some time. + +## Specification + +The below shows the current and proposed RF for each reserve. + +| Asset | Current RF | Recommended RF | +| -------- | ---------- | -------------- | +| ONE_INCH | 99.00% | 99.99% | +| AMPL | 99.90% | 99.99% | +| BUSD | 99.90% | 99.99% | +| BAL | 99.00% | 99.99% | +| BAT | 99.00% | 99.99% | +| CRV | 99.00% | 99.99% | +| CVX | 99.00% | 99.99% | +| DAI | 25.00% | 30.00% | +| DPI | 99.00% | 99.99% | +| ENS | 99.00% | 99.99% | +| ENJ | 99.00% | 99.99% | +| FEI | 99.00% | 99.99% | +| FRAX | 30.00% | 35.00% | +| GUSD | 20.00% | 25.00% | +| KNC | 99.00% | 99.99% | +| LINK | 30.00% | 35.00% | +| LUSD | 25.00% | 30.00% | +| MANA | 99.00% | 99.99% | +| MKR | 99.00% | 99.99% | +| RAI | 99.00% | 99.99% | +| REN | 99.00% | 99.99% | +| SNX | 99.00% | 99.99% | +| sUSD | 30.00% | 35.00% | +| xSUSHI | 99.00% | 99.99% | +| TUSD | 99.00% | 99.99% | +| UNI | 99.00% | 99.99% | +| USDC | 25.00% | 30.00% | +| USDP | 20.00% | 25.00% | +| USDT | 25.00% | 30.00% | +| UST | 99.00% | 99.99% | +| WBTC | 30.00% | 35.00% | +| WETH | 25.00% | 30.00% | +| YFI | 99.00% | 99.99% | +| ZRX | 99.00% | 99.99% | + +Upon implementing this proposal, a subsequent AIP will be submitted every 2 weeks that increases the RF by 5.00% up to a maximum of 99.99%, subject to market conditions. + +## References + +- Implementation: [AaveV2Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304.sol) +- Tests: [AaveV2Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304.t.sol) +- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0x26a03c08359c340f63b78b0c3e96d37aa0adeda65814643b0886d4719048ea7e) +- [Discussion](https://governance.aave.com/t/arfc-ethereum-v2-reserve-factor-adjustment/16764) + +# Disclosure + +TokenLogic, karpatkey and Chaos Labs receive no payment for this proposal. TokenLogic and karpatkey are both delegates within the Aave community. + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/EthereumV2ReserveFactorAdjustment_20240304.s.sol b/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/EthereumV2ReserveFactorAdjustment_20240304.s.sol new file mode 100644 index 000000000..2644471bc --- /dev/null +++ b/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/EthereumV2ReserveFactorAdjustment_20240304.s.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; +import {EthereumScript} from 'aave-helpers/ScriptUtils.sol'; +import {AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304} from './AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304.sol'; + +/** + * @dev Deploy Ethereum + * deploy-command: make deploy-ledger contract=src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/EthereumV2ReserveFactorAdjustment_20240304.s.sol:DeployEthereum chain=mainnet + * verify-command: npx catapulta-verify -b broadcast/EthereumV2ReserveFactorAdjustment_20240304.s.sol/1/run-latest.json + */ +contract DeployEthereum is EthereumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Create Proposal + * command: make deploy-ledger contract=src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/EthereumV2ReserveFactorAdjustment_20240304.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1); + + // compose actions for validation + IPayloadsControllerCore.ExecutionAction[] + memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsEthereum[0] = GovV3Helpers.buildAction( + type(AaveV2Ethereum_EthereumV2ReserveFactorAdjustment_20240304).creationCode + ); + payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/EthereumV2ReserveFactorAdjustment.md' + ) + ); + } +} diff --git a/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/config.ts b/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/config.ts new file mode 100644 index 000000000..799668869 --- /dev/null +++ b/src/20240304_AaveV2Ethereum_EthereumV2ReserveFactorAdjustment/config.ts @@ -0,0 +1,14 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + pools: ['AaveV2Ethereum'], + title: 'Ethereum v2 Reserve Factor Adjustment', + shortName: 'EthereumV2ReserveFactorAdjustment', + date: '20240304', + author: 'Karpatkey, TokenLogic, ChaosLabs', + discussion: 'https://governance.aave.com/t/arfc-ethereum-v2-reserve-factor-adjustment/16764', + snapshot: + 'https://snapshot.org/#/aave.eth/proposal/0x26a03c08359c340f63b78b0c3e96d37aa0adeda65814643b0886d4719048ea7e', + }, + poolOptions: {AaveV2Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 19363829}}}, +};