Skip to content
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

For internal review: Add gauntlet CRV update proposal. #4

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .assets/6d0466e349dc1a41744012a7a6812bbcfcbfdb5e.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/73cbf1aae04d2063059bb0a9bc283ef7a4332ac4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/8062d95ddc9e1bec6e4a6b53fca46e335385d902.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Reserve changes

### Reserves altered

#### CRV ([0xD533a949740bb3306d119CC777fa900bA034cd52](https://etherscan.io/address/0xD533a949740bb3306d119CC777fa900bA034cd52))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 51,000,000 CRV | 7,500,000 CRV |
| borrowCap | 7,700,000 CRV | 5,000,000 CRV |
| debtCeiling | 5,000,000 $ | 1,000,000 $ |
| borrowingEnabled | false | true |


## Raw diff

```json
{
"reserves": {
"0xD533a949740bb3306d119CC777fa900bA034cd52": {
"borrowCap": {
"from": 7700000,
"to": 5000000
},
"borrowingEnabled": {
"from": false,
"to": true
},
"debtCeiling": {
"from": 500000000,
"to": 100000000
},
"supplyCap": {
"from": 51000000,
"to": 7500000
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Reserve changes

### Reserves altered

#### CRV ([0x172370d5Cd63279eFa6d502DAB29171933a610AF](https://polygonscan.com/address/0x172370d5Cd63279eFa6d502DAB29171933a610AF))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 900,190 CRV | 300,000 CRV |
| borrowingEnabled | false | true |


## Raw diff

```json
{
"reserves": {
"0x172370d5Cd63279eFa6d502DAB29171933a610AF": {
"borrowCap": {
"from": 900190,
"to": 300000
},
"borrowingEnabled": {
"from": false,
"to": true
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol';
import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol';

/**
* @title Transfer AURA to GLC Safe
* @author efecarranza.eth
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0xc999644bf64e4f62722d327416520b6f8cf8d7ceecbb69e7c52e2ebe1f4c3d63
* - Discussion: https://governance.aave.com/t/arfc-treasury-management-transfer-aura-to-glc-safe/15669
*/
contract AaveV3Ethereum_TransferAURAToGLCSafe_20231123 is IProposalGenericExecutor {
address public constant AURA = 0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF;
address public constant GLC_SAFE = 0x205e795336610f5131Be52F09218AF19f0f3eC60;

function execute() external {
AaveV3Ethereum.COLLECTOR.transfer(
AURA,
GLC_SAFE,
IERC20(AURA).balanceOf(address(AaveV3Ethereum.COLLECTOR))
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol';
import {GovV3Helpers} from 'aave-helpers/GovV3Helpers.sol';
import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';

import {AaveV3Ethereum_TransferAURAToGLCSafe_20231123} from './AaveV3Ethereum_TransferAURAToGLCSafe_20231123.sol';

/**
* @dev Test for AaveV3Ethereum_TransferAURAToGLCSafe_20231123
* command: make test-contract filter=AaveV3Ethereum_TransferAURAToGLCSafe_20231123
*/
contract AaveV3Ethereum_TransferAURAToGLCSafe_20231123_Test is ProtocolV3TestBase {
AaveV3Ethereum_TransferAURAToGLCSafe_20231123 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 18636648);
proposal = new AaveV3Ethereum_TransferAURAToGLCSafe_20231123();
}

function test_execute() public {
uint256 balanceBefore = IERC20(proposal.AURA()).balanceOf(address(AaveV3Ethereum.COLLECTOR));

assertEq(IERC20(proposal.AURA()).balanceOf(proposal.GLC_SAFE()), 0);

GovV3Helpers.executePayload(vm, address(proposal));

assertEq(IERC20(proposal.AURA()).balanceOf(address(AaveV3Ethereum.COLLECTOR)), 0);

assertEq(IERC20(proposal.AURA()).balanceOf(proposal.GLC_SAFE()), balanceBefore);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "Transfer AURA to GLC Safe"
author: "karpatkey - TokenLogic"
discussions: "https://governance.aave.com/t/arfc-treasury-management-transfer-aura-to-glc-safe/15669"
---

# Summary

This AIP will transfer the AURA holdings from the Ethereum Treasury to the GHO Liquidity Committee (GLC) SAFE.

# Motivation

The Aave DAO holds [845,090.43 vlAURA](https://etherscan.io/token/0x3fa73f1e5d8a792c80f426fc8f84fbf7ce9bbcac?a=0x205e795336610f5131Be52F09218AF19f0f3eC60) on the GLC SAFE and also [443,674 AURA](https://etherscan.io/token/0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF?a=0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c) on the Treasury (Collector contract).

This AIP will transfer the AURA from the Treasury to the GLC SAFE, consolidating the vlAURA holdings. The Aave DAO is expected to receive ~413,849.57 units of vlAURA upon locking 443,674 AURA.

The GLC is tasked with locking the AURA and managing the vlAURA holdings on behalf of the Aave DAO.

# Specification

This proposal encompasses the following actions:

- Transfer all AURA from the Aave Mainnet Collector to the GLC SAFE Address.

GLC SAFE Address: `0x205e795336610f5131Be52F09218AF19f0f3eC60`

## References

- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/60cce51b1d9877b9f90988d57eda958d9c5698e1/src/20231123_AaveV3Ethereum_TransferAURAToGLCSafe/AaveV3Ethereum_TransferAURAToGLCSafe_20231123.sol)
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/60cce51b1d9877b9f90988d57eda958d9c5698e1/src/20231123_AaveV3Ethereum_TransferAURAToGLCSafe/AaveV3Ethereum_TransferAURAToGLCSafe_20231123.t.sol)
- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0xc999644bf64e4f62722d327416520b6f8cf8d7ceecbb69e7c52e2ebe1f4c3d63)
- [Discussion](https://governance.aave.com/t/arfc-treasury-management-transfer-aura-to-glc-safe/15669)

## 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,53 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol';
import {EthereumScript} from 'aave-helpers/ScriptUtils.sol';
import {AaveV3Ethereum_TransferAURAToGLCSafe_20231123} from './AaveV3Ethereum_TransferAURAToGLCSafe_20231123.sol';

/**
* @dev Deploy Ethereum
* command: make deploy-ledger contract=src/20231123_AaveV3Ethereum_TransferAURAToGLCSafe/TransferAURAToGLCSafe_20231123.s.sol:DeployEthereum chain=mainnet
*/
contract DeployEthereum is EthereumScript {
function run() external broadcast {
// deploy payloads
AaveV3Ethereum_TransferAURAToGLCSafe_20231123 payload0 = new AaveV3Ethereum_TransferAURAToGLCSafe_20231123();

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

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

/**
* @dev Create Proposal
* command: make deploy-ledger contract=src/20231123_AaveV3Ethereum_TransferAURAToGLCSafe/TransferAURAToGLCSafe_20231123.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 actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1);
actionsEthereum[0] = GovV3Helpers.buildAction(0x312C428a84102B76ca9D38027Ea506f542120965);
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal2_5(
vm,
payloads,
GovV3Helpers.ipfsHashFile(
vm,
'src/20231123_AaveV3Ethereum_TransferAURAToGLCSafe/TransferAURAToGLCSafe.md'
)
);
}
}
21 changes: 21 additions & 0 deletions src/20231123_AaveV3Ethereum_TransferAURAToGLCSafe/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"rootOptions": {
"pools": ["AaveV3Ethereum"],
"title": "Transfer AURA to GLC Safe",
"shortName": "TransferAURAToGLCSafe",
"date": "20231123",
"author": "TokenLogic",
"discussion": "",
"snapshot": ""
},
"poolOptions": {
"AaveV3Ethereum": {
"configs": {
"OTHERS": {}
},
"cache": {
"blockNumber": 18636648
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';
import {AaveV3PayloadEthereum} from 'aave-helpers/v3-config-engine/AaveV3PayloadEthereum.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';

/**
* @title Gauntlet recommendation to reactivate CRV borrowing on v3
* @author Gauntlet
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x2db7ffd336637173a5c58f6bbb3609c17bba1b16740d8b3b0ea23a694f4c7b52
* - Discussion: https://governance.aave.com/t/arfc-gauntlet-recommendation-to-re-enable-crv-borrowing-on-v3-ethereum-polygon/15513
*/
contract AaveV3Ethereum_GauntletRecommendationToReactivateCRVBorrowingOnV3_20231127 is
AaveV3PayloadEthereum
{
function capsUpdates() public pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) {
IAaveV3ConfigEngine.CapsUpdate[] memory capsUpdate = new IAaveV3ConfigEngine.CapsUpdate[](1);

capsUpdate[0] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.CRV_UNDERLYING,
supplyCap: 7_500_000,
borrowCap: 5_000_000
});

return capsUpdate;
}

function collateralsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.CollateralUpdate[] memory)
{
IAaveV3ConfigEngine.CollateralUpdate[]
memory collateralUpdate = new IAaveV3ConfigEngine.CollateralUpdate[](1);

collateralUpdate[0] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3EthereumAssets.CRV_UNDERLYING,
ltv: EngineFlags.KEEP_CURRENT,
liqThreshold: EngineFlags.KEEP_CURRENT,
liqBonus: EngineFlags.KEEP_CURRENT,
debtCeiling: 1_000_000,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});

return collateralUpdate;
}

function borrowsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.BorrowUpdate[] memory)
{
IAaveV3ConfigEngine.BorrowUpdate[]
memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1);

borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.CRV_UNDERLYING,
enabledToBorrow: EngineFlags.ENABLED,
flashloanable: EngineFlags.KEEP_CURRENT,
stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
borrowableInIsolation: EngineFlags.KEEP_CURRENT,
withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
reserveFactor: 35_00
});

return borrowUpdates;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

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

/**
* @dev Test for AaveV3Ethereum_GauntletRecommendationToReactivateCRVBorrowingOnV3_20231127
* command: make test-contract filter=AaveV3Ethereum_GauntletRecommendationToReactivateCRVBorrowingOnV3_20231127
*/
contract AaveV3Ethereum_GauntletRecommendationToReactivateCRVBorrowingOnV3_20231127_Test is
ProtocolV3TestBase
{
AaveV3Ethereum_GauntletRecommendationToReactivateCRVBorrowingOnV3_20231127 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 18664733);
proposal = new AaveV3Ethereum_GauntletRecommendationToReactivateCRVBorrowingOnV3_20231127();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Ethereum_GauntletRecommendationToReactivateCRVBorrowingOnV3_20231127',
AaveV3Ethereum.POOL,
address(proposal)
);
}
}
Loading