This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init aip * added debugging * mock transfer * fix comment * rename folder * fix: Add clean ups for Events AIP * update aip text * Update src/20231010_AaveV3_Eth_EventsAip/EventsAip.md Co-authored-by: Harsh Pandey <[email protected]> * pr feedback * fix: Replace swap&transfer with just transfer due to upcoming proposals * remove swap * simplify setup * update tests * fix: add cleanups * docs: Fix docs --------- Co-authored-by: miguelmtzinf <[email protected]> * fix: aip * aip text and submission --------- Co-authored-by: miguelmtzinf <[email protected]> Co-authored-by: Harsh Pandey <[email protected]>
- Loading branch information
1 parent
5f624ad
commit b610d58
Showing
5 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...tension_20230830_postAaveV3_Ethereum_SigmaPrimeAuditBudgetExtension_20230830.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
src/20231010_AaveV3_Eth_EventsAip/AaveV3_Ethereum_EventsAip_20231010.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 {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; | ||
|
||
/** | ||
* @title Aave Events & Sponsorship Budget Proposal | ||
* @dev Transfer GHO to Aave Co receiver address. | ||
* @author AaveCo | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0xdcb072d9782c5160d824ee37919c1be35024bd5aec579a86fdfc024f60213ca1 | ||
* - Discussion: https://governance.aave.com/t/temp-check-aave-events-sponsorship-budget/14953 | ||
*/ | ||
contract AaveV3_Ethereum_EventsAip_20231010 is IProposalGenericExecutor { | ||
address public constant RECEIVER = 0x1c037b3C22240048807cC9d7111be5d455F640bd; | ||
|
||
uint256 public constant GHO_AMOUNT = 550_000e18; | ||
|
||
function execute() external { | ||
// transfers gho tokens to receiver | ||
AaveV3Ethereum.COLLECTOR.transfer(AaveV3EthereumAssets.GHO_UNDERLYING, RECEIVER, GHO_AMOUNT); | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
src/20231010_AaveV3_Eth_EventsAip/AaveV3_Ethereum_EventsAip_20231010.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,78 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovHelpers} from 'aave-helpers/GovHelpers.sol'; | ||
import {AaveGovernanceV2} from 'aave-address-book/AaveGovernanceV2.sol'; | ||
import {ProtocolV2TestBase} from 'aave-helpers/ProtocolV2TestBase.sol'; | ||
import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; | ||
import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; | ||
|
||
import {AaveMisc} from 'aave-address-book/AaveMisc.sol'; | ||
import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; | ||
import {AaveV3_Ethereum_EventsAip_20231010} from './AaveV3_Ethereum_EventsAip_20231010.sol'; | ||
import 'forge-std/console.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3_Ethereum_EventsAip_20231010 | ||
* command: make test-contract filter=AaveV3_Ethereum_EventsAip_20231010 | ||
*/ | ||
|
||
contract AaveV3_Ethereum_EventsAip_20231010_Test is ProtocolV2TestBase { | ||
AaveV3_Ethereum_EventsAip_20231010 internal proposal; | ||
|
||
address RECEIVER = 0x1c037b3C22240048807cC9d7111be5d455F640bd; | ||
address COLLECTOR = 0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c; | ||
|
||
uint256 public constant GHO_AMOUNT = 550_000e18; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('mainnet'), 18390065); | ||
proposal = new AaveV3_Ethereum_EventsAip_20231010(); | ||
} | ||
|
||
function testProposalExecution() public { | ||
AaveV3_Ethereum_EventsAip_20231010 payload = new AaveV3_Ethereum_EventsAip_20231010(); | ||
uint256 ghoBalanceBeforeFunding = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf( | ||
COLLECTOR | ||
); | ||
|
||
// Simulates having appropriate funds in proxy | ||
// https://app.aave.com/governance/proposal/?proposalId=347 | ||
// 0x121fE3fC3f617ACE9730203d2E27177131C4315e | ||
// https://github.com/bgd-labs/aave-proposals/blob/545b17d8817e8aa86d99db94bfd1e4a2ae575f3d/src/20230926_AaveV3_Eth_GHOFunding/AaveV3_Ethereum_GHOFunding_20230926.t.sol#L39 | ||
uint256 daiBalanceProxyBefore = IERC20(AaveV2EthereumAssets.DAI_UNDERLYING).balanceOf( | ||
0x0eB322ac55dB67a5cA0810BA0eDae3501b1B7263 | ||
); | ||
uint256 simulatedSwapBalance = 370_000e18 + | ||
IERC20(AaveV2EthereumAssets.DAI_A_TOKEN).balanceOf(COLLECTOR); | ||
|
||
GovHelpers.passVoteAndExecute(vm, 347); | ||
|
||
uint256 daiBalanceProxyAfter = IERC20(AaveV2EthereumAssets.DAI_UNDERLYING).balanceOf( | ||
0x0eB322ac55dB67a5cA0810BA0eDae3501b1B7263 | ||
); | ||
|
||
// 0.001e18 is 0.1% | ||
assertApproxEqRel(daiBalanceProxyBefore + simulatedSwapBalance, daiBalanceProxyAfter, 0.001e18); | ||
|
||
// assume DAI swapped for GHO | ||
deal( | ||
address(AaveV3EthereumAssets.GHO_UNDERLYING), | ||
COLLECTOR, | ||
GHO_AMOUNT + ghoBalanceBeforeFunding | ||
); | ||
uint256 ghoBalanceAfterFunding = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf( | ||
COLLECTOR | ||
); | ||
|
||
assertEq(ghoBalanceAfterFunding, ghoBalanceBeforeFunding + GHO_AMOUNT); | ||
|
||
uint256 receiverBalanceBefore = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(RECEIVER); | ||
|
||
GovHelpers.executePayload(vm, address(payload), AaveGovernanceV2.SHORT_EXECUTOR); | ||
|
||
uint256 receiverBalanceAfter = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf(RECEIVER); | ||
|
||
assertEq(receiverBalanceAfter, receiverBalanceBefore + GHO_AMOUNT); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/20231010_AaveV3_Eth_EventsAip/AaveV3_EventsAip_20231010.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,31 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovHelpers} from 'aave-helpers/GovHelpers.sol'; | ||
import {EthereumScript} from 'aave-helpers/ScriptUtils.sol'; | ||
import {AaveV3_Ethereum_EventsAip_20231010} from './AaveV3_Ethereum_EventsAip_20231010.sol'; | ||
|
||
/** | ||
* @dev Deploy AaveV3_Ethereum_EventsAip_20231010 | ||
* command: make deploy-ledger contract=src/20231010_AaveV3_Eth_EventsAip/AaveV3_EventsAip_20231010.s.sol:DeployEthereum chain=mainnet | ||
*/ | ||
contract DeployEthereum is EthereumScript { | ||
function run() external broadcast { | ||
new AaveV3_Ethereum_EventsAip_20231010(); | ||
} | ||
} | ||
|
||
/** | ||
* @dev Create Proposal | ||
* command: make deploy-ledger contract=src/20231010_AaveV3_Eth_EventsAip/AaveV3_EventsAip_20231010.s.sol:CreateProposal chain=mainnet | ||
*/ | ||
contract CreateProposal is EthereumScript { | ||
function run() external broadcast { | ||
GovHelpers.Payload[] memory payloads = new GovHelpers.Payload[](1); | ||
payloads[0] = GovHelpers.buildMainnet(0xfa9aF30481942a31E6AE47f199C6c2a3978b5c33); | ||
GovHelpers.createProposal( | ||
payloads, | ||
GovHelpers.ipfsHashFile(vm, 'src/20231010_AaveV3_Eth_EventsAip/EventsAip.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: "Events Funding" | ||
author: "AaveCo" | ||
discussions: "https://governance.aave.com/t/temp-check-aave-events-sponsorship-budget/14953" | ||
--- | ||
|
||
## Simple Summary | ||
|
||
This publication proposes the creation and funding of the Aave DAO budget allocation on events at DevConnect, rAAVE, and ETHGlobal Istanbul that help spread adoption and awareness of the Aave Protocol, GHO, and the Aave ecosystem. | ||
|
||
## Motivation | ||
|
||
We are proposing several thoughtful, well-organized and targeted events at DevConnect, including hackathons, booth presence, rAAVE and smaller side events that bring the broader community together. These initiatives will serve multiple purposes: | ||
|
||
- Creating welcoming, engaging, and memorable experiences at the Aave booth. | ||
- Sponsoring side events, hackathons, prizes and providing exceptional support to developers. | ||
- Spreading Aave’s culture by distributing highly coveted merchandise. | ||
- Selectively hosting rAAVEs to bring the Aave community together, reward contributors and make Aave the top ecosystem in crypto. | ||
- Developing GHO Pass payment portal to showcase the power and utility of GHO. | ||
|
||
## Specification | ||
|
||
This proposal encompasses the following actions: | ||
|
||
- Transfer 550,000 GHO to receiver address | ||
|
||
## References | ||
|
||
- Payload: [Ethereum](https://etherscan.io/address/0xfa9aF30481942a31E6AE47f199C6c2a3978b5c33#code) | ||
- Implementation: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/20231010_AaveV3_Eth_EventsAip/AaveV3_Ethereum_EventsAip_20231010.sol) | ||
- Tests: [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/20231010_AaveV3_Eth_EventsAip/AaveV3_Ethereum_EventsAip_20231010.t.sol) | ||
- [Snapshot TEMP Check](https://snapshot.org/#/aave.eth/proposal/0xdcb072d9782c5160d824ee37919c1be35024bd5aec579a86fdfc024f60213ca1) | ||
- [Discussion](https://governance.aave.com/t/temp-check-aave-events-sponsorship-budget/14953) | ||
|
||
- [ARFC](https://governance.aave.com/t/arfc-aave-events-sponsorship-budget/15075) | ||
|
||
- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0xe499373c896cdbc50c133519544a933ce1dc6486526ed7d834a85a847859e976) | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
b610d58
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 🌈