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.
- Loading branch information
1 parent
d92dec6
commit 76cbbd6
Showing
6 changed files
with
202 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...40206_before_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_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,25 @@ | ||
## Reserve changes | ||
|
||
### Reserves altered | ||
|
||
#### MaticX ([0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6](https://polygonscan.com/address/0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6)) | ||
|
||
| description | value before | value after | | ||
| --- | --- | --- | | ||
| supplyCap | 62,000,000 MaticX | 75,000,000 MaticX | | ||
|
||
|
||
## Raw diff | ||
|
||
```json | ||
{ | ||
"reserves": { | ||
"0xfa68FB4628DFF1028CFEc22b4162FCcd0d45efb6": { | ||
"supplyCap": { | ||
"from": 62000000, | ||
"to": 75000000 | ||
} | ||
} | ||
} | ||
} | ||
``` |
27 changes: 27 additions & 0 deletions
27
...upplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.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,27 @@ | ||
// 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 MaticX Supply Cap Increase in Polygon V3 | ||
* @author Aave Chan Initiative (ACI) | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x73b2f1d14eb6710deabe84639ea8b06929738ef1973fee21c26945d17bf57a5b | ||
* - Discussion: https://governance.aave.com/t/arfc-maticx-supply-cap-increase-in-polygon-v3/16449 | ||
*/ | ||
contract AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206 is AaveV3PayloadPolygon { | ||
function capsUpdates() public pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { | ||
IAaveV3ConfigEngine.CapsUpdate[] memory capsUpdate = new IAaveV3ConfigEngine.CapsUpdate[](1); | ||
|
||
capsUpdate[0] = IAaveV3ConfigEngine.CapsUpdate({ | ||
asset: AaveV3PolygonAssets.MaticX_UNDERLYING, | ||
supplyCap: 75_000_000, | ||
borrowCap: EngineFlags.KEEP_CURRENT | ||
}); | ||
|
||
return capsUpdate; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...plyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.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,32 @@ | ||
// 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_MaticXSupplyCapIncreaseInPolygonV3_20240206} from './AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206 | ||
* command: make test-contract filter=AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206 | ||
*/ | ||
contract AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206_Test is ProtocolV3TestBase { | ||
AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('polygon'), 53201815); | ||
proposal = new AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206(); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
defaultTest( | ||
'AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206', | ||
AaveV3Polygon.POOL, | ||
address(proposal) | ||
); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...olygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.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,41 @@ | ||
--- | ||
title: "MaticX Supply Cap Increase in Polygon V3" | ||
author: "Aave Chan Initiative (ACI)" | ||
discussions: "https://governance.aave.com/t/arfc-maticx-supply-cap-increase-in-polygon-v3/16449" | ||
--- | ||
|
||
## Simple Summary | ||
|
||
This proposal aims to increase the MaticX Supply Cap on Polygon V3 to match market demand. | ||
|
||
## Motivation | ||
|
||
Increasing the supply cap of Polygon MaticX in the Aave market is a strategic move to accommodate growing demand, and follow a previous DAO decision to maintain aggressive supply caps for correlated assets. | ||
|
||
Deposits of MaticX have been over 95% of the supply cap for some time. Increasing the Supply Cap will enable users to continue depositing MaticX and enter the recursive MaticX/wMATIC yield strategy. | ||
|
||
The DAO has previously voted to allow assets with correlated borrow supply caps to be up to 75% of cumulative supply. Since this exceeds the supply cap increase allowable by risk stewards, this proposal will increase supply caps through the typical ARFC process. Current circulating supply is over 100M, so this proposal will increase the supply cap to 75M. | ||
|
||
## Specification | ||
|
||
Increase the supply cap for MaticX on Polygon V3 to the following. | ||
|
||
| Parameter | Current Value | Proposed Value | | ||
| --------- | ------------- | -------------- | | ||
| SupplyCap | 62M | 75M | | ||
|
||
Useful Links | ||
|
||
- [Previous ARFC MaticX Supply Cap Increase ](https://governance-v2.aave.com/governance/proposal/278/) | ||
- [MaticX in Polygon V3 Market](https://app.aave.com/reserve-overview/?underlyingAsset=0xfa68fb4628dff1028cfec22b4162fccd0d45efb6&marketName=proto_polygon_v3) | ||
|
||
## References | ||
|
||
- Implementation: [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol) | ||
- Tests: [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.t.sol) | ||
- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0x73b2f1d14eb6710deabe84639ea8b06929738ef1973fee21c26945d17bf57a5b) | ||
- [Discussion](https://governance.aave.com/t/arfc-maticx-supply-cap-increase-in-polygon-v3/16449) | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
58 changes: 58 additions & 0 deletions
58
...ygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3_20240206.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, PolygonScript} from 'aave-helpers/ScriptUtils.sol'; | ||
import {AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206} from './AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206.sol'; | ||
|
||
/** | ||
* @dev Deploy Polygon | ||
* deploy-command: make deploy-ledger contract=src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3_20240206.s.sol:DeployPolygon chain=polygon | ||
* verify-command: npx catapulta-verify -b broadcast/MaticXSupplyCapIncreaseInPolygonV3_20240206.s.sol/137/run-latest.json | ||
*/ | ||
contract DeployPolygon is PolygonScript { | ||
function run() external broadcast { | ||
// deploy payloads | ||
address payload0 = GovV3Helpers.deployDeterministic( | ||
type(AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206).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/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3_20240206.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( | ||
type(AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3_20240206).creationCode | ||
); | ||
payloads[0] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon); | ||
|
||
// create proposal | ||
vm.startBroadcast(); | ||
GovV3Helpers.createProposal( | ||
vm, | ||
payloads, | ||
GovV3Helpers.ipfsHashFile( | ||
vm, | ||
'src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/MaticXSupplyCapIncreaseInPolygonV3.md' | ||
) | ||
); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/20240206_AaveV3Polygon_MaticXSupplyCapIncreaseInPolygonV3/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,19 @@ | ||
import {ConfigFile} from '../../generator/types'; | ||
export const config: ConfigFile = { | ||
rootOptions: { | ||
pools: ['AaveV3Polygon'], | ||
title: 'MaticX Supply Cap Increase in Polygon V3', | ||
shortName: 'MaticXSupplyCapIncreaseInPolygonV3', | ||
date: '20240206', | ||
author: 'Aave Chan Initiative (ACI)', | ||
discussion: 'https://governance.aave.com/t/arfc-maticx-supply-cap-increase-in-polygon-v3/16449', | ||
snapshot: | ||
'https://snapshot.org/#/aave.eth/proposal/0x73b2f1d14eb6710deabe84639ea8b06929738ef1973fee21c26945d17bf57a5b', | ||
}, | ||
poolOptions: { | ||
AaveV3Polygon: { | ||
configs: {CAPS_UPDATE: [{asset: 'MaticX', supplyCap: '75000000', borrowCap: ''}]}, | ||
cache: {blockNumber: 53201815}, | ||
}, | ||
}, | ||
}; |
76cbbd6
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 🌈