From c1b05575e1d92634801a866bfe429158cbfb9d1a Mon Sep 17 00:00:00 2001 From: Harsh Pandey Date: Tue, 14 Jan 2025 16:19:28 +0530 Subject: [PATCH] feat: weETH cap reduce --- ...AaveV3Ethereum_WeETHCapReduce_20250114.sol | 30 +++++++++++++++++++ .../config.ts | 17 +++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/contracts/updates/20250114_AaveV3Ethereum_WeETHCapReduce/AaveV3Ethereum_WeETHCapReduce_20250114.sol create mode 100644 src/contracts/updates/20250114_AaveV3Ethereum_WeETHCapReduce/config.ts diff --git a/src/contracts/updates/20250114_AaveV3Ethereum_WeETHCapReduce/AaveV3Ethereum_WeETHCapReduce_20250114.sol b/src/contracts/updates/20250114_AaveV3Ethereum_WeETHCapReduce/AaveV3Ethereum_WeETHCapReduce_20250114.sol new file mode 100644 index 0000000..55ed9f9 --- /dev/null +++ b/src/contracts/updates/20250114_AaveV3Ethereum_WeETHCapReduce/AaveV3Ethereum_WeETHCapReduce_20250114.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; +import {RiskStewardsEthereum} from '../../../../scripts/networks/RiskStewardsEthereum.s.sol'; +import {EngineFlags} from 'aave-v3-origin/src/contracts/extensions/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/src/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; + +/** + * @title weETH cap reduce + * @author BGD Labs + * - deploy-command: make run-script contract=src/contracts/updates/20250114_AaveV3Ethereum_WeETHCapReduce/AaveV3Ethereum_WeETHCapReduce_20250114.sol:AaveV3Ethereum_WeETHCapReduce_20250114 network=mainnet broadcast=false generate_diff=true skip_timelock=false + */ +contract AaveV3Ethereum_WeETHCapReduce_20250114 is RiskStewardsEthereum { + function name() public pure override returns (string memory) { + return 'AaveV3Ethereum_WeETHCapReduce_20250114'; + } + + function capsUpdates() public pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capsUpdate = new IAaveV3ConfigEngine.CapsUpdate[](1); + + capsUpdate[0] = IAaveV3ConfigEngine.CapsUpdate({ + asset: AaveV3EthereumAssets.weETH_UNDERLYING, + supplyCap: EngineFlags.KEEP_CURRENT, + borrowCap: 100_000 + }); + + return capsUpdate; + } +} diff --git a/src/contracts/updates/20250114_AaveV3Ethereum_WeETHCapReduce/config.ts b/src/contracts/updates/20250114_AaveV3Ethereum_WeETHCapReduce/config.ts new file mode 100644 index 0000000..b1254b6 --- /dev/null +++ b/src/contracts/updates/20250114_AaveV3Ethereum_WeETHCapReduce/config.ts @@ -0,0 +1,17 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + pools: ['AaveV3Ethereum'], + title: 'weETH cap reduce', + shortName: 'WeETHCapReduce', + date: '20250114', + author: 'BGD Labs', + discussion: '', + }, + poolOptions: { + AaveV3Ethereum: { + configs: {CAPS_UPDATE: [{asset: 'weETH', supplyCap: '', borrowCap: '100000'}]}, + cache: {blockNumber: 21622225}, + }, + }, +};