forked from bgd-labs/aave-proposals-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Chaos Labs] Ethereum V2 LT Reductions (bgd-labs#197)
* Ethereum V2 LT Reductions * Fix title * Update src/20240201_AaveV2Ethereum_ChaosLabsV2EthereumLTReductions/ChaosLabsV2EthereumLTReductions.md Co-authored-by: Lukas <lukasstrassel@googlemail.com> --------- Co-authored-by: Lukas <lukasstrassel@googlemail.com>
- Loading branch information
1 parent
27eebc6
commit 4561c22
Showing
6 changed files
with
352 additions
and
0 deletions.
There are no files selected for viewing
90 changes: 90 additions & 0 deletions
90
...0240201_before_AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201_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,90 @@ | ||
## Reserve changes | ||
|
||
### Reserve altered | ||
|
||
#### UNI ([0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984](https://etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984)) | ||
|
||
| description | value before | value after | | ||
| --- | --- | --- | | ||
| liquidationThreshold | 20 % | 14 % | | ||
|
||
|
||
#### LINK ([0x514910771AF9Ca656af840dff83E8264EcF986CA](https://etherscan.io/address/0x514910771AF9Ca656af840dff83E8264EcF986CA)) | ||
|
||
| description | value before | value after | | ||
| --- | --- | --- | | ||
| liquidationThreshold | 74 % | 72 % | | ||
|
||
|
||
#### MKR ([0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2](https://etherscan.io/address/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2)) | ||
|
||
| description | value before | value after | | ||
| --- | --- | --- | | ||
| liquidationThreshold | 18 % | 14 % | | ||
|
||
|
||
#### ENS ([0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72](https://etherscan.io/address/0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72)) | ||
|
||
| description | value before | value after | | ||
| --- | --- | --- | | ||
| liquidationThreshold | 24 % | 0.05 % | | ||
|
||
|
||
#### CRV ([0xD533a949740bb3306d119CC777fa900bA034cd52](https://etherscan.io/address/0xD533a949740bb3306d119CC777fa900bA034cd52)) | ||
|
||
| description | value before | value after | | ||
| --- | --- | --- | | ||
| liquidationThreshold | 18 % | 14 % | | ||
|
||
|
||
#### ZRX ([0xE41d2489571d322189246DaFA5ebDe1F4699F498](https://etherscan.io/address/0xE41d2489571d322189246DaFA5ebDe1F4699F498)) | ||
|
||
| description | value before | value after | | ||
| --- | --- | --- | | ||
| liquidationThreshold | 12 % | 8 % | | ||
|
||
|
||
## Raw diff | ||
|
||
```json | ||
{ | ||
"reserves": { | ||
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984": { | ||
"liquidationThreshold": { | ||
"from": 2000, | ||
"to": 1400 | ||
} | ||
}, | ||
"0x514910771AF9Ca656af840dff83E8264EcF986CA": { | ||
"liquidationThreshold": { | ||
"from": 7400, | ||
"to": 7200 | ||
} | ||
}, | ||
"0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2": { | ||
"liquidationThreshold": { | ||
"from": 1800, | ||
"to": 1400 | ||
} | ||
}, | ||
"0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72": { | ||
"liquidationThreshold": { | ||
"from": 2400, | ||
"to": 5 | ||
} | ||
}, | ||
"0xD533a949740bb3306d119CC777fa900bA034cd52": { | ||
"liquidationThreshold": { | ||
"from": 1800, | ||
"to": 1400 | ||
} | ||
}, | ||
"0xE41d2489571d322189246DaFA5ebDe1F4699F498": { | ||
"liquidationThreshold": { | ||
"from": 1200, | ||
"to": 800 | ||
} | ||
} | ||
} | ||
} | ||
``` |
57 changes: 57 additions & 0 deletions
57
...aosLabsV2EthereumLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201.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,57 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; | ||
|
||
/** | ||
* @title Chaos Labs V2 Ethereum LT Reductions | ||
* @author Chaos Labs - Eyal Ovadya | ||
* - Snapshot: No snapshot for Direct-to-AIP | ||
* - Discussion: https://governance.aave.com/t/arfc-v2-ethereum-lt-reductions-01-30-2024/16468 | ||
*/ | ||
contract AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201 is IProposalGenericExecutor { | ||
function execute() external { | ||
AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( | ||
AaveV2EthereumAssets.CRV_UNDERLYING, | ||
0, | ||
14_00, | ||
108_00 | ||
); | ||
|
||
AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( | ||
AaveV2EthereumAssets.ENS_UNDERLYING, | ||
0, | ||
5, | ||
108_00 | ||
); | ||
|
||
AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( | ||
AaveV2EthereumAssets.LINK_UNDERLYING, | ||
0, | ||
72_00, | ||
107_00 | ||
); | ||
|
||
AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( | ||
AaveV2EthereumAssets.MKR_UNDERLYING, | ||
0, | ||
14_00, | ||
107_50 | ||
); | ||
|
||
AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( | ||
AaveV2EthereumAssets.UNI_UNDERLYING, | ||
0, | ||
14_00, | ||
109_00 | ||
); | ||
|
||
AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( | ||
AaveV2EthereumAssets.ZRX_UNDERLYING, | ||
0, | ||
8_00, | ||
110_00 | ||
); | ||
} | ||
} |
89 changes: 89 additions & 0 deletions
89
...sLabsV2EthereumLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201.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,89 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; | ||
|
||
import 'forge-std/Test.sol'; | ||
import {ProtocolV2TestBase, ReserveConfig} from 'aave-helpers/ProtocolV2TestBase.sol'; | ||
import {AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201} from './AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201 | ||
* command: make test-contract filter=AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201 | ||
*/ | ||
contract AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201_Test is ProtocolV2TestBase { | ||
AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('mainnet'), 19133686); | ||
proposal = new AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201(); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
(ReserveConfig[] memory allConfigsBefore, ReserveConfig[] memory allConfigsAfter) = defaultTest( | ||
'AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201', | ||
AaveV2Ethereum.POOL, | ||
address(proposal) | ||
); | ||
|
||
address[] memory assetsChanged = new address[](6); | ||
|
||
assetsChanged[0] = AaveV2EthereumAssets.CRV_UNDERLYING; | ||
assetsChanged[1] = AaveV2EthereumAssets.ENS_UNDERLYING; | ||
assetsChanged[2] = AaveV2EthereumAssets.LINK_UNDERLYING; | ||
assetsChanged[3] = AaveV2EthereumAssets.MKR_UNDERLYING; | ||
assetsChanged[4] = AaveV2EthereumAssets.UNI_UNDERLYING; | ||
assetsChanged[5] = AaveV2EthereumAssets.ZRX_UNDERLYING; | ||
|
||
_noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged); | ||
|
||
{ | ||
ReserveConfig memory CRV_UNDERLYING_CONFIG = _findReserveConfig( | ||
allConfigsBefore, | ||
AaveV2EthereumAssets.CRV_UNDERLYING | ||
); | ||
CRV_UNDERLYING_CONFIG.liquidationThreshold = 14_00; | ||
_validateReserveConfig(CRV_UNDERLYING_CONFIG, allConfigsAfter); | ||
|
||
ReserveConfig memory ENS_UNDERLYING_CONFIG = _findReserveConfig( | ||
allConfigsBefore, | ||
AaveV2EthereumAssets.ENS_UNDERLYING | ||
); | ||
ENS_UNDERLYING_CONFIG.liquidationThreshold = 5; | ||
_validateReserveConfig(ENS_UNDERLYING_CONFIG, allConfigsAfter); | ||
|
||
ReserveConfig memory LINK_UNDERLYING_CONFIG = _findReserveConfig( | ||
allConfigsBefore, | ||
AaveV2EthereumAssets.LINK_UNDERLYING | ||
); | ||
LINK_UNDERLYING_CONFIG.liquidationThreshold = 72_00; | ||
_validateReserveConfig(LINK_UNDERLYING_CONFIG, allConfigsAfter); | ||
} | ||
|
||
{ | ||
ReserveConfig memory MKR_UNDERLYING_CONFIG = _findReserveConfig( | ||
allConfigsBefore, | ||
AaveV2EthereumAssets.MKR_UNDERLYING | ||
); | ||
MKR_UNDERLYING_CONFIG.liquidationThreshold = 14_00; | ||
_validateReserveConfig(MKR_UNDERLYING_CONFIG, allConfigsAfter); | ||
|
||
ReserveConfig memory UNI_UNDERLYING_CONFIG = _findReserveConfig( | ||
allConfigsBefore, | ||
AaveV2EthereumAssets.UNI_UNDERLYING | ||
); | ||
UNI_UNDERLYING_CONFIG.liquidationThreshold = 14_00; | ||
_validateReserveConfig(UNI_UNDERLYING_CONFIG, allConfigsAfter); | ||
|
||
ReserveConfig memory ZRX_UNDERLYING_CONFIG = _findReserveConfig( | ||
allConfigsBefore, | ||
AaveV2EthereumAssets.ZRX_UNDERLYING | ||
); | ||
ZRX_UNDERLYING_CONFIG.liquidationThreshold = 8_00; | ||
_validateReserveConfig(ZRX_UNDERLYING_CONFIG, allConfigsAfter); | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...veV2Ethereum_ChaosLabsV2EthereumLTReductions/ChaosLabsV2EthereumLTReductions.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,45 @@ | ||
--- | ||
title: "V2 Ethereum LT Reductions" | ||
author: "Chaos Labs - Eyal Ovadya" | ||
discussions: "https://governance.aave.com/t/arfc-v2-ethereum-lt-reductions-01-30-2024/16468" | ||
--- | ||
|
||
## Simple Summary | ||
|
||
A proposal to reduce Liquidation Thresholds on Aave V2 Ethereum. | ||
|
||
## Motivation | ||
|
||
Following the v2 deprecation framework, Chaos Labs and Gauntlet advise implementing the subsequent parameter changes to the frozen assets on Aave v2 Ethereum and Polygon | ||
|
||
As Liquidation Threshold reductions may lead to user accounts being eligible for liquidations upon their approval, we want to clarify the full implications to the community at each step. We will publicly communicate the planned amendments and list of affected accounts leading to the on-chain execution. | ||
|
||
## Specification | ||
|
||
Chaos and Gauntlet align on following recommendations, choosing the higher value between Gauntlet’s aggressive and Chaos’s moderate approach for each asset: | ||
|
||
##### Aave v2 Ethereum | ||
|
||
| Asset | Current LT | Recommended LT | | ||
| ----- | ---------- | -------------- | | ||
| CRV | 18% | 14% | | ||
| ENS | 24% | 0.05% | | ||
| LINK | 74% | 72% | | ||
| MKR | 18% | 14% | | ||
| UNI | 20% | 14% | | ||
| ZRX | 12% | 8% | | ||
|
||
| | Value liquidated | Accounts liquidated | | ||
| ----- | ---------------- | ------------------- | | ||
| Total | $67,480 | 47 | | ||
|
||
## References | ||
|
||
- Implementation: [AaveV2Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240201_AaveV2Ethereum_ChaosLabsV2EthereumLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201.sol) | ||
- Tests: [AaveV2Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240201_AaveV2Ethereum_ChaosLabsV2EthereumLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201.t.sol) | ||
- [Snapshot](No snapshot for Direct-to-AIP) | ||
- [Discussion](https://governance.aave.com/t/arfc-v2-ethereum-lt-reductions-01-30-2024/16468) | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
58 changes: 58 additions & 0 deletions
58
...V2Ethereum_ChaosLabsV2EthereumLTReductions/ChaosLabsV2EthereumLTReductions_20240201.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} from 'aave-helpers/ScriptUtils.sol'; | ||
import {AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201} from './AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201.sol'; | ||
|
||
/** | ||
* @dev Deploy Ethereum | ||
* deploy-command: make deploy-ledger contract=src/20240201_AaveV2Ethereum_ChaosLabsV2EthereumLTReductions/ChaosLabsV2EthereumLTReductions_20240201.s.sol:DeployEthereum chain=mainnet | ||
* verify-command: npx catapulta-verify -b broadcast/ChaosLabsV2EthereumLTReductions_20240201.s.sol/1/run-latest.json | ||
*/ | ||
contract DeployEthereum is EthereumScript { | ||
function run() external broadcast { | ||
// deploy payloads | ||
address payload0 = GovV3Helpers.deployDeterministic( | ||
type(AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201).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/20240201_AaveV2Ethereum_ChaosLabsV2EthereumLTReductions/ChaosLabsV2EthereumLTReductions_20240201.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(AaveV2Ethereum_ChaosLabsV2EthereumLTReductions_20240201).creationCode | ||
); | ||
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); | ||
|
||
// create proposal | ||
vm.startBroadcast(); | ||
GovV3Helpers.createProposal( | ||
vm, | ||
payloads, | ||
GovV3Helpers.ipfsHashFile( | ||
vm, | ||
'src/20240201_AaveV2Ethereum_ChaosLabsV2EthereumLTReductions/ChaosLabsV2EthereumLTReductions.md' | ||
) | ||
); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/20240201_AaveV2Ethereum_ChaosLabsV2EthereumLTReductions/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,13 @@ | ||
import {ConfigFile} from '../../generator/types'; | ||
export const config: ConfigFile = { | ||
rootOptions: { | ||
author: 'Chaos Labs - Eyal Ovadya', | ||
pools: ['AaveV2Ethereum'], | ||
title: 'Chaos Labs V2 Ethereum LT Reductions', | ||
discussion: 'https://governance.aave.com/t/arfc-v2-ethereum-lt-reductions-01-30-2024/16468', | ||
shortName: 'ChaosLabsV2EthereumLTReductions', | ||
date: '20240201', | ||
snapshot: 'No snapshot for Direct-to-AIP', | ||
}, | ||
poolOptions: {AaveV2Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 19133686}}}, | ||
}; |