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

preview aave Governance 2024-02-14 #13

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Reserve changes

### Reserves altered

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

| description | value before | value after |
| ----------- | -------------- | -------------- |
| supplyCap | 10,000,000 CRV | 12,000,000 CRV |
| ltv | 35 % | 40 % |

## Raw diff

```json
{
"reserves": {
"0xD533a949740bb3306d119CC777fa900bA034cd52": {
"ltv": {
"from": 3500,
"to": 4000
},
"supplyCap": {
"from": 10000000,
"to": 12000000
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// 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 Test
* @author Tester
* - Snapshot: test.xyz
* - Discussion: test.com
*/
contract AaveV3Ethereum_Test_20240214 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: 12_000_000,
borrowCap: EngineFlags.KEEP_CURRENT
});

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: 40_00,
liqThreshold: EngineFlags.KEEP_CURRENT,
liqBonus: EngineFlags.KEEP_CURRENT,
debtCeiling: EngineFlags.KEEP_CURRENT,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});

return collateralUpdate;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// 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_Test_20240214} from './AaveV3Ethereum_Test_20240214.sol';

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

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

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest('AaveV3Ethereum_Test_20240214', AaveV3Ethereum.POOL, address(proposal));
}
}
52 changes: 52 additions & 0 deletions aave-proposals-v3/src/20240214_AaveV3Ethereum_Test/Test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: "Test"
author: "Tester"
discussions: "test.com"
snapshot: "test.xyz"
---

## Simple Summary

A proposal for further deprecation recommendations on Aave AMM v2. For more details, see the full forum post [here](https://governance.aave.com/t/arfc-deprecate-aave-v2-amm-market-step-2/16408/2).

## Motivation

Gauntlet aims to reduce the remaining $94k borrow position and migrate users off the AMM market. Further analysis and information can be found in our forum [post](https://governance.aave.com/t/arfc-deprecate-aave-v2-amm-market-step-2/16408).

## Specification

Gauntlet recommends to increase reserve factor to 99% for the following assets:

| Asset | Current RF | Recommended RF |
| ----- | ---------- | -------------- |
| WETH | 0.1 | 0.99 |
| DAI | 0.1 | 0.99 |
| USDC | 0.1 | 0.99 |
| WBTC | 0.2 | 0.99 |
| USDT | 0.1 | 0.99 |

Gauntlet recommends to adjust the IR params for the following assets:
| Asset | Current Variable Base | Recommended Variable Base | Current Variable Slope1 | Recommended Variable Slope1 |
| ----- | --------------------- | ------------------------- | ----------------------- | --------------------------- |
| WETH | 0 | 0.06 | 0.08 | No Change |
| DAI | 0 | 0.04 | 0.04 | 0.1 |
| USDC | 0 | 0.04 | 0.04 | 0.1 |
| WBTC | 0 | 0.05 | 0.08 | No Change |
| USDT | 0 | 0.06 | 0.04 | 0.1 |

## References

- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240214_AaveV3Ethereum_Test/AaveV3Ethereum_Test_20240214.sol)
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240214_AaveV3Ethereum_Test/AaveV3Ethereum_Test_20240214.t.sol)
- [Snapshot](test.xyz)
- [Discussion](test.com)

## Disclaimer

Gauntlet has not been compensated by any third party for publishing this ARFC.

## Copyright

_By approving this proposal, you agree that any services provided by Gauntlet shall be governed by the terms of service available at gauntlet.network/tos._

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_Test_20240214} from './AaveV3Ethereum_Test_20240214.sol';

/**
* @dev Deploy Ethereum
* deploy-command: make deploy-ledger contract=src/20240214_AaveV3Ethereum_Test/Test_20240214.s.sol:DeployEthereum chain=mainnet
* verify-command: npx catapulta-verify -b broadcast/Test_20240214.s.sol/1/run-latest.json
*/
contract DeployEthereum is EthereumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3Ethereum_Test_20240214).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/20240214_AaveV3Ethereum_Test/Test_20240214.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(type(AaveV3Ethereum_Test_20240214).creationCode);
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovV3Helpers.ipfsHashFile(vm, 'src/20240214_AaveV3Ethereum_Test/Test.md')
);
}
}
31 changes: 31 additions & 0 deletions aave-proposals-v3/src/20240214_AaveV3Ethereum_Test/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import {ConfigFile} from '../../generator/types';
export const config: ConfigFile = {
rootOptions: {
configFile: './config.ts',
title: 'Test',
shortName: 'Test',
date: '20240214',
author: 'Tester',
discussion: 'test.com',
snapshot: 'test.xyz',
pools: ['AaveV3Ethereum'],
},
poolOptions: {
AaveV3Ethereum: {
configs: {
CAPS_UPDATE: [{asset: 'CRV', supplyCap: '12000000', borrowCap: ''}],
COLLATERALS_UPDATE: [
{
asset: 'CRV',
ltv: '40',
liqThreshold: '',
liqBonus: '',
debtCeiling: '',
liqProtocolFee: '',
},
],
},
cache: {blockNumber: 19229225},
},
},
};