generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aavechan/wstETH emission manager on scroll (#300)
* wsteth emission admin on scroll * Update ScrollWstETHEmissionManager.md fixing various typos * Update ScrollWstETHEmissionManager.md * Update src/20240312_AaveV3Scroll_ScrollWstETHEmissionManager/ScrollWstETHEmissionManager.md Co-authored-by: Lukas <lukasstrassel@googlemail.com> --------- Co-authored-by: Marc Zeller <marc@aavechan.com> Co-authored-by: Lukas <lukasstrassel@googlemail.com>
- Loading branch information
1 parent
e881b1e
commit 9e52d09
Showing
6 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...ager_20240312_before_AaveV3Scroll_ScrollWstETHEmissionManager_20240312_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 | ||
{} | ||
``` |
23 changes: 23 additions & 0 deletions
23
...3Scroll_ScrollWstETHEmissionManager/AaveV3Scroll_ScrollWstETHEmissionManager_20240312.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,23 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {AaveV3Scroll, AaveV3ScrollAssets} from 'aave-address-book/AaveV3Scroll.sol'; | ||
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
import {IEmissionManager} from 'aave-v3-periphery/contracts/rewards/interfaces/IEmissionManager.sol'; | ||
|
||
/** | ||
* @title Scroll wstETH Emission Manager | ||
* @author Aave Chan Initiative | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0xb70490f6b0623631686d34f4ca99a7d45394ad29fdd504df3cd6e68790b22b9c | ||
* - Discussion: https://governance.aave.com/t/arfc-set-liquidity-observation-labs-as-emission-manager-for-wsteth-on-scroll/16813 | ||
*/ | ||
contract AaveV3Scroll_ScrollWstETHEmissionManager_20240312 is IProposalGenericExecutor { | ||
address public constant wstETH_EMISSION_ADMIN = 0xC18F11735C6a1941431cCC5BcF13AF0a052A5022; | ||
|
||
function execute() external { | ||
IEmissionManager(AaveV3Scroll.EMISSION_MANAGER).setEmissionAdmin( | ||
AaveV3ScrollAssets.wstETH_UNDERLYING, | ||
wstETH_EMISSION_ADMIN | ||
); | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...croll_ScrollWstETHEmissionManager/AaveV3Scroll_ScrollWstETHEmissionManager_20240312.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,44 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovV3Helpers} from 'aave-helpers/GovV3Helpers.sol'; | ||
import {AaveV3Scroll, AaveV3ScrollAssets} from 'aave-address-book/AaveV3Scroll.sol'; | ||
import {IEmissionManager} from 'aave-v3-periphery/contracts/rewards/interfaces/IEmissionManager.sol'; | ||
|
||
import 'forge-std/Test.sol'; | ||
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; | ||
import {AaveV3Scroll_ScrollWstETHEmissionManager_20240312} from './AaveV3Scroll_ScrollWstETHEmissionManager_20240312.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3Scroll_ScrollWstETHEmissionManager_20240312 | ||
* command: make test-contract filter=AaveV3Scroll_ScrollWstETHEmissionManager_20240312 | ||
*/ | ||
contract AaveV3Scroll_ScrollWstETHEmissionManager_20240312_Test is ProtocolV3TestBase { | ||
AaveV3Scroll_ScrollWstETHEmissionManager_20240312 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('scroll'), 4077518); | ||
proposal = new AaveV3Scroll_ScrollWstETHEmissionManager_20240312(); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
defaultTest( | ||
'AaveV3Scroll_ScrollWstETHEmissionManager_20240312', | ||
AaveV3Scroll.POOL, | ||
address(proposal) | ||
); | ||
} | ||
|
||
function test_isEmmissionAdmin() external { | ||
GovV3Helpers.executePayload(vm, address(proposal)); | ||
assertEq( | ||
IEmissionManager(AaveV3Scroll.EMISSION_MANAGER).getEmissionAdmin( | ||
AaveV3ScrollAssets.wstETH_UNDERLYING | ||
), | ||
0xC18F11735C6a1941431cCC5BcF13AF0a052A5022 | ||
); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...0240312_AaveV3Scroll_ScrollWstETHEmissionManager/ScrollWstETHEmissionManager.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,41 @@ | ||
--- | ||
title: "Scroll wstETH Emission Manager" | ||
author: "Aave Chan Initiative" | ||
discussions: "https://governance.aave.com/t/arfc-set-liquidity-observation-labs-as-emission-manager-for-wsteth-on-scroll/16813" | ||
snapshot: "https://snapshot.org/#/aave.eth/proposal/0xb70490f6b0623631686d34f4ca99a7d45394ad29fdd504df3cd6e68790b22b9c" | ||
--- | ||
|
||
## Simple Summary | ||
|
||
This AIP proposes to set Liquidity Observation Labs wallet as the emission manager for the wstETH token on Scroll. This will enable the Liquidity Observation Labs to define and fund incentive programs for all wstETH markets, including Scroll, promoting growth and expanding the user base of Aave. | ||
|
||
## Motivation | ||
|
||
Governance have already approved setting Liquidity Observation Labs as Emission manager for wstETH on the current Aave V3 Markets. | ||
|
||
But since Scroll market is live, the current AIP is set to establish Liquidity Observation Labs as Emission manager for wstETH, aligning with the desire to actively contribute to the growth and development of the Aave V3. | ||
|
||
By setting their wallet as the emission manager for the wstETH token, the Foundation will be able to directly fund incentive programs that can attract more users to the pool and stimulate activity. This aligns with the broader goals of the Aave community to foster active and engaged markets. | ||
|
||
## Specification | ||
|
||
The Liquidity Observation Labs wallet address is: | ||
|
||
Emission Admin Wallet (Liquidity Observation Labs): [0xC18F11735C6a1941431cCC5BcF13AF0a052A5022](https://safe.scroll.xyz/home?safe=scr:0xC18F11735C6a1941431cCC5BcF13AF0a052A5022) | ||
|
||
The AIP call setEmissionAdmin() method in the emission manager contract. | ||
|
||
`EMISSION_MANAGER.setEmissionAdmin(wstETH,0xC18F11735C6a1941431cCC5BcF13AF0a052A5022);` | ||
|
||
This method will set the Liquidity Observation Labs wallet as the emission admin for the wstETH token on Scroll, besides the current Ethereum, Base, Arbitrum, Optimism, Polygon and Gnosis V3 markets. | ||
|
||
## References | ||
|
||
- Implementation: [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240312_AaveV3Scroll_ScrollWstETHEmissionManager/AaveV3Scroll_ScrollWstETHEmissionManager_20240312.sol) | ||
- Tests: [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240312_AaveV3Scroll_ScrollWstETHEmissionManager/AaveV3Scroll_ScrollWstETHEmissionManager_20240312.t.sol) | ||
- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0xb70490f6b0623631686d34f4ca99a7d45394ad29fdd504df3cd6e68790b22b9c) | ||
- [Discussion](https://governance.aave.com/t/arfc-set-liquidity-observation-labs-as-emission-manager-for-wsteth-on-scroll/16813) | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
58 changes: 58 additions & 0 deletions
58
...40312_AaveV3Scroll_ScrollWstETHEmissionManager/ScrollWstETHEmissionManager_20240312.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,58 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; | ||
import {EthereumScript, ScrollScript} from 'aave-helpers/ScriptUtils.sol'; | ||
import {AaveV3Scroll_ScrollWstETHEmissionManager_20240312} from './AaveV3Scroll_ScrollWstETHEmissionManager_20240312.sol'; | ||
|
||
/** | ||
* @dev Deploy Scroll | ||
* deploy-command: make deploy-ledger contract=src/20240312_AaveV3Scroll_ScrollWstETHEmissionManager/ScrollWstETHEmissionManager_20240312.s.sol:DeployScroll chain=scroll | ||
* verify-command: npx catapulta-verify -b broadcast/ScrollWstETHEmissionManager_20240312.s.sol/534352/run-latest.json | ||
*/ | ||
contract DeployScroll is ScrollScript { | ||
function run() external broadcast { | ||
// deploy payloads | ||
address payload0 = GovV3Helpers.deployDeterministic( | ||
type(AaveV3Scroll_ScrollWstETHEmissionManager_20240312).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/20240312_AaveV3Scroll_ScrollWstETHEmissionManager/ScrollWstETHEmissionManager_20240312.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 actionsScroll = new IPayloadsControllerCore.ExecutionAction[](1); | ||
actionsScroll[0] = GovV3Helpers.buildAction( | ||
type(AaveV3Scroll_ScrollWstETHEmissionManager_20240312).creationCode | ||
); | ||
payloads[0] = GovV3Helpers.buildScrollPayload(vm, actionsScroll); | ||
|
||
// create proposal | ||
vm.startBroadcast(); | ||
GovV3Helpers.createProposal( | ||
vm, | ||
payloads, | ||
GovV3Helpers.ipfsHashFile( | ||
vm, | ||
'src/20240312_AaveV3Scroll_ScrollWstETHEmissionManager/ScrollWstETHEmissionManager.md' | ||
) | ||
); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/20240312_AaveV3Scroll_ScrollWstETHEmissionManager/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,22 @@ | ||
import {ConfigFile} from '../../generator/types'; | ||
export const config: ConfigFile = { | ||
rootOptions: { | ||
author: 'Aave Chan Initiative', | ||
pools: ['AaveV3Scroll'], | ||
title: 'Scroll wstETH Emission Manager', | ||
shortName: 'ScrollWstETHEmissionManager', | ||
date: '20240312', | ||
discussion: | ||
'https://governance.aave.com/t/arfc-set-liquidity-observation-labs-as-emission-manager-for-wsteth-on-scroll/16813', | ||
snapshot: | ||
'https://snapshot.org/#/aave.eth/proposal/0xb70490f6b0623631686d34f4ca99a7d45394ad29fdd504df3cd6e68790b22b9c', | ||
}, | ||
poolOptions: { | ||
AaveV3Scroll: { | ||
configs: { | ||
EMISSION_MANAGER: [{asset: 'wstETH', admin: '0xC18F11735C6a1941431cCC5BcF13AF0a052A5022'}], | ||
}, | ||
cache: {blockNumber: 4077518}, | ||
}, | ||
}, | ||
}; |
9e52d09
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.
Foundry report
Build log
Test success 🌈