Skip to content

Commit

Permalink
feat: freezing stewards (#24)
Browse files Browse the repository at this point in the history
* feat: initial files and aip text

* chore: add deployed addresses and fix links on aip text

* fix: aip text

* fix: aip text title
  • Loading branch information
brotherlymite authored Nov 3, 2023
1 parent 3dc5e65 commit 189b148
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/20231101_Multi_FreezeStewards/FreezeStewards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "Activate Freezing Steward on v3 missing networks"
author: "BGD Labs @bgdlabs"
discussions: "https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274"
---

## Summary

Activates the `FreezingSteward` smart contract across all the networks of the protocol, which allows the emergency admin to freeze reserves, as expected.

Currently, there are freezing stewards live for all the networks except Avalanche, Metis, and Base, and this proposal synchronizes the missing ones.

## Motivation

This is a follow-up to [AIP-319](https://app.aave.com/governance/proposal/319/) where on some networks (Avalanche, Metis, and Base) the proposal wasn’t executed. We now resubmit the proposal as an operational update to maintain security and consistency across Aave V3.

## Specification

Adds the `FreezingSteward` contract as `RISK_ADMIN` on the canonical Aave V3 deployments on the following networks:
- Avalanche
- Metis
- Base

The `FreezingSteward` is identical to the one currently deployed on [Ethereum](https://etherscan.io/address/0x2eE68ACb6A1319de1b49DC139894644E424fefD6#code), [Polygon](https://polygonscan.com/address/0xa7b40ed4dfAC9255EA9Dd218A3874f380D9FbBEB), [Optimism](https://optimistic.etherscan.io/address/0x3829943c53F2d00e20B58475aF19716724bF90Ba), [Arbitrum](https://arbiscan.io/address/0xe59470b3be3293534603487e00a44c72f2cd466d) and only allows for entities holding `EMERGENCY_ADMIN` role on `ACLManager` to freeze reserves.

## References

- Implementation: [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals/blob/eb3b1855f4d9e40d9a84bba5ee45b1c449f219ec/src/20230907_AaveV3_Multi_FreezeStewards/AaveV3_Avalanche_FreezeStewards_20230907.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals/blob/eb3b1855f4d9e40d9a84bba5ee45b1c449f219ec/src/20230907_AaveV3_Multi_FreezeStewards/AaveV3_Metis_FreezeStewards_20230907.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals/blob/eb3b1855f4d9e40d9a84bba5ee45b1c449f219ec/src/20230907_AaveV3_Multi_FreezeStewards/AaveV3_Base_FreezeStewards_20230907.sol)
- Tests: [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals/blob/eb3b1855f4d9e40d9a84bba5ee45b1c449f219ec/src/20230907_AaveV3_Multi_FreezeStewards/AaveV3_Avalanche_FreezeStewards_20230907.t.sol), [AaveV3Metis](https://github.com/bgd-labs/aave-proposals/blob/eb3b1855f4d9e40d9a84bba5ee45b1c449f219ec/src/20230907_AaveV3_Multi_FreezeStewards/AaveV3_Metis_FreezeStewards_20230907.t.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals/blob/eb3b1855f4d9e40d9a84bba5ee45b1c449f219ec/src/20230907_AaveV3_Multi_FreezeStewards/AaveV3_Base_FreezeStewards_20230907.t.sol)
- [Discussion](https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274)

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
39 changes: 39 additions & 0 deletions src/20231101_Multi_FreezeStewards/FreezeStewards_20231101.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol';
import {EthereumScript, AvalancheScript, MetisScript, BaseScript} from 'aave-helpers/ScriptUtils.sol';

/**
* @dev Create Proposal
* command: make deploy-ledger contract=src/20231101_Multi_FreezeStewards/FreezeStewards_20231101.s.sol:CreateProposal chain=mainnet
*/
contract CreateProposal is EthereumScript {
function run() external {
// create payloads
PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](3);

// compose actions for validation
IPayloadsControllerCore.ExecutionAction[]
memory actionsAvalanche = new IPayloadsControllerCore.ExecutionAction[](1);
actionsAvalanche[0] = GovV3Helpers.buildAction(0xa3255CfE96D192dDe036c30b10AF9a29bb358157);
payloads[0] = GovV3Helpers.buildAvalanchePayload(vm, actionsAvalanche);

IPayloadsControllerCore.ExecutionAction[]
memory actionsMetis = new IPayloadsControllerCore.ExecutionAction[](1);
actionsMetis[0] = GovV3Helpers.buildAction(0x0f24aF3ea7460E09E33B2e9814Df5856433BE80D);
payloads[1] = GovV3Helpers.buildMetisPayload(vm, actionsMetis);

IPayloadsControllerCore.ExecutionAction[]
memory actionsBase = new IPayloadsControllerCore.ExecutionAction[](1);
actionsBase[0] = GovV3Helpers.buildAction(0x889c0cc3283DB588A34E89Ad1E8F25B0fc827b4b);
payloads[2] = GovV3Helpers.buildBasePayload(vm, actionsBase);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal2_5(
payloads,
GovV3Helpers.ipfsHashFile(vm, 'src/20231101_Multi_FreezeStewards/FreezeStewards.md')
);
}
}
41 changes: 41 additions & 0 deletions src/20231101_Multi_FreezeStewards/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"rootOptions": {
"pools": [
"AaveV3Avalanche",
"AaveV3Metis",
"AaveV3Base"
],
"title": "Freeze Stewards",
"shortName": "FreezeStewards",
"date": "20231101",
"author": "BGD Labs @bgdlabs",
"discussion": "https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274",
"snapshot": ""
},
"poolOptions": {
"AaveV3Avalanche": {
"configs": {
"OTHERS": {}
},
"features": [
"OTHERS"
]
},
"AaveV3Metis": {
"configs": {
"OTHERS": {}
},
"features": [
"OTHERS"
]
},
"AaveV3Base": {
"configs": {
"OTHERS": {}
},
"features": [
"OTHERS"
]
}
}
}

1 comment on commit 189b148

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Foundry report

forge 0.2.0 (1c7bf46 2023-11-03T13:18:09.461974462Z)
Build log
Compiling 123 files with 0.8.19
Solc 0.8.19 finished in 18.56s
Compiler run successful with warnings:
Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
   --> lib/aave-helpers/src/GovV3Helpers.sol:734:5:
    |
734 |     address votingPortal
    |     ^^^^^^^^^^^^^^^^^^^^

| Contract                                          | Size (kB) | Margin (kB) |
|---------------------------------------------------|-----------|-------------|
| AaveGovernanceV2                                  | 0.086     | 24.49       |
| AaveV1Ethereum_FixedREPPriceFeed_20231031         | 0.706     | 23.87       |
| AaveV2Avalanche                                   | 0.086     | 24.49       |
| AaveV2AvalancheAssets                             | 0.086     | 24.49       |
| AaveV2Ethereum                                    | 0.086     | 24.49       |
| AaveV2EthereumAMM                                 | 0.086     | 24.49       |
| AaveV2EthereumAMMAssets                           | 0.086     | 24.49       |
| AaveV2EthereumAssets                              | 0.086     | 24.49       |
| AaveV2Ethereum_AaveV2EthereumLTReduction_20231030 | 3.023     | 21.553      |
| AaveV2Polygon                                     | 0.086     | 24.49       |
| AaveV2PolygonAssets                               | 0.086     | 24.49       |
| AaveV3Arbitrum                                    | 0.086     | 24.49       |
| AaveV3ArbitrumAssets                              | 0.086     | 24.49       |
| AaveV3ArbitrumEModes                              | 0.086     | 24.49       |
| AaveV3Avalanche                                   | 0.086     | 24.49       |
| AaveV3AvalancheAssets                             | 0.086     | 24.49       |
| AaveV3AvalancheEModes                             | 0.086     | 24.49       |
| AaveV3Ethereum                                    | 0.086     | 24.49       |
| AaveV3EthereumAssets                              | 0.086     | 24.49       |
| AaveV3EthereumEModes                              | 0.086     | 24.49       |
| AaveV3Ethereum_ACIPhaseII_20231029                | 0.682     | 23.894      |
| AaveV3Fantom                                      | 0.086     | 24.49       |
| AaveV3FantomAssets                                | 0.086     | 24.49       |
| AaveV3FantomEModes                                | 0.086     | 24.49       |
| AaveV3Gnosis                                      | 0.086     | 24.49       |
| AaveV3GnosisAssets                                | 0.086     | 24.49       |
| AaveV3GnosisEModes                                | 0.086     | 24.49       |
| AaveV3Gnosis_AaveV3GnosisActivation_20231026      | 8.802     | 15.774      |
| AaveV3Harmony                                     | 0.086     | 24.49       |
| AaveV3HarmonyAssets                               | 0.086     | 24.49       |
| AaveV3HarmonyEModes                               | 0.086     | 24.49       |
| AaveV3Optimism                                    | 0.086     | 24.49       |
| AaveV3OptimismAssets                              | 0.086     | 24.49       |
| AaveV3OptimismEModes                              | 0.086     | 24.49       |
| AaveV3Polygon                                     | 0.086     | 24.49       |
| AaveV3PolygonAssets                               | 0.086     | 24.49       |
| AaveV3PolygonEModes                               | 0.086     | 24.49       |
| Address                                           | 0.086     | 24.49       |
| ChainHelpers                                      | 0.086     | 24.49       |
| ChainIds                                          | 0.086     | 24.49       |
| ConfiguratorInputTypes                            | 0.086     | 24.49       |
| Create2Utils                                      | 0.164     | 24.412      |
| DataTypes                                         | 0.086     | 24.49       |
| EngineFlags                                       | 0.086     | 24.49       |
| Errors                                            | 4.714     | 19.862      |
| GovHelpers                                        | 0.086     | 24.49       |
| GovV3Helpers                                      | 0.086     | 24.49       |
| GovV3StorageHelpers                               | 0.086     | 24.49       |
| GovernanceV3Arbitrum                              | 0.086     | 24.49       |
| GovernanceV3Avalanche                             | 0.086     | 24.49       |
| GovernanceV3BNB                                   | 0.086     | 24.49       |
| GovernanceV3Base                                  | 0.086     | 24.49       |
| GovernanceV3Ethereum                              | 0.086     | 24.49       |
| GovernanceV3Gnosis                                | 0.086     | 24.49       |
| GovernanceV3Metis                                 | 0.086     | 24.49       |
| GovernanceV3Optimism                              | 0.086     | 24.49       |
| GovernanceV3Polygon                               | 0.086     | 24.49       |
| IpfsUtils                                         | 0.086     | 24.49       |
| MiscEthereum                                      | 0.086     | 24.49       |
| MockExecutor                                      | 0.437     | 24.139      |
| PayloadsControllerUtils                           | 0.086     | 24.49       |
| ProxyHelpers                                      | 0.086     | 24.49       |
| ReserveConfiguration                              | 0.171     | 24.405      |
| SafeERC20                                         | 0.086     | 24.49       |
| StdStyle                                          | 0.086     | 24.49       |
| StorageHelpers                                    | 0.086     | 24.49       |
| WadRayMath                                        | 0.086     | 24.49       |
| console                                           | 0.086     | 24.49       |
| console2                                          | 0.086     | 24.49       |
| safeconsole                                       | 0.086     | 24.49       |
| stdError                                          | 0.591     | 23.985      |
| stdJson                                           | 0.086     | 24.49       |
| stdMath                                           | 0.086     | 24.49       |
| stdStorage                                        | 0.086     | 24.49       |
| stdStorageSafe                                    | 0.086     | 24.49       |
Test success 🌈

Please sign in to comment.