Skip to content

Commit 3f83bdb

Browse files
marczellermarczellersakulstra
authored
Set ACI as Emission Manager for USDS & aUSDS - Review (#468)
* init * fix: use onchain addresses * added wstETH added md comment --------- Co-authored-by: marczeller <[email protected]> Co-authored-by: Lukas <[email protected]>
1 parent 6711f9c commit 3f83bdb

6 files changed

+222
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Raw diff
2+
3+
```json
4+
{}
5+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol';
5+
import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
6+
import {AaveV3EthereumLido, AaveV3EthereumLidoAssets} from 'aave-address-book/AaveV3EthereumLido.sol';
7+
import {IEmissionManager} from 'aave-v3-periphery/contracts/rewards/interfaces/IEmissionManager.sol';
8+
import {DataTypes} from 'aave-v3-origin/core/contracts/protocol/libraries/types/DataTypes.sol';
9+
10+
/**
11+
* @title Set ACI as Emission Manager for USDS and aUSDS
12+
* @author ACI
13+
* - Snapshot: Direct-To-AIP
14+
* - Discussion: https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/18
15+
*/
16+
contract AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929 is
17+
IProposalGenericExecutor
18+
{
19+
address public constant ACI_MULTISIG = 0xac140648435d03f784879cd789130F22Ef588Fcd;
20+
address public constant USDS = 0xdC035D45d973E3EC169d2276DDab16f1e407384F; // Hardcoded as lib is not updated yet.
21+
address public constant awstETH = AaveV3EthereumLidoAssets.wstETH_A_TOKEN;
22+
23+
function execute() external {
24+
IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).setEmissionAdmin(USDS, ACI_MULTISIG);
25+
DataTypes.ReserveDataLegacy memory protoUSDS = AaveV3Ethereum.POOL.getReserveData(USDS);
26+
IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).setEmissionAdmin(
27+
protoUSDS.aTokenAddress,
28+
ACI_MULTISIG
29+
);
30+
DataTypes.ReserveDataLegacy memory lidoUSDS = AaveV3EthereumLido.POOL.getReserveData(USDS);
31+
IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).setEmissionAdmin(
32+
lidoUSDS.aTokenAddress,
33+
ACI_MULTISIG
34+
);
35+
IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).setEmissionAdmin(awstETH, ACI_MULTISIG);
36+
}
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
5+
import {AaveV3EthereumLido} from 'aave-address-book/AaveV3EthereumLido.sol';
6+
import {GovV3Helpers} from 'aave-helpers/src/GovV3Helpers.sol';
7+
import {DataTypes} from 'aave-v3-origin/core/contracts/protocol/libraries/types/DataTypes.sol';
8+
import {IEmissionManager} from 'aave-v3-periphery/contracts/rewards/interfaces/IEmissionManager.sol';
9+
10+
import 'forge-std/Test.sol';
11+
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/src/ProtocolV3TestBase.sol';
12+
import {AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929} from './AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929.sol';
13+
14+
/**
15+
* @dev Test for AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929
16+
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20240929_AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS/AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929.t.sol -vv
17+
*/
18+
contract AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929_Test is ProtocolV3TestBase {
19+
AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929 internal proposal;
20+
21+
function setUp() public {
22+
vm.createSelectFork(vm.rpcUrl('mainnet'), 20858722);
23+
proposal = new AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929();
24+
}
25+
26+
/**
27+
* @dev executes the generic test suite including e2e and config snapshots
28+
*/
29+
function test_defaultProposalExecution() public {
30+
GovV3Helpers.executePayload(vm, 183);
31+
defaultTest(
32+
'AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929',
33+
AaveV3Ethereum.POOL,
34+
address(proposal)
35+
);
36+
}
37+
38+
function test_emissions_admin() public {
39+
GovV3Helpers.executePayload(vm, 183);
40+
GovV3Helpers.executePayload(vm, address(proposal));
41+
assertEq(
42+
IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin(proposal.USDS()),
43+
proposal.ACI_MULTISIG()
44+
);
45+
DataTypes.ReserveDataLegacy memory protoUSDS = AaveV3Ethereum.POOL.getReserveData(
46+
proposal.USDS()
47+
);
48+
assertEq(
49+
IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin(protoUSDS.aTokenAddress),
50+
proposal.ACI_MULTISIG()
51+
);
52+
DataTypes.ReserveDataLegacy memory lidoUSDS = AaveV3EthereumLido.POOL.getReserveData(
53+
proposal.USDS()
54+
);
55+
assertEq(
56+
IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin(lidoUSDS.aTokenAddress),
57+
proposal.ACI_MULTISIG()
58+
);
59+
assertEq(
60+
IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin(proposal.awstETH()),
61+
proposal.ACI_MULTISIG()
62+
);
63+
}
64+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: "Set ACI as Emission Manager for USDS, aUSDS and awstETH"
3+
author: "ACI"
4+
discussions: "https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/18"
5+
snapshot: "Direct-To-AIP"
6+
---
7+
8+
## Simple Summary
9+
10+
This AIP proposes to appoint the Aave-Chan Initiative (ACI) as the Emission Manager for USDS, aUSDS and awstETH on Aave Ethereum Main & Lido instances.
11+
12+
## Motivation
13+
14+
Liquidity mining programs are essential for attracting liquidity providers by offering rewards for their participation. Effective management of these programs is crucial for the sustained growth of the Aave Ecosystem. Therefore, with its extensive experience and strategic partnerships, ACI is well-positioned to manage these emissions effectively.
15+
16+
To support Aave & Sky ecosystem synergies, The ACI will manage liquidity mining programs for USDS suppliers on Aave.
17+
18+
This proposal also seeks to allow wstETH suppliers on the lido instance to receive incentives in line with the Ahab Program
19+
20+
## Specification
21+
22+
The ACI multisig address will be set as the emission manager via the setEmissionAdmin() method in the relevant emission manager contracts for USDS & aUSDS.
23+
24+
ACI multisig address: 0xac140648435d03f784879cd789130F22Ef588Fcd
25+
USDS: [0xdC035D45d973E3EC169d2276DDab16f1e407384F](https://etherscan.io/address/0xdC035D45d973E3EC169d2276DDab16f1e407384F)
26+
aEthUSDS*: [0x32a6268f9Ba3642Dda7892aDd74f1D34469A4259](https://etherscan.io/address/0x32a6268f9Ba3642Dda7892aDd74f1D34469A4259)
27+
aEthLidoUSDS*: [0x09AA30b182488f769a9824F15E6Ce58591Da4781](https://etherscan.io/address/0x09AA30b182488f769a9824F15E6Ce58591Da4781)
28+
Aave Emission Manager contract on Ethereum: [0x223d844fc4B006D67c0cDbd39371A9F73f69d974](https://etherscan.io/address/0x223d844fc4B006D67c0cDbd39371A9F73f69d974)
29+
30+
- This payload requires the [AIP-175](https://vote.onaave.com/proposal/?proposalId=175&ipfsHash=0xe2efa3b07ac0333e5b8f6b57377a4ace8d43add290b780ac9924d6131ae797f7)
31+
to be executed to allow aEthUSDS & aEthLidoUSDS creation
32+
33+
## References
34+
35+
- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240929_AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS/AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929.sol)
36+
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240929_AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS/AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929.t.sol)
37+
- [Discussion](https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/18)
38+
39+
## Copyright
40+
41+
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/src/GovV3Helpers.sol';
5+
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
6+
import {EthereumScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol';
7+
import {AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929} from './AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929.sol';
8+
9+
/**
10+
* @dev Deploy Ethereum
11+
* deploy-command: make deploy-ledger contract=src/20240929_AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS/SetACIAsEmissionManagerForUSDSAndAUSDS_20240929.s.sol:DeployEthereum chain=mainnet
12+
* verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/SetACIAsEmissionManagerForUSDSAndAUSDS_20240929.s.sol/1/run-latest.json
13+
*/
14+
contract DeployEthereum is EthereumScript {
15+
function run() external broadcast {
16+
// deploy payloads
17+
address payload0 = GovV3Helpers.deployDeterministic(
18+
type(AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929).creationCode
19+
);
20+
21+
// compose action
22+
IPayloadsControllerCore.ExecutionAction[]
23+
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
24+
actions[0] = GovV3Helpers.buildAction(payload0);
25+
26+
// register action at payloadsController
27+
GovV3Helpers.createPayload(actions);
28+
}
29+
}
30+
31+
/**
32+
* @dev Create Proposal
33+
* command: make deploy-ledger contract=src/20240929_AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS/SetACIAsEmissionManagerForUSDSAndAUSDS_20240929.s.sol:CreateProposal chain=mainnet
34+
*/
35+
contract CreateProposal is EthereumScript {
36+
function run() external {
37+
// create payloads
38+
PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1);
39+
40+
// compose actions for validation
41+
IPayloadsControllerCore.ExecutionAction[]
42+
memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1);
43+
actionsEthereum[0] = GovV3Helpers.buildAction(
44+
type(AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS_20240929).creationCode
45+
);
46+
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum);
47+
48+
// create proposal
49+
vm.startBroadcast();
50+
GovV3Helpers.createProposal(
51+
vm,
52+
payloads,
53+
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL,
54+
GovV3Helpers.ipfsHashFile(
55+
vm,
56+
'src/20240929_AaveV3Ethereum_SetACIAsEmissionManagerForUSDSAndAUSDS/SetACIAsEmissionManagerForUSDSAndAUSDS.md'
57+
)
58+
);
59+
}
60+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import {ConfigFile} from '../../generator/types';
2+
export const config: ConfigFile = {
3+
rootOptions: {
4+
pools: ['AaveV3Ethereum'],
5+
title: 'Set ACI as Emission Manager for USDS and aUSDS',
6+
shortName: 'SetACIAsEmissionManagerForUSDSAndAUSDS',
7+
date: '20240929',
8+
author: 'ACI',
9+
discussion:
10+
'https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/18',
11+
snapshot: 'Direct-To-AIP',
12+
votingNetwork: 'POLYGON',
13+
},
14+
poolOptions: {AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 20858722}}},
15+
};

0 commit comments

Comments
 (0)