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 review: Add stmatic and maticx update. #3

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Reserve changes

### Reserve altered

#### stMATIC ([0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4](https://polygonscan.com/address/0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4))

| description | value before | value after |
| --- | --- | --- |
| liquidationThreshold | 60 % | 56 % |


#### MaticX ([0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6](https://polygonscan.com/address/0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6))

| description | value before | value after |
| --- | --- | --- |
| liquidationThreshold | 62 % | 58 % |


## Raw diff

```json
{
"reserves": {
"0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4": {
"liquidationThreshold": {
"from": 6000,
"to": 5600
}
},
"0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6": {
"liquidationThreshold": {
"from": 6200,
"to": 5800
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3PolygonAssets} from 'aave-address-book/AaveV3Polygon.sol';
import {AaveV3PayloadPolygon} from 'aave-helpers/v3-config-engine/AaveV3PayloadPolygon.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 lower stMATIC, MaticX non-emode LT, pt 2
* @author Gauntlet
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0xc59f0e1bd1463285d1fca9c3771d92dc227915615e475b84e6e4033f281ff079
* - Discussion: https://governance.aave.com/t/arfc-gauntlet-recommendation-to-lower-stmatic-maticx-non-emode-lt-pt-2/15314
*/
contract AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2_20231117 is
AaveV3PayloadPolygon
{
function collateralsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.CollateralUpdate[] memory)
{
IAaveV3ConfigEngine.CollateralUpdate[]
memory collateralUpdate = new IAaveV3ConfigEngine.CollateralUpdate[](2);

collateralUpdate[0] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3PolygonAssets.stMATIC_UNDERLYING,
ltv: EngineFlags.KEEP_CURRENT,
liqThreshold: 56_00,
liqBonus: EngineFlags.KEEP_CURRENT,
debtCeiling: EngineFlags.KEEP_CURRENT,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});
collateralUpdate[1] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3PolygonAssets.MaticX_UNDERLYING,
ltv: EngineFlags.KEEP_CURRENT,
liqThreshold: 58_00,
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,34 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

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

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

function setUp() public {
vm.createSelectFork(vm.rpcUrl('polygon'), 50068954);
proposal = new AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2_20231117();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2_20231117',
AaveV3Polygon.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: "Gauntlet recommendation to lower stMATIC, MaticX non-emode LT, pt 2"
author: "Gauntlet"
discussions: "https://governance.aave.com/t/arfc-gauntlet-recommendation-to-lower-stmatic-maticx-non-emode-lt-pt-2/15314"
---

## Summary

Gauntlet recommends follow-ups to our previous recommendations on lowering stMATIC / MaticX non-emode LT. These recommendations are geared towards the following:

- Reducing risks associated with increased stablecoin borrowing against LST collateral, amidst lower MATIC LST liquidity
- Lower risks of reduced WMATIC supply in the future, which may cause long-term growth risk for Polygon v3
- Encourage WMATIC borrowing against MATIC LST collateral

## Specification

| Asset | Parameter | Current Value | Recommended Value |
| ------- | -------------------- | ------------- | ----------------- |
| stMATIC | LiquidationThreshold | 60% | 56% |
| MaticX | LiquidationThreshold | 62% | 58% |

## References

- Implementation: [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231117_AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2/AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2_20231117.sol)
- Tests: [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231117_AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2/AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2_20231117.t.sol)
- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0xc59f0e1bd1463285d1fca9c3771d92dc227915615e475b84e6e4033f281ff079)
- [Discussion](https://governance.aave.com/t/arfc-gauntlet-recommendation-to-lower-stmatic-maticx-non-emode-lt-pt-2/15314)

## Disclaimer

Gauntlet has not received any compensation from any third-party in exchange for recommending any of the actions contained in this proposal.

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

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

_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._
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

/**
* @dev Deploy Polygon
* command: make deploy-ledger contract=src/20231117_AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2/GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2_20231117.s.sol:DeployPolygon chain=polygon
*/
contract DeployPolygon is PolygonScript {
function run() external broadcast {
// deploy payloads
AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2_20231117 payload0 = new AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2_20231117();

// 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/20231117_AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2/GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2_20231117.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 actionsPolygon = new IPayloadsControllerCore.ExecutionAction[](1);
actionsPolygon[0] = GovV3Helpers.buildAction(address(0));
payloads[0] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal2_5(
payloads,
GovV3Helpers.ipfsHashFile(
vm,
'src/20231117_AaveV3Polygon_GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2/GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2.md'
)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"rootOptions": {
"pools": [
"AaveV3Polygon"
],
"title": "Gauntlet recommendation to lower stMATIC, MaticX non-emode LT, pt 2",
"shortName": "GauntletRecommendationToLowerStMATICMaticXNonEmodeLTPt2",
"date": "20231117",
"author": "Gauntlet",
"discussion": "https://governance.aave.com/t/arfc-gauntlet-recommendation-to-lower-stmatic-maticx-non-emode-lt-pt-2/15314",
"snapshot": "https://snapshot.org/#/aave.eth/proposal/0xc59f0e1bd1463285d1fca9c3771d92dc227915615e475b84e6e4033f281ff079"
},
"poolOptions": {
"AaveV3Polygon": {
"configs": {
"COLLATERALS_UPDATE": [
{
"asset": "stMATIC",
"ltv": "EngineFlags.KEEP_CURRENT",
"liqThreshold": "56_00",
"liqBonus": "EngineFlags.KEEP_CURRENT",
"debtCeiling": "EngineFlags.KEEP_CURRENT",
"liqProtocolFee": "EngineFlags.KEEP_CURRENT"
},
{
"asset": "MaticX",
"ltv": "EngineFlags.KEEP_CURRENT",
"liqThreshold": "58_00",
"liqBonus": "EngineFlags.KEEP_CURRENT",
"debtCeiling": "EngineFlags.KEEP_CURRENT",
"liqProtocolFee": "EngineFlags.KEEP_CURRENT"
}
]
},
"features": [
"COLLATERALS_UPDATE"
]
}
}
}