From 3e7494b0846e337e24c982a13c0645a3c57b00e5 Mon Sep 17 00:00:00 2001 From: Fermin 'Piscu' Carranza Date: Tue, 20 Feb 2024 04:12:05 -0500 Subject: [PATCH 1/4] Reserve Factor Updates (February 15) (#210) * feat: add rf updates * chore: update block number * chore: merge main * chore: pR updates --- ...gon_ReserveFactorUpdates_20240215_after.md | 77 +++++++++++++++++++ ...veFactorUpdatesFebruary152024_20240208.sol | 31 ++++++++ ...FactorUpdatesFebruary152024_20240208.t.sol | 72 +++++++++++++++++ .../ReserveFactorUpdatesFebruary152024.md | 41 ++++++++++ ...FactorUpdatesFebruary152024_20240208.s.sol | 58 ++++++++++++++ .../config.ts | 14 ++++ 6 files changed, 293 insertions(+) create mode 100644 diffs/AaveV2Polygon_ReserveFactorUpdates_20240215_before_AaveV2Polygon_ReserveFactorUpdates_20240215_after.md create mode 100644 src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.sol create mode 100644 src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.t.sol create mode 100644 src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024.md create mode 100644 src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024_20240208.s.sol create mode 100644 src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/config.ts diff --git a/diffs/AaveV2Polygon_ReserveFactorUpdates_20240215_before_AaveV2Polygon_ReserveFactorUpdates_20240215_after.md b/diffs/AaveV2Polygon_ReserveFactorUpdates_20240215_before_AaveV2Polygon_ReserveFactorUpdates_20240215_after.md new file mode 100644 index 000000000..d54c9b716 --- /dev/null +++ b/diffs/AaveV2Polygon_ReserveFactorUpdates_20240215_before_AaveV2Polygon_ReserveFactorUpdates_20240215_after.md @@ -0,0 +1,77 @@ +## Reserve changes + +### Reserve altered + +#### WMATIC ([0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270](https://polygonscan.com/address/0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 91 % | 96 % | + + +#### USDC ([0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174](https://polygonscan.com/address/0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 73 % | 78 % | + + +#### WETH ([0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619](https://polygonscan.com/address/0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 95 % | 99.99 % | + + +#### DAI ([0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063](https://polygonscan.com/address/0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 71 % | 76 % | + + +#### USDT ([0xc2132D05D31c914a87C6611C10748AEb04B58e8F](https://polygonscan.com/address/0xc2132D05D31c914a87C6611C10748AEb04B58e8F)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 72 % | 77 % | + + +## Raw diff + +```json +{ + "reserves": { + "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270": { + "reserveFactor": { + "from": 9100, + "to": 9600 + } + }, + "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174": { + "reserveFactor": { + "from": 7300, + "to": 7800 + } + }, + "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619": { + "reserveFactor": { + "from": 9500, + "to": 9999 + } + }, + "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063": { + "reserveFactor": { + "from": 7100, + "to": 7600 + } + }, + "0xc2132D05D31c914a87C6611C10748AEb04B58e8F": { + "reserveFactor": { + "from": 7200, + "to": 7700 + } + } + } +} +``` \ No newline at end of file diff --git a/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.sol b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.sol new file mode 100644 index 000000000..7c54a06a6 --- /dev/null +++ b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import {AaveV2Polygon, AaveV2PolygonAssets} from 'aave-address-book/AaveV2Polygon.sol'; +import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; + +/** + * @title Reserve Factor Updates (February 15, 2024) + * @author karpatkey_TokenLogic + * - Snapshot: Direct-to-AIP + * - Discussion: https://governance.aave.com/t/arfc-reserve-factor-updates-polygon-aave-v2/13937/16 + */ +contract AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208 is IProposalGenericExecutor { + uint256 public constant DAI_RF = 76_00; + uint256 public constant USDC_RF = 78_00; + uint256 public constant USDT_RF = 77_00; + uint256 public constant WETH_RF = 99_99; + uint256 public constant WMATIC_RF = 96_00; + + function execute() external { + AaveV2Polygon.POOL_CONFIGURATOR.setReserveFactor(AaveV2PolygonAssets.DAI_UNDERLYING, DAI_RF); + AaveV2Polygon.POOL_CONFIGURATOR.setReserveFactor(AaveV2PolygonAssets.USDC_UNDERLYING, USDC_RF); + AaveV2Polygon.POOL_CONFIGURATOR.setReserveFactor(AaveV2PolygonAssets.USDT_UNDERLYING, USDT_RF); + AaveV2Polygon.POOL_CONFIGURATOR.setReserveFactor(AaveV2PolygonAssets.WETH_UNDERLYING, WETH_RF); + AaveV2Polygon.POOL_CONFIGURATOR.setReserveFactor( + AaveV2PolygonAssets.WMATIC_UNDERLYING, + WMATIC_RF + ); + } +} diff --git a/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.t.sol b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.t.sol new file mode 100644 index 000000000..5a7b0c93e --- /dev/null +++ b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.t.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV2Polygon, AaveV2PolygonAssets} from 'aave-address-book/AaveV2Polygon.sol'; +import {ProtocolV2TestBase, ReserveConfig} from 'aave-helpers/ProtocolV2TestBase.sol'; + +import {AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208} from './AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.sol'; + +/** + * @dev Test for AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208 + * command: make test-contract filter=AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208 + */ +contract AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208_Test is ProtocolV2TestBase { + struct Changes { + address asset; + uint256 reserveFactor; + } + + AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('polygon'), 53441053); + proposal = new AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + (ReserveConfig[] memory allConfigsBefore, ReserveConfig[] memory allConfigsAfter) = defaultTest( + 'AaveV2Polygon_ReserveFactorUpdates_20240215', + AaveV2Polygon.POOL, + address(proposal) + ); + + address[] memory assetsChanged = new address[](5); + assetsChanged[0] = AaveV2PolygonAssets.DAI_UNDERLYING; + assetsChanged[1] = AaveV2PolygonAssets.USDC_UNDERLYING; + assetsChanged[2] = AaveV2PolygonAssets.USDT_UNDERLYING; + assetsChanged[3] = AaveV2PolygonAssets.WETH_UNDERLYING; + assetsChanged[4] = AaveV2PolygonAssets.WMATIC_UNDERLYING; + + Changes[] memory assetChanges = new Changes[](5); + assetChanges[0] = Changes({ + asset: AaveV2PolygonAssets.DAI_UNDERLYING, + reserveFactor: proposal.DAI_RF() + }); + assetChanges[1] = Changes({ + asset: AaveV2PolygonAssets.USDC_UNDERLYING, + reserveFactor: proposal.USDC_RF() + }); + assetChanges[2] = Changes({ + asset: AaveV2PolygonAssets.USDT_UNDERLYING, + reserveFactor: proposal.USDT_RF() + }); + assetChanges[3] = Changes({ + asset: AaveV2PolygonAssets.WETH_UNDERLYING, + reserveFactor: proposal.WETH_RF() + }); + assetChanges[4] = Changes({ + asset: AaveV2PolygonAssets.WMATIC_UNDERLYING, + reserveFactor: proposal.WMATIC_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/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024.md b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024.md new file mode 100644 index 000000000..c3af07a98 --- /dev/null +++ b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024.md @@ -0,0 +1,41 @@ +--- +title: "Reserve Factor Updates (February 15, 2024)" +author: "karpatkey_TokenLogic" +discussions: "https://governance.aave.com/t/arfc-reserve-factor-updates-polygon-aave-v2/13937/16" +snapshot: "No snapshot for Direct-to-AIP" +--- + +## Simple Summary + +This AIP is a continuation of continuation of proposal 24 on Governance v3 and increases the Reserve Factor (RF) for assets on Polygon v2 by 5.00%, up to a maximum of 99.99%. + +## Motivation + +This AIP will reduce deposit yield for assets on Polygon v2 by increasing the RF. With this upgrade being passed, users will be further encouraged to migrate from Polygon v2 to v3. + +Increasing the RF routes a larger portion of the interest paid by users to Aave DAO's Treasury. User's funds are not at risk of liquidation and the borrowing rate remains unchanged. + +Of the assets with an RF set at 99.99%, there is no change. All other asset reserves will have the RF increased by 5%. + +## Specification + +The following parameters are to be updated as follows: + +| Asset | Reserve Factor | +| ----- | -------------- | +| DAI | 76.00% | +| USDC | 78.00% | +| USDT | 77.00% | +| wETH | 99.99% | +| MATIC | 96.00% | + +## References + +- Implementation: [AaveV2Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.sol) +- Tests: [AaveV2Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.t.sol) +- Snapshot: Direct-to-AIP +- [Discussion](https://governance.aave.com/t/arfc-reserve-factor-updates-polygon-aave-v2/13937/16) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024_20240208.s.sol b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024_20240208.s.sol new file mode 100644 index 000000000..11b5729b3 --- /dev/null +++ b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024_20240208.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, PolygonScript} from 'aave-helpers/ScriptUtils.sol'; +import {AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208} from './AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.sol'; + +/** + * @dev Deploy Polygon + * deploy-command: make deploy-ledger contract=src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024_20240208.s.sol:DeployPolygon chain=polygon + * verify-command: npx catapulta-verify -b broadcast/ReserveFactorUpdatesFebruary152024_20240208.s.sol/137/run-latest.json + */ +contract DeployPolygon is PolygonScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208).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/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024_20240208.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 actionsPolygon = new IPayloadsControllerCore.ExecutionAction[](1); + actionsPolygon[0] = GovV3Helpers.buildAction( + type(AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208).creationCode + ); + payloads[0] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024.md' + ) + ); + } +} diff --git a/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/config.ts b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/config.ts new file mode 100644 index 000000000..56e9559da --- /dev/null +++ b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/config.ts @@ -0,0 +1,14 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + pools: ['AaveV2Polygon'], + title: 'Reserve Factor Updates (February 15, 2024)', + shortName: 'ReserveFactorUpdatesFebruary152024', + date: '20240208', + author: 'karpatkey_TokenLogic', + discussion: + 'https://governance.aave.com/t/arfc-reserve-factor-updates-polygon-aave-v2/13937/16', + snapshot: 'No snapshot for Direct-to-AIP', + }, + poolOptions: {AaveV2Polygon: {configs: {OTHERS: {}}, cache: {blockNumber: 53283615}}}, +}; From d92dec6f20da6b20305e614e0c904fe62adb373f Mon Sep 17 00:00:00 2001 From: Cache bot Date: Tue, 20 Feb 2024 09:12:42 +0000 Subject: [PATCH 2/4] fix(cache): automated cache update [skip ci] --- .../ReserveFactorUpdatesFebruary152024.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024.md b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024.md index c3af07a98..ac3fafacb 100644 --- a/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024.md +++ b/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/ReserveFactorUpdatesFebruary152024.md @@ -31,8 +31,8 @@ The following parameters are to be updated as follows: ## References -- Implementation: [AaveV2Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.sol) -- Tests: [AaveV2Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.t.sol) +- Implementation: [AaveV2Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/3e7494b0846e337e24c982a13c0645a3c57b00e5/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.sol) +- Tests: [AaveV2Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/3e7494b0846e337e24c982a13c0645a3c57b00e5/src/20240208_AaveV2Polygon_ReserveFactorUpdatesFebruary152024/AaveV2Polygon_ReserveFactorUpdatesFebruary152024_20240208.t.sol) - Snapshot: Direct-to-AIP - [Discussion](https://governance.aave.com/t/arfc-reserve-factor-updates-polygon-aave-v2/13937/16) From 76cbbd699702d5662409355a40d8ede251c7b06e Mon Sep 17 00:00:00 2001 From: Alice <121383428+Rozengarden@users.noreply.github.com> Date: Tue, 20 Feb 2024 10:29:22 +0100 Subject: [PATCH 3/4] Increase MaticX supplyCap (#216) --- ...lyCapIncreaseInPolygonV3_20240206_after.md | 25 ++++++++ ...XSupplyCapIncreaseInPolygonV3_20240206.sol | 27 +++++++++ ...upplyCapIncreaseInPolygonV3_20240206.t.sol | 32 ++++++++++ .../MaticXSupplyCapIncreaseInPolygonV3.md | 41 +++++++++++++ ...upplyCapIncreaseInPolygonV3_20240206.s.sol | 58 +++++++++++++++++++ .../config.ts | 19 ++++++ 6 files changed, 202 insertions(+) create mode 100644 diffs/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_before_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_after.md create mode 100644 src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol create mode 100644 src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.t.sol create mode 100644 src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.md create mode 100644 src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3_20240206.s.sol create mode 100644 src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/config.ts diff --git a/diffs/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_before_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_after.md b/diffs/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_before_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_after.md new file mode 100644 index 000000000..7e70bfea3 --- /dev/null +++ b/diffs/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_before_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_after.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### MaticX ([0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6](https://polygonscan.com/address/0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 62,000,000 MaticX | 75,000,000 MaticX | + + +## Raw diff + +```json +{ + "reserves": { + "0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6": { + "supplyCap": { + "from": 62000000, + "to": 75000000 + } + } + } +} +``` \ No newline at end of file diff --git a/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol new file mode 100644 index 000000000..836648909 --- /dev/null +++ b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3PolygonAssets} from 'aave-address-book/AaveV3Polygon.sol'; +import {AaveV3PayloadPolygon} from 'aave-helpers/v3-config-engine/AaveV3PayloadPolygon.sol'; +import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; + +/** + * @title MaticX Supply Cap Increase in Polygon V3 + * @author Aave Chan Initiative (ACI) + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x73b2f1d14eb6710deabe84639ea8b06929738ef1973fee21c26945d17bf57a5b + * - Discussion: https://governance.aave.com/t/arfc-maticx-supply-cap-increase-in-polygon-v3/16449 + */ +contract AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206 is AaveV3PayloadPolygon { + function capsUpdates() public pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capsUpdate = new IAaveV3ConfigEngine.CapsUpdate[](1); + + capsUpdate[0] = IAaveV3ConfigEngine.CapsUpdate({ + asset: AaveV3PolygonAssets.MaticX_UNDERLYING, + supplyCap: 75_000_000, + borrowCap: EngineFlags.KEEP_CURRENT + }); + + return capsUpdate; + } +} diff --git a/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.t.sol b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.t.sol new file mode 100644 index 000000000..66a4cbeca --- /dev/null +++ b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Polygon} from 'aave-address-book/AaveV3Polygon.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; +import {AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206} from './AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol'; + +/** + * @dev Test for AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206 + * command: make test-contract filter=AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206 + */ +contract AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_Test is ProtocolV3TestBase { + AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('polygon'), 53201815); + proposal = new AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206', + AaveV3Polygon.POOL, + address(proposal) + ); + } +} diff --git a/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.md b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.md new file mode 100644 index 000000000..ba3d5ff37 --- /dev/null +++ b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.md @@ -0,0 +1,41 @@ +--- +title: "MaticX Supply Cap Increase in Polygon V3" +author: "Aave Chan Initiative (ACI)" +discussions: "https://governance.aave.com/t/arfc-maticx-supply-cap-increase-in-polygon-v3/16449" +--- + +## Simple Summary + +This proposal aims to increase the MaticX Supply Cap on Polygon V3 to match market demand. + +## Motivation + +Increasing the supply cap of Polygon MaticX in the Aave market is a strategic move to accommodate growing demand, and follow a previous DAO decision to maintain aggressive supply caps for correlated assets. + +Deposits of MaticX have been over 95% of the supply cap for some time. Increasing the Supply Cap will enable users to continue depositing MaticX and enter the recursive MaticX/wMATIC yield strategy. + +The DAO has previously voted to allow assets with correlated borrow supply caps to be up to 75% of cumulative supply. Since this exceeds the supply cap increase allowable by risk stewards, this proposal will increase supply caps through the typical ARFC process. Current circulating supply is over 100M, so this proposal will increase the supply cap to 75M. + +## Specification + +Increase the supply cap for MaticX on Polygon V3 to the following. + +| Parameter | Current Value | Proposed Value | +| --------- | ------------- | -------------- | +| SupplyCap | 62M | 75M | + +Useful Links + +- [Previous ARFC MaticX Supply Cap Increase ](https://governance-v2.aave.com/governance/proposal/278/) +- [MaticX in Polygon V3 Market](https://app.aave.com/reserve-overview/?underlyingAsset=0xfa68fb4628dff1028cfec22b4162fccd0d45efb6&marketName=proto_polygon_v3) + +## References + +- Implementation: [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol) +- Tests: [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.t.sol) +- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0x73b2f1d14eb6710deabe84639ea8b06929738ef1973fee21c26945d17bf57a5b) +- [Discussion](https://governance.aave.com/t/arfc-maticx-supply-cap-increase-in-polygon-v3/16449) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3_20240206.s.sol b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3_20240206.s.sol new file mode 100644 index 000000000..af07e0ef1 --- /dev/null +++ b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3_20240206.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, PolygonScript} from 'aave-helpers/ScriptUtils.sol'; +import {AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206} from './AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol'; + +/** + * @dev Deploy Polygon + * deploy-command: make deploy-ledger contract=src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3_20240206.s.sol:DeployPolygon chain=polygon + * verify-command: npx catapulta-verify -b broadcast/MaticXSupplyCapIncreaseInPolygonV3_20240206.s.sol/137/run-latest.json + */ +contract DeployPolygon is PolygonScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206).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/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3_20240206.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 actionsPolygon = new IPayloadsControllerCore.ExecutionAction[](1); + actionsPolygon[0] = GovV3Helpers.buildAction( + type(AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206).creationCode + ); + payloads[0] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.md' + ) + ); + } +} diff --git a/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/config.ts b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/config.ts new file mode 100644 index 000000000..92902d6c0 --- /dev/null +++ b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/config.ts @@ -0,0 +1,19 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + pools: ['AaveV3Polygon'], + title: 'MaticX Supply Cap Increase in Polygon V3', + shortName: 'MaticXSupplyCapIncreaseInPolygonV3', + date: '20240206', + author: 'Aave Chan Initiative (ACI)', + discussion: 'https://governance.aave.com/t/arfc-maticx-supply-cap-increase-in-polygon-v3/16449', + snapshot: + 'https://snapshot.org/#/aave.eth/proposal/0x73b2f1d14eb6710deabe84639ea8b06929738ef1973fee21c26945d17bf57a5b', + }, + poolOptions: { + AaveV3Polygon: { + configs: {CAPS_UPDATE: [{asset: 'MaticX', supplyCap: '75000000', borrowCap: ''}]}, + cache: {blockNumber: 53201815}, + }, + }, +}; From 59d7fbbfaf834ce4dc50c0fef31f988ef5de11b5 Mon Sep 17 00:00:00 2001 From: Cache bot Date: Tue, 20 Feb 2024 09:29:59 +0000 Subject: [PATCH 4/4] fix(cache): automated cache update [skip ci] --- .../MaticXSupplyCapIncreaseInPolygonV3.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.md b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.md index ba3d5ff37..7475b28e5 100644 --- a/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.md +++ b/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.md @@ -31,8 +31,8 @@ Useful Links ## References -- Implementation: [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol) -- Tests: [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.t.sol) +- Implementation: [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/76cbbd699702d5662409355a40d8ede251c7b06e/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol) +- Tests: [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/76cbbd699702d5662409355a40d8ede251c7b06e/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.t.sol) - [Snapshot](https://snapshot.org/#/aave.eth/proposal/0x73b2f1d14eb6710deabe84639ea8b06929738ef1973fee21c26945d17bf57a5b) - [Discussion](https://governance.aave.com/t/arfc-maticx-supply-cap-increase-in-polygon-v3/16449)