Skip to content

Commit

Permalink
Merge branch 'bgd-labs:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
marczeller authored Jun 21, 2024
2 parents fd1e7f2 + 362757a commit 2908576
Show file tree
Hide file tree
Showing 7 changed files with 189 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Raw diff

```json
{}
```
7 changes: 7 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ remappings = [
]
ffi = true
fs_permissions = [{ access = "write", path = "./reports" }]
evm_version = 'shanghai'

# incomplete list at https://www.evmdiff.com/features?name=PUSH0&kind=opcode
[profile.metis]
Expand All @@ -33,6 +34,12 @@ evm_version = 'shanghai'
[profile.avalanche]
evm_version = 'shanghai'

[profile.gnosis]
evm_version = 'shanghai'

[profile.bnb]
evm_version = 'shanghai'

[rpc_endpoints]
mainnet = "${RPC_MAINNET}"
optimism = "${RPC_OPTIMISM}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

/**
* @title Set ACI as Emission Manager for wAVAX on the Avalanche network
* @author ACI
* - Discussion: https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/4
*/
contract AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620 is
IProposalGenericExecutor
{
address public constant AVAX_EMISSION_ADMIN = 0xac140648435d03f784879cd789130F22Ef588Fcd;
address public constant GGAVAX = 0xA25EaF2906FA1a3a13EdAc9B9657108Af7B703e3;

function execute() external {
IEmissionManager(AaveV3Avalanche.EMISSION_MANAGER).setEmissionAdmin(
AaveV3AvalancheAssets.WAVAX_UNDERLYING,
AVAX_EMISSION_ADMIN
);
IEmissionManager(AaveV3Avalanche.EMISSION_MANAGER).setEmissionAdmin(
AaveV3AvalancheAssets.sAVAX_UNDERLYING,
AVAX_EMISSION_ADMIN
);
IEmissionManager(AaveV3Avalanche.EMISSION_MANAGER).setEmissionAdmin(
GGAVAX,
AVAX_EMISSION_ADMIN
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620} from './AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.sol';

/**
* @dev Test for AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620
* command: FOUNDRY_PROFILE=avalanche forge test --match-path=src/20240620_AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork/AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.t.sol -vv
*/
contract AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620_Test is
ProtocolV3TestBase
{
AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('avalanche'), 46972185);
proposal = new AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620',
AaveV3Avalanche.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "Set ACI as Emission Manager on the Avalanche network"
author: "ACI"
discussions: "https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/4"
---

## Simple Summary

Following coordination with the Avalanche Foundation, the ACI is requesting governance approval to appoint the ACI multisig to operate an LM program on the Avalanche network on their behalf.

## Motivation

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, ACI, with its extensive experience and strategic partnerships, is well-positioned to manage these emissions effectively.

A recent example is the [Long Term Incentive Program (LTIPP) ](https://forum.arbitrum.foundation/t/aave-ltipp-application-final/21741) from Arbitrum DAO, where Aave DAO will receive 750,000 ARB tokens, illustrating the benefits of coordinated emission management.

## Specification

The ACI multisig address will be set as the emission manager via the **`setEmissionAdmin()`** method in the relevant emission manager contracts.

ACI multisig address: `0xac140648435d03f784879cd789130F22Ef588Fcd`

This method will appoint the Aave Chan Initiative (ACI) wallet as the emissions admin for the wAVAX, ggAVAX & sAVAX assets on the Avalanche network

## References

- Implementation: [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals-v3/blob/08854fc3e25d6934a737ea89b17b55a34fc3aa08/src/20240620_AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork/AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.sol)
- Tests: [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals-v3/blob/08854fc3e25d6934a737ea89b17b55a34fc3aa08/src/20240620_AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork/AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.t.sol)
- [Discussion](https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/4)

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {EthereumScript, AvalancheScript} from 'aave-helpers/ScriptUtils.sol';
import {AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620} from './AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.sol';

/**
* @dev Deploy Avalanche
* deploy-command: make deploy-ledger contract=src/20240620_AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork/SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.s.sol:DeployAvalanche chain=avalanche
* verify-command: FOUNDRY_PROFILE=avalanche npx catapulta-verify -b broadcast/SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.s.sol/43114/run-latest.json
*/
contract DeployAvalanche is AvalancheScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620)
.creationCode
);

// compose action
IPayloadsControllerCore.ExecutionAction[]
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
actions[0] = GovV3Helpers.buildAction(payload0);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
}
}

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

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

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL,
GovV3Helpers.ipfsHashFile(
vm,
'src/20240620_AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork/SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork.md'
)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {ConfigFile} from '../../generator/types';
export const config: ConfigFile = {
rootOptions: {
pools: ['AaveV3Avalanche'],
title: 'Set ACI as Emission Manager for wAVAX on the Avalanche network',
shortName: 'SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork',
date: '20240620',
author: 'ACI',
discussion:
'https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/4',
snapshot: '',
votingNetwork: 'POLYGON',
},
poolOptions: {AaveV3Avalanche: {configs: {OTHERS: {}}, cache: {blockNumber: 46972185}}},
};

0 comments on commit 2908576

Please sign in to comment.