generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chaos Labs - Risk Parameter Updates - GNO on V3 Gnosis (#308)
- Loading branch information
Showing
6 changed files
with
236 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...0240415_before_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415_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,35 @@ | ||
## Reserve changes | ||
|
||
### Reserves altered | ||
|
||
#### GNO ([0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb](https://gnosisscan.io/address/0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb)) | ||
|
||
| description | value before | value after | | ||
| --- | --- | --- | | ||
| debtCeiling | 1,000,000 $ | 2,000,000 $ | | ||
| ltv | 31 % | 45 % | | ||
| liquidationThreshold | 36 % | 50 % | | ||
|
||
|
||
## Raw diff | ||
|
||
```json | ||
{ | ||
"reserves": { | ||
"0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb": { | ||
"debtCeiling": { | ||
"from": 100000000, | ||
"to": 200000000 | ||
}, | ||
"liquidationThreshold": { | ||
"from": 3600, | ||
"to": 5000 | ||
}, | ||
"ltv": { | ||
"from": 3100, | ||
"to": 4500 | ||
} | ||
} | ||
} | ||
} | ||
``` |
34 changes: 34 additions & 0 deletions
34
...ParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.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,34 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol'; | ||
import {AaveV3PayloadGnosis} from 'aave-helpers/v3-config-engine/AaveV3PayloadGnosis.sol'; | ||
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; | ||
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; | ||
/** | ||
* @title Risk Parameter Updates GNO on V3 Gnosis | ||
* @author Chaos Labs | ||
* - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-gno-on-v3-gnosis/17340 | ||
*/ | ||
contract AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415 is AaveV3PayloadGnosis { | ||
function collateralsUpdates() | ||
public | ||
pure | ||
override | ||
returns (IAaveV3ConfigEngine.CollateralUpdate[] memory) | ||
{ | ||
IAaveV3ConfigEngine.CollateralUpdate[] | ||
memory collateralUpdate = new IAaveV3ConfigEngine.CollateralUpdate[](1); | ||
|
||
collateralUpdate[0] = IAaveV3ConfigEngine.CollateralUpdate({ | ||
asset: AaveV3GnosisAssets.GNO_UNDERLYING, | ||
ltv: 45_00, | ||
liqThreshold: 50_00, | ||
liqBonus: EngineFlags.KEEP_CURRENT, | ||
debtCeiling: 2_000_000, | ||
liqProtocolFee: EngineFlags.KEEP_CURRENT | ||
}); | ||
|
||
return collateralUpdate; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...rameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.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,45 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {AaveV3Gnosis, AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol'; | ||
|
||
import 'forge-std/Test.sol'; | ||
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; | ||
import {AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415} from './AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415 | ||
* command: make test-contract filter=AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415 | ||
*/ | ||
contract AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415_Test is ProtocolV3TestBase { | ||
AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('gnosis'), 33455007); | ||
proposal = new AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415(); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
(ReserveConfig[] memory allConfigsBefore, ReserveConfig[] memory allConfigsAfter) = defaultTest( | ||
'AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415', | ||
AaveV3Gnosis.POOL, | ||
address(proposal) | ||
); | ||
|
||
address[] memory assetsChanged = new address[](1); | ||
assetsChanged[0] = AaveV3GnosisAssets.GNO_UNDERLYING; | ||
|
||
_noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged); | ||
|
||
ReserveConfig memory config = _findReserveConfig( | ||
allConfigsAfter, | ||
AaveV3GnosisAssets.GNO_UNDERLYING | ||
); | ||
assertEq(config.ltv, 45_00); | ||
assertEq(config.liquidationThreshold, 50_00); | ||
assertEq(config.debtCeiling, 2_000_000_00); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...V3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis.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,34 @@ | ||
--- | ||
title: "Risk Parameter Updates GNO on V3 Gnosis" | ||
author: "Chaos Labs" | ||
discussions: "https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-gno-on-v3-gnosis/17340" | ||
--- | ||
|
||
## Simple Summary | ||
|
||
A proposal to update GNO’s liquidation threshold, LTV, and debt ceiling on V3 Gnosis. | ||
|
||
## Motivation | ||
|
||
GNO has an average market cap of $445M and a daily trading volume of $3M over the last 180 days. Over this same timeframe, the largest single-day drop was 9.11%, with a daily annualized volatility of 63.75% and a 30-day daily annualized volatility of 94.46%. | ||
|
||
GNO is currently listed with relatively conservative parameters: 36% LT and 31% LTV. We recommend an increase to 50% and 45%, respectively. Following observations at these levels and utilizing our simulation platform, these parameters may be further optimized. | ||
Given current market conditions and utilizing our Isolation Mode Methodology we recommend doubling the debt ceiling to $2M. | ||
|
||
## Specification | ||
|
||
| Asset | Parameter | Current | Recommended | | ||
| ----- | ------------ | ---------- | ----------- | | ||
| GNO | LT | 36.00% | 50.00% | | ||
| GNO | LTV | 31.00% | 45.00% | | ||
| GNO | Debt Ceiling | $1,000,000 | $2,000,000 | | ||
|
||
## References | ||
|
||
- Implementation: [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.sol) | ||
- Tests: [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.t.sol) | ||
- [Discussion](https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-gno-on-v3-gnosis/17340) | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
58 changes: 58 additions & 0 deletions
58
...Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis_20240415.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, GnosisScript} from 'aave-helpers/ScriptUtils.sol'; | ||
import {AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415} from './AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415.sol'; | ||
|
||
/** | ||
* @dev Deploy Gnosis | ||
* deploy-command: make deploy-ledger contract=src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis_20240415.s.sol:DeployGnosis chain=gnosis | ||
* verify-command: npx catapulta-verify -b broadcast/RiskParameterUpdatesGNOOnV3Gnosis_20240415.s.sol/100/run-latest.json | ||
*/ | ||
contract DeployGnosis is GnosisScript { | ||
function run() external broadcast { | ||
// deploy payloads | ||
address payload0 = GovV3Helpers.deployDeterministic( | ||
type(AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415).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/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis_20240415.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 actionsGnosis = new IPayloadsControllerCore.ExecutionAction[](1); | ||
actionsGnosis[0] = GovV3Helpers.buildAction( | ||
type(AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis_20240415).creationCode | ||
); | ||
payloads[0] = GovV3Helpers.buildGnosisPayload(vm, actionsGnosis); | ||
|
||
// create proposal | ||
vm.startBroadcast(); | ||
GovV3Helpers.createProposal( | ||
vm, | ||
payloads, | ||
GovV3Helpers.ipfsHashFile( | ||
vm, | ||
'src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/RiskParameterUpdatesGNOOnV3Gnosis.md' | ||
) | ||
); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/20240415_AaveV3Gnosis_RiskParameterUpdatesGNOOnV3Gnosis/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,30 @@ | ||
import {ConfigFile} from '../../generator/types'; | ||
export const config: ConfigFile = { | ||
rootOptions: { | ||
pools: ['AaveV3Gnosis'], | ||
title: 'Risk Parameter Updates GNO on V3 Gnosis', | ||
shortName: 'RiskParameterUpdatesGNOOnV3Gnosis', | ||
date: '20240415', | ||
author: 'Chaos Labs', | ||
discussion: | ||
'https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-gno-on-v3-gnosis/17340', | ||
snapshot: '', | ||
}, | ||
poolOptions: { | ||
AaveV3Gnosis: { | ||
configs: { | ||
COLLATERALS_UPDATE: [ | ||
{ | ||
asset: 'GNO', | ||
ltv: '45', | ||
liqThreshold: '50', | ||
liqBonus: '', | ||
debtCeiling: '2000000', | ||
liqProtocolFee: '', | ||
}, | ||
], | ||
}, | ||
cache: {blockNumber: 33455007}, | ||
}, | ||
}, | ||
}; |
e3390f0
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 🌈