Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

AIP Events Proposal #337

Merged
merged 14 commits into from
Oct 23, 2023
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Raw diff

```json
{}
```
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);
}
}
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 src/20231010_AaveV3_Eth_EventsAip/AaveV3_EventsAip_20231010.s.sol
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_Ethereum_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_Ethereum_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(address(0));
GovHelpers.createProposal(
payloads,
GovHelpers.ipfsHashFile(vm, 'src/20231010_AaveV3_Eth_EventsAip/EventsAip.md')
);
}
}
39 changes: 39 additions & 0 deletions src/20231010_AaveV3_Eth_EventsAip/EventsAip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: "events-aip"
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

- 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/).