Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign Emission Admin - Ethereum, Arbitrum and Optimism #229

Merged
merged 4 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol';
import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol';
import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol';

/**
* @title Assign Emission Admin - Ethereum, Arbitirum and Optimism
* @author karpatkey-TokenLogic & ACI
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x4518ee2130b2299fdf0827aa6a97b8211b3273f5b07b6f13b8141e5b9ad89e5f
* - Discussion: https://governance.aave.com/t/arfc-set-arb-emission-admin-to-gauntlet/16554
*/
contract AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229 is
IProposalGenericExecutor
{
IEmissionManager public constant EMISSION_MANAGER =
IEmissionManager(AaveV3Arbitrum.EMISSION_MANAGER);
address public constant EMISSION_ADMIN = 0xE79C65a313a1f4Ca5D1d15414E0c515056dA90b4;

function execute() external {
EMISSION_MANAGER.setEmissionAdmin(AaveV3ArbitrumAssets.ARB_UNDERLYING, EMISSION_ADMIN);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol';

import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229} from './AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229.sol';
import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol';

/**
* @dev Test for AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229
* command: make test-contract filter=AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229
*/
contract AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229_Test is
ProtocolV3TestBase
{
AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229 internal proposal;

address internal arbEmissionAdmin = 0xE79C65a313a1f4Ca5D1d15414E0c515056dA90b4;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('arbitrum'), 185767002);
proposal = new AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229',
AaveV3Arbitrum.POOL,
address(proposal)
);

address admin = IEmissionManager(AaveV3Arbitrum.EMISSION_MANAGER).getEmissionAdmin(
AaveV3ArbitrumAssets.ARB_UNDERLYING
);

assertEq(admin, arbEmissionAdmin);
assertEq(admin, proposal.EMISSION_ADMIN());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol';
import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol';

/**
* @title Assign Emission Admin - Ethereum, Arbitirum and Optimism
* @author karpatkey-TokenLogic & ACI
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x0d83730d546d74d463f045697e9ea6b1708b5c833a40e09e4f87f1804177f5a6 & https://snapshot.org/#/aave.eth/proposal/0xe0579b1efa1f26237104632f4ccddac0158866a18061b27a634634fa9d31e250
* - Discussion: https://governance.aave.com/t/arfc-set-ethx-and-sd-emission-admin-to-stader-labs/16599 & https://governance.aave.com/t/arfc-set-oseth-swise-emission-admin-to-stakewise/16590
*/
contract AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229 is
IProposalGenericExecutor
{
IEmissionManager public constant EMISSION_MANAGER =
IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER);

address public constant SD = 0x30D20208d987713f46DFD34EF128Bb16C404D10f;
address public constant ETHX = 0xA35b1B31Ce002FBF2058D22F30f95D405200A15b;
address public constant EMISSION_ADMIN_SD_ETHX = 0xbDa6C9cd7eD043CB739ca2C748dAbd1fCA397132;

address public constant SWISE = 0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2;
address public constant OSETH = 0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38;
address public constant EMISSION_ADMIN_SWISE_OSETH = 0x189Cb93839AD52b5e955ddA254Ed7212ae1B1f61;

function execute() external {
EMISSION_MANAGER.setEmissionAdmin(SD, EMISSION_ADMIN_SD_ETHX);
EMISSION_MANAGER.setEmissionAdmin(ETHX, EMISSION_ADMIN_SD_ETHX);

EMISSION_MANAGER.setEmissionAdmin(SWISE, EMISSION_ADMIN_SWISE_OSETH);
EMISSION_MANAGER.setEmissionAdmin(OSETH, EMISSION_ADMIN_SWISE_OSETH);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';

import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229} from './AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229.sol';
import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol';

/**
* @dev Test for AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229
* command: make test-contract filter=AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229
*/
contract AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229_Test is
ProtocolV3TestBase
{
AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229 internal proposal;

address internal sdEthxEmissionAdmin = 0xbDa6C9cd7eD043CB739ca2C748dAbd1fCA397132;
address internal swiseOsethEmissionAdmin = 0x189Cb93839AD52b5e955ddA254Ed7212ae1B1f61;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 19335100);
proposal = new AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229',
AaveV3Ethereum.POOL,
address(proposal)
);

assertEq(sdEthxEmissionAdmin, proposal.EMISSION_ADMIN_SD_ETHX());
assertEq(swiseOsethEmissionAdmin, proposal.EMISSION_ADMIN_SWISE_OSETH());

address sdAdmin = IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin(
proposal.SD()
);
assertEq(sdAdmin, proposal.EMISSION_ADMIN_SD_ETHX());

address ethxAdmin = IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin(
proposal.ETHX()
);
assertEq(ethxAdmin, proposal.EMISSION_ADMIN_SD_ETHX());

address swiseAdmin = IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin(
proposal.SWISE()
);
assertEq(swiseAdmin, proposal.EMISSION_ADMIN_SWISE_OSETH());

address osethAdmin = IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin(
proposal.OSETH()
);
assertEq(osethAdmin, proposal.EMISSION_ADMIN_SWISE_OSETH());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol';
import {AaveV3Optimism, AaveV3OptimismAssets} from 'aave-address-book/AaveV3Optimism.sol';
import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol';

/**
* @title Assign Emission Admin - Ethereum, Arbitirum and Optimism
* @author karpatkey-TokenLogic & ACI
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x66040ad4d46ba756365fbe5c2ed5957d17a3e70db5a00ec532fdc725251d2327
* - Discussion: https://governance.aave.com/t/arfc-set-op-emission-admin/16621
*/
contract AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229 is
IProposalGenericExecutor
{
IEmissionManager public constant EMISSION_MANAGER =
IEmissionManager(AaveV3Optimism.EMISSION_MANAGER);
address public constant EMISSION_ADMIN = 0x3479CEb4b1fcaDC586d4c5F1c16b4d8c0D70Bc71;

function execute() external {
EMISSION_MANAGER.setEmissionAdmin(AaveV3OptimismAssets.OP_UNDERLYING, EMISSION_ADMIN);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Optimism, AaveV3OptimismAssets} from 'aave-address-book/AaveV3Optimism.sol';

import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229} from './AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229.sol';
import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol';

/**
* @dev Test for AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229
* command: make test-contract filter=AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229
*/
contract AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229_Test is
ProtocolV3TestBase
{
AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229 internal proposal;
address internal opEmissionsAdmin = 0x3479CEb4b1fcaDC586d4c5F1c16b4d8c0D70Bc71;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('optimism'), 116817141);
proposal = new AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229',
AaveV3Optimism.POOL,
address(proposal)
);

address admin = IEmissionManager(AaveV3Optimism.EMISSION_MANAGER).getEmissionAdmin(
AaveV3OptimismAssets.OP_UNDERLYING
);
assertEq(admin, opEmissionsAdmin);
assertEq(admin, proposal.EMISSION_ADMIN());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: "Assign Emission Admin - Ethereum, Arbitirum and Optimism"
sakulstra marked this conversation as resolved.
Show resolved Hide resolved
author: "karpatkey-TokenLogic & ACI"
sakulstra marked this conversation as resolved.
Show resolved Hide resolved
discussions: "https://governance.aave.com/t/arfc-set-op-emission-admin/16621"
---

## Simple Summary

This enables various teams to distribute rewards across Aave v3 Ethereum.

## Motivation

This AIP integrates four separate ARFC that each propose granting a team the privileges to distribute there chosen asset across an Aave v3 deployment. The below summaries each initiative:

- ETHx & SD rewards by Stader Labs
- osETH & SWISE by Stakewise DAO
- OP reward via an Aave Community SAFE
- ARB rewards via Gauntlet

The two LST providers are intending on using rewards to bootstrap the growth and adoption of there resepective LST.

The OP and ARB incentives are being distributed with the intent of migrating USDC.e to USDC on each respective network. These ARB and OP rewards were originally provide by the respective foundation and are not those belonging to the Aave DAO.

## Specification

The `setEmissionAdmin`, a governance controlled function, assigns the `EMISSION_MANAGER` role for a specified token on the respective network.
sakulstra marked this conversation as resolved.
Show resolved Hide resolved

The `EMISSION_MANAGER` role controls the distribution of the specified token across the specified Aave v3 deployment.

The `EMISSION_MANAGER` can distribute the specified token anywhere across the Aave v3 deployment on the respective Liquidity Pool.

## Implementation

Set `EMISSION_MANAGER` permission for ETHx, SD, SWISE, osETH, OP and ARB to the following address:

**Aave v3 Ethereum**

Address Reward (SD): [0x30D20208d987713f46DFD34EF128Bb16C404D10f](https://etherscan.io/address/0x30D20208d987713f46DFD34EF128Bb16C404D10f)
Address Reward (ETHx): [0xA35b1B31Ce002FBF2058D22F30f95D405200A15b](https://etherscan.io/address/0xA35b1B31Ce002FBF2058D22F30f95D405200A15b)
SD & ETHx EMISSION_ADMIN: [0xbDa6C9cd7eD043CB739ca2C748dAbd1fCA397132](https://etherscan.io/address/0xbDa6C9cd7eD043CB739ca2C748dAbd1fCA397132)

Address Reward (SWISE): [0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2](https://etherscan.io/address/0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2)
Address Reward (osETH): [0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38](https://etherscan.io/address/0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38)
SWISE & osETH EMISSION_ADMIN:[0x189Cb93839AD52b5e955ddA254Ed7212ae1B1f61](https://etherscan.io/address/0x189Cb93839AD52b5e955ddA254Ed7212ae1B1f61)

**Aave v3 Arbitrum**

Address Reward (ARB): [0x912CE59144191C1204E64559FE8253a0e49E6548](https://arbiscan.io/address/0x912CE59144191C1204E64559FE8253a0e49E6548)
EMISSION_ADMIN: [0xE79C65a313a1f4Ca5D1d15414E0c515056dA90b4](https://arbiscan.io/address/0xE79C65a313a1f4Ca5D1d15414E0c515056dA90b4)

**Aave v3 Optimism**

Address Reward (OP): [0x4200000000000000000000000000000000000042](https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000042)
EMISSION_ADMIN: [0x3479CEb4b1fcaDC586d4c5F1c16b4d8c0D70Bc71](https://optimistic.etherscan.io/address/0x3479CEb4b1fcaDC586d4c5F1c16b4d8c0D70Bc71)

The AIP calls setEmissionAdmin() method in the EMISSION_MANAGER contract.

EMISSION_MANAGER.setEmissionAdmin(REWARD_ASSET,EMISSION_ADMIN);

## References

- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitirumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitirumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitirumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229.sol)
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitirumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229.t.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitirumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229.t.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitirumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitirumAndOptimism_20240229.t.sol)
- Snapshot: [SD + ETHx](https://snapshot.org/#/aave.eth/proposal/0x0d83730d546d74d463f045697e9ea6b1708b5c833a40e09e4f87f1804177f5a6), [SWISE + osETH](https://snapshot.org/#/aave.eth/proposal/0xe0579b1efa1f26237104632f4ccddac0158866a18061b27a634634fa9d31e250), [OP](https://snapshot.org/#/aave.eth/proposal/0x66040ad4d46ba756365fbe5c2ed5957d17a3e70db5a00ec532fdc725251d2327) and [ARB](https://snapshot.org/#/aave.eth/proposal/0x4518ee2130b2299fdf0827aa6a97b8211b3273f5b07b6f13b8141e5b9ad89e5f)
- Discussion: [SD + ETHx](https://governance.aave.com/t/arfc-set-ethx-and-sd-emission-admin-to-stader-labs/16599), [SWISE + osETH](https://governance.aave.com/t/arfc-set-oseth-swise-emission-admin-to-stakewise/16590), [OP](https://governance.aave.com/t/arfc-set-op-emission-admin/16621) and [ARB](https://governance.aave.com/t/arfc-set-arb-emission-admin-to-gauntlet/16554)

# Disclosure

TokenLogic, karpatkey and ACI receive no payment for this proposal. TokenLogic and karpatkey are both delegates within the Aave community.

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Loading