generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Set aci emission manager Avalanche Network - Review #366
Merged
sendra
merged 14 commits into
bgd-labs:main
from
AaveChan:aavechan/set_ACI_Emission_manager_wavax
Jun 21, 2024
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
24541d2
add funding.json file
MartinGbz 50c6880
add funding.json file
MartinGbz 9302b33
Merge branch 'bgd-labs:main' into main
marczeller b57848b
Merge branch 'bgd-labs:main' into main
marczeller 6e297a9
Merge branch 'bgd-labs:main' into main
marczeller 63290f9
Merge branch 'bgd-labs:main' into main
marczeller d96d3c6
Merge branch 'bgd-labs:main' into main
marczeller cc0f20d
Merge branch 'bgd-labs:main' into main
marczeller d8906f2
Merge branch 'bgd-labs:main' into main
marczeller fd1e7f2
Merge branch 'bgd-labs:main' into main
marczeller e9f2875
init
6d59f66
rm funding json
72ae057
fix typo add new assets
6acad0e
more general title
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...valanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620_after.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Raw diff | ||
|
||
```json | ||
{} | ||
``` |
33 changes: 33 additions & 0 deletions
33
...Network/AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...twork/AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...AXOnTheAvalancheNetwork/SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: "Set ACI as Emission Manager for wAVAX 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/main/src/20240620_AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork/AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.sol) | ||
- Tests: [AaveV3Avalanche](https://github.com/bgd-labs/aave-proposals-v3/blob/main/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/). |
62 changes: 62 additions & 0 deletions
62
...OnTheAvalancheNetwork/SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork_20240620.s.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
) | ||
); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/20240620_AaveV3Avalanche_SetACIAsEmissionManagerForWAVAXOnTheAvalancheNetwork/config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}}}, | ||
}; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing ggAVAX & sAVAX on titles