From f1bc9912d0d9a0c74d15b61175a168c4615a2538 Mon Sep 17 00:00:00 2001 From: Marc Zeller Date: Thu, 19 Oct 2023 19:38:20 +0200 Subject: [PATCH 1/5] payload deployed (#340) --- ...gAaveDAOSLiquidityIncentiveStrategyOnBalancer_20231017.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/20231017_AaveV3_Eth_EnhancingAaveDAOSLiquidityIncentiveStrategyOnBalancer/AaveV3_EnhancingAaveDAOSLiquidityIncentiveStrategyOnBalancer_20231017.s.sol b/src/20231017_AaveV3_Eth_EnhancingAaveDAOSLiquidityIncentiveStrategyOnBalancer/AaveV3_EnhancingAaveDAOSLiquidityIncentiveStrategyOnBalancer_20231017.s.sol index bbf8f61a..b67ee0e9 100644 --- a/src/20231017_AaveV3_Eth_EnhancingAaveDAOSLiquidityIncentiveStrategyOnBalancer/AaveV3_EnhancingAaveDAOSLiquidityIncentiveStrategyOnBalancer_20231017.s.sol +++ b/src/20231017_AaveV3_Eth_EnhancingAaveDAOSLiquidityIncentiveStrategyOnBalancer/AaveV3_EnhancingAaveDAOSLiquidityIncentiveStrategyOnBalancer_20231017.s.sol @@ -22,7 +22,7 @@ contract DeployEthereum is EthereumScript { contract CreateProposal is EthereumScript { function run() external broadcast { GovHelpers.Payload[] memory payloads = new GovHelpers.Payload[](1); - payloads[0] = GovHelpers.buildMainnet(address(0)); + payloads[0] = GovHelpers.buildMainnet(0x8E6701Bfd7FACB64Fb0d6F368BeB5E1C3b13115E); GovHelpers.createProposal( payloads, GovHelpers.ipfsHashFile( From 40685b9bb6b61367cc52e261631395f95fbb3c52 Mon Sep 17 00:00:00 2001 From: Rustem Kurmaev Date: Mon, 23 Oct 2023 11:57:11 +0300 Subject: [PATCH 2/5] unify fallback oracles (#205) * unify fallback oracles * Fallback unification. - Completed description. - Deployed payload. --------- Co-authored-by: eboado --- .../AaveV2EthUnifyFallbackOracles20230507.sol | 22 +++++++++++++ ...aveV2EthUnifyFallbackOracles20230507.t.sol | 27 ++++++++++++++++ ...V2_Eth_UnifyFallbackOracles_20230507.s.sol | 22 +++++++++++++ .../UnifyFallbackOracles.md | 31 +++++++++++++++++++ 4 files changed, 102 insertions(+) create mode 100644 src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.sol create mode 100644 src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol create mode 100644 src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2_Eth_UnifyFallbackOracles_20230507.s.sol create mode 100644 src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md diff --git a/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.sol b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.sol new file mode 100644 index 00000000..1e0bb4b2 --- /dev/null +++ b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; +import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; +import {AaveV2EthereumAMM} from 'aave-address-book/AaveV2EthereumAMM.sol'; +import {IAaveOracle} from 'aave-address-book/AaveV2.sol'; + +/** + * @title Prices operational update. Unify disabled fallback oracles + * @author BGD Labs (@bgdlabs) + * - Discussion: https://governance.aave.com/t/bgd-operational-oracles-update/13213/13 + */ +contract AaveV2EthUnifyFallbackOracles20230507 is IProposalGenericExecutor { + address public constant AAVE_V1_ORACLE = 0x76B47460d7F7c5222cFb6b6A75615ab10895DDe4; + + function execute() external { + AaveV2Ethereum.ORACLE.setFallbackOracle(address(0)); + AaveV2EthereumAMM.ORACLE.setFallbackOracle(address(0)); + IAaveOracle(AAVE_V1_ORACLE).setFallbackOracle(address(0)); + } +} diff --git a/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol new file mode 100644 index 00000000..954bb58a --- /dev/null +++ b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import 'forge-std/Test.sol'; +import {GovHelpers} from 'aave-helpers/GovHelpers.sol'; +import {ProtocolV2TestBase} from 'aave-helpers/ProtocolV2TestBase.sol'; +import {AaveGovernanceV2} from 'aave-address-book/AaveGovernanceV2.sol'; +import {AaveV2Ethereum} from 'aave-address-book/AaveV2Ethereum.sol'; +import {AaveV2EthereumAMM} from 'aave-address-book/AaveV2EthereumAMM.sol'; +import {IAaveOracle} from 'aave-address-book/AaveV2.sol'; +import {AaveV2EthUnifyFallbackOracles20230507} from './AaveV2EthUnifyFallbackOracles20230507.sol'; + +contract AaveV2EthUnifyFallbackOracles20230507_Test is ProtocolV2TestBase { + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 17627699); + } + + function testProposalExecution() public { + AaveV2EthUnifyFallbackOracles20230507 proposal = new AaveV2EthUnifyFallbackOracles20230507(); + + GovHelpers.executePayload(vm, address(proposal), AaveGovernanceV2.SHORT_EXECUTOR); + + assertEq(AaveV2Ethereum.ORACLE.getFallbackOracle(), address(0)); + assertEq(AaveV2EthereumAMM.ORACLE.getFallbackOracle(), address(0)); + assertEq(IAaveOracle(proposal.AAVE_V1_ORACLE()).getFallbackOracle(), address(0)); + } +} diff --git a/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2_Eth_UnifyFallbackOracles_20230507.s.sol b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2_Eth_UnifyFallbackOracles_20230507.s.sol new file mode 100644 index 00000000..89c62dcc --- /dev/null +++ b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2_Eth_UnifyFallbackOracles_20230507.s.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovHelpers} from 'aave-helpers/GovHelpers.sol'; +import {EthereumScript} from 'aave-helpers/ScriptUtils.sol'; +import {AaveV2EthUnifyFallbackOracles20230507} from './AaveV2EthUnifyFallbackOracles20230507.sol'; + +// make deploy-ledger contract=src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2_Eth_UnifyFallbackOracles_20230507.s.sol:DeployEthereum chain=mainnet +contract DeployEthereum is EthereumScript { + function run() external broadcast { + new AaveV2EthUnifyFallbackOracles20230507(); + } +} + +// make deploy-ledger contract=src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2_Eth_UnifyFallbackOracles_20230507.s.sol:CreateProposal chain=mainnet +contract CreateProposal is EthereumScript { + function run() external broadcast { + GovHelpers.Payload[] memory payloads = new GovHelpers.Payload[](1); + payloads[0] = GovHelpers.buildMainnet(0x4fe817deCEf9f6E793370FC057A7DA6BC0fEdFA7); + GovHelpers.createProposal(payloads, GovHelpers.ipfsHashFile(vm, 'src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md')); + } +} \ No newline at end of file diff --git a/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md new file mode 100644 index 00000000..b8527dbb --- /dev/null +++ b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md @@ -0,0 +1,31 @@ +--- +title: Prices operational update. Unify disabled fallback oracles +author: BGD Labs (@bgdlabs) +discussions: https://governance.aave.com/t/bgd-operational-oracles-update/13213/13 +--- + +## Simple Summary + +Unify the approach of Aave v1 and Aave v2 fallback oracles with Aave v3: fully disabling it by pointing to address(0), until (if) the community decides to explicitly re-activating them. + +## Motivation + +The fallback oracle is a legacy mechanism, currently deprecated, as reliance on the main oracle (Chainlink) is expected, so there is not really much value on fallback. + +Even if currently the community is exploring re-activating the fallback in Aave v3 Optimism, before that, the fallback should be configured on all Aave instances to the null address (address(0)), to be technically fully consistent. + +More specifically, this will affect Aave v1 and all the Aave v2 instances on which there is any inactive fallback connected. + +## Specification + +- call `ORACLE.setFallbackOracle(address(0))` to replace the fallback oracle with the null address on Aave v1, Aave v2 and Aave v2 AMM + +## References + +- Implementation: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV2_Eth_RemoveFallbackOracles_20230407/AaveV2EthRemoveFallbackOracles20230407.sol) +- Tests: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol) +- [Discussion](https://governance.aave.com/t/bgd-operational-oracles-update/13213/13) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From 6d1533b4903ac4c6ceb055fa40739d51bf8af1e1 Mon Sep 17 00:00:00 2001 From: Cache bot Date: Mon, 23 Oct 2023 08:57:40 +0000 Subject: [PATCH 3/5] fix(cache): automated cache update [skip ci] --- .../UnifyFallbackOracles.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md index b8527dbb..d32db416 100644 --- a/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md +++ b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md @@ -22,8 +22,8 @@ More specifically, this will affect Aave v1 and all the Aave v2 instances on whi ## References -- Implementation: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV2_Eth_RemoveFallbackOracles_20230407/AaveV2EthRemoveFallbackOracles20230407.sol) -- Tests: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol) +- Implementation: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/40685b9bb6b61367cc52e261631395f95fbb3c52/src/AaveV2_Eth_RemoveFallbackOracles_20230407/AaveV2EthRemoveFallbackOracles20230407.sol) +- Tests: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/40685b9bb6b61367cc52e261631395f95fbb3c52/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol) - [Discussion](https://governance.aave.com/t/bgd-operational-oracles-update/13213/13) ## Copyright From 65515e206f1d3e2aa33ccb6e65e42345e5ada866 Mon Sep 17 00:00:00 2001 From: Lukas Date: Mon, 23 Oct 2023 12:02:30 +0200 Subject: [PATCH 4/5] fix: typo in aip (#343) --- .../UnifyFallbackOracles.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md index d32db416..b1805845 100644 --- a/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md +++ b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md @@ -22,8 +22,8 @@ More specifically, this will affect Aave v1 and all the Aave v2 instances on whi ## References -- Implementation: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/40685b9bb6b61367cc52e261631395f95fbb3c52/src/AaveV2_Eth_RemoveFallbackOracles_20230407/AaveV2EthRemoveFallbackOracles20230407.sol) -- Tests: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/40685b9bb6b61367cc52e261631395f95fbb3c52/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol) +- Implementation: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.sol) +- Tests: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol) - [Discussion](https://governance.aave.com/t/bgd-operational-oracles-update/13213/13) ## Copyright From 8f543e28a0265e69635a3101e21112fa8440af95 Mon Sep 17 00:00:00 2001 From: Cache bot Date: Mon, 23 Oct 2023 10:02:58 +0000 Subject: [PATCH 5/5] fix(cache): automated cache update [skip ci] --- .../UnifyFallbackOracles.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md index b1805845..fdf49e18 100644 --- a/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md +++ b/src/AaveV2_Eth_UnifyFallbackOracles_20230507/UnifyFallbackOracles.md @@ -22,8 +22,8 @@ More specifically, this will affect Aave v1 and all the Aave v2 instances on whi ## References -- Implementation: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.sol) -- Tests: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol) +- Implementation: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/65515e206f1d3e2aa33ccb6e65e42345e5ada866/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.sol) +- Tests: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/65515e206f1d3e2aa33ccb6e65e42345e5ada866/src/AaveV2_Eth_UnifyFallbackOracles_20230507/AaveV2EthUnifyFallbackOracles20230507.t.sol) - [Discussion](https://governance.aave.com/t/bgd-operational-oracles-update/13213/13) ## Copyright