Skip to content

Conversation

@Luigy-Lemon
Copy link
Contributor

@Luigy-Lemon Luigy-Lemon commented Nov 29, 2024

Context

The Collector contract (Revision 5) has the limitation of only allowing one address to call its functions, the _fundsAdmin, which currently is the Governance Executor contract.

To enable the possibility of the FinanceSteward contract to be allowed to call the Collector alongside the Executor, it is recommended to use the ACL_MANAGER to manage its access control.
A new role is going to be created named FUNDS_ADMIN

PS: identified a problem in the VersionedInitializable which due to the introduction of the initializing variable is not backwards compatible with the revision 5 version of the collector. Revision 6 will be launched with a modified version of ______gap length of 49 rather than 50.

Changelog

Collector

  • Initialize function changes to only populate the nextStreamId
  • Created constructor to setup the ACL_MANAGER contract address as immutable variable
  • deprecated _fundsAdmin variable
  • removed getter and setter functions for _fundsAdmin and relevant errors and events.
  • introduced new function to check if an address has the FUNDS_ADMIN role named IsFundsAdmin
  • New tests for the Collector

Proposal

In order to upgrade the Collector:

  1. The new Collector implementation needs to be deployed with a modified VersionedInitializable with ______gap set to 49 and with the current ACL_MANAGER address.
  2. The ACL Manager contract used during the deployment of the Collector needs to be configured with grantRole which should be granted to the current _fundsAdmin, the Executor.

…from initialize function. Deprecated fundsAdmin
TreasuryReport memory treasuryReport;
bytes32 salt = collectorSalt;
address treasuryOwner = poolAdmin;
address aclManager;
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems incomplete, you need to pass in the aclManager otherwise i guess deployment would revert.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Luigy-Lemon you can pass the aclManager from AaveV3PeripheryBatch contract as a function param to _deployAaveV3Treasury()

@sakulstra sakulstra changed the base branch from main to kptk/new-collector December 4, 2024 15:39
@sakulstra sakulstra merged commit d203d4c into aave-dao:kptk/new-collector Dec 5, 2024
sakulstra added a commit that referenced this pull request Feb 10, 2025
### Context

The Collector contract (Revision 5) has the limitation of only allowing one address to call its functions, the `_fundsAdmin`, which currently is the Governance Executor contract.

To enable the possibility of the [FinanceSteward](https://governance.aave.com/t/arfc-aave-finance-steward/17570) contract to be allowed to call the Collector alongside the Executor, it is recommended to use the `ACL_MANAGER` to manage its access control. 
A new role is going to be created named `FUNDS_ADMIN`

### Changelog

Collector

* Initialize function changes to only populate the `nextStreamId`
* Created constructor to setup the `ACL_MANAGER` contract address as immutable variable
* deprecated `_fundsAdmin` variable
* removed getter and setter functions for `_fundsAdmin` and relevant errors and events.
* introduced new function to check if an address has the `FUNDS_ADMIN` role named `IsFundsAdmin`
* New tests for the Collector

Co-authored-by: Luigy-Lemon <[email protected]>
Co-authored-by: Harsh Pandey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants