Skip to content

Commit

Permalink
Merge pull request #25 from ChaosLabsInc/chaoslabs/eth_caps_increase_…
Browse files Browse the repository at this point in the history
…20230906

Ethereum V3 Caps Update 20230906
  • Loading branch information
yonikesel authored Sep 28, 2023
2 parents 714042b + 274b75c commit beb9d7b
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
## Reserve changes

### Reserve altered

#### UNI ([0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984](https://etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 2,000,000 UNI | 4,000,000 UNI |


#### MKR ([0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2](https://etherscan.io/address/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 10,000 MKR | 15,000 MKR |
| borrowCap | 1,500 MKR | 3,000 MKR |


#### cbETH ([0xBe9895146f7AF43049ca1c1AE358B0541Ea49704](https://etherscan.io/address/0xBe9895146f7AF43049ca1c1AE358B0541Ea49704))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 1,200 cbETH | 2,400 cbETH |


#### RPL ([0xD33526068D116cE69F19A9ee46F0bd304F21A51f](https://etherscan.io/address/0xD33526068D116cE69F19A9ee46F0bd304F21A51f))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 420,000 RPL | 840,000 RPL |


## Raw diff

```json
{
"reserves": {
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984": {
"supplyCap": {
"from": 2000000,
"to": 4000000
}
},
"0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2": {
"borrowCap": {
"from": 1500,
"to": 3000
},
"supplyCap": {
"from": 10000,
"to": 15000
}
},
"0xBe9895146f7AF43049ca1c1AE358B0541Ea49704": {
"borrowCap": {
"from": 1200,
"to": 2400
}
},
"0xD33526068D116cE69F19A9ee46F0bd304F21A51f": {
"supplyCap": {
"from": 420000,
"to": 840000
}
}
}
}
```
2 changes: 1 addition & 1 deletion lib/aave-address-book
Submodule aave-address-book updated 181 files
2 changes: 1 addition & 1 deletion lib/aave-helpers
Submodule aave-helpers updated 79 files
+3 −1 .env.example
+11 −0 .github/workflows/comment.yml
+2 −4 .github/workflows/merge-main.yml
+45 −0 CHANGELOG.md
+1 −0 diffs/preTestEngineListingCustom_postTestEngineListingCustom.md
+1 −0 diffs/preTestEngineListing_postTestEngineListing.md
+2 −0 foundry.toml
+1 −1 lib/aave-address-book
+1 −1 lib/forge-std
+1 −1 lib/solidity-utils
+1 −4 package.json
+10 −10 reports/postTestEngineCaps.json
+12 −12 reports/postTestEngineCollateralEdgeBonus.json
+20 −20 reports/postTestEngineListing.json
+10 −10 reports/postTestEngineListingCustom.json
+11 −11 reports/postTestEngineRates.json
+10 −10 reports/preTestEngineCaps.json
+12 −12 reports/preTestEngineCollateralEdgeBonus.json
+20 −20 reports/preTestEngineListing.json
+10 −10 reports/preTestEngineListingCustom.json
+11 −11 reports/preTestEngineRates.json
+61 −61 reports/v2-report.json
+5 −0 src/ChainIds.sol
+47 −45 src/CommonTestBase.sol
+305 −141 src/GovHelpers.sol
+84 −93 src/ProtocolV2TestBase.sol
+94 −42 src/ProtocolV3TestBase.sol
+12 −0 src/ScriptUtils.sol
+44 −0 src/StorageHelpers.sol
+86 −0 src/bridges/AavePolEthERC20Bridge.sol
+198 −0 src/bridges/AavePolEthERC20BridgeTest.t.sol
+20 −0 src/bridges/DeployBridges.s.sol
+11 −0 src/bridges/IAavePolEthERC20Bridge.sol
+49 −0 src/bridges/README.md
+166 −0 src/swaps/AaveSwapper.sol
+24 −0 src/swaps/AaveSwapperDeployment.s.sol
+467 −0 src/swaps/AaveSwapperTest.t.sol
+28 −0 src/swaps/BaseSwapPayload.sol
+21 −0 src/swaps/DepositV2SwapPayload.sol
+55 −0 src/swaps/DepositV2SwapPayloadTest.t.sol
+21 −0 src/swaps/DepositV3SwapPayload.sol
+55 −0 src/swaps/DepositV3SwapPayloadTest.t.sol
+136 −0 src/swaps/README.md
+16 −0 src/swaps/interfaces/IExpectedOutCalculator.sol
+34 −0 src/swaps/interfaces/IMilkman.sol
+9 −0 src/swaps/interfaces/ISwapPayload.sol
+0 −22 src/test/ProtocolV2TestBase.t.sol
+17 −12 tests/AaveV2ConfigEngineTest.t.sol
+9 −9 tests/AaveV3ConfigEngineGauntletProposal.t.sol
+60 −46 tests/AaveV3ConfigEngineTest.t.sol
+13 −6 tests/GovTest.t.sol
+36 −0 tests/ProtocolV2TestBase.t.sol
+30 −10 tests/ProtocolV3TestBase.t.sol
+1 −1 tests/ProxyHelpersTest.t.sol
+17 −16 tests/V2RateStrategyFactory.t.sol
+2 −2 tests/V3RateStrategyFactory.t.sol
+8 −6 tests/crosschainforwarders/ArbitrumCrossChainForwarderTest.t.sol
+7 −5 tests/crosschainforwarders/MetisCrossChainForwarderTest.t.sol
+6 −4 tests/crosschainforwarders/OptimismCrossChainForwarderTest.t.sol
+7 −5 tests/crosschainforwarders/PolygonCrossChainForwarderTest.t.sol
+1 −1 tests/mocks/AaveV2EthereumRatesUpdate.sol
+1 −1 tests/mocks/AaveV3AvalancheCollateralUpdate.sol
+1 −1 tests/mocks/AaveV3AvalancheCollateralUpdateEdgeBonus.sol
+1 −1 tests/mocks/AaveV3AvalancheCollateralUpdateNoChange.sol
+1 −1 tests/mocks/AaveV3EthereumMockCapUpdate.sol
+1 −1 tests/mocks/AaveV3EthereumMockCustomListing.sol
+1 −1 tests/mocks/AaveV3OptimismMockRatesUpdate.sol
+1 −1 tests/mocks/AaveV3PolygonBorrowUpdate.sol
+1 −1 tests/mocks/AaveV3PolygonMockListing.sol
+1 −1 tests/mocks/AaveV3PolygonPriceFeedUpdate.sol
+1 −1 tests/mocks/PayloadWithEmit.sol
+1 −1 tests/mocks/gauntlet-updates/AaveV3ArbitrumRatesUpdates070322.sol
+1 −1 tests/mocks/gauntlet-updates/AaveV3AvalancheRatesUpdates070322.sol
+1 −1 tests/mocks/gauntlet-updates/AaveV3OptimismRatesUpdates070322.sol
+1 −1 tests/mocks/gauntlet-updates/AaveV3PolygonRatesUpdates070322.sol
+0 −0 tests/mocks/proposal-invalid.md
+0 −0 tests/mocks/proposal.md
+3 −3 tests/riskstewards/CapsPlusRiskSteward.t.sol
+0 −1,167 yarn.lock
4 changes: 2 additions & 2 deletions scripts/CapsPlusRiskStewardBase.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {IPool} from 'aave-address-book/AaveV3.sol';
import {CapsPlusRiskSteward} from 'aave-helpers/riskstewards/CapsPlusRiskSteward.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {ProtocolV3_0_1TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';

abstract contract CapsPlusRiskStewardBase is ProtocolV3_0_1TestBase {
abstract contract CapsPlusRiskStewardBase is ProtocolV3TestBase {
error FailedUpdate();
IPool immutable POOL;
CapsPlusRiskSteward immutable STEWARD;
Expand Down
54 changes: 54 additions & 0 deletions src/MainnetCapsIncrease_20230906.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {CapsPlusRiskStewardMainnet} from '../scripts/CapsPlusRiskStewardMainnet.s.sol';
import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';

/**
* @title Update Borrow Caps on Ethereum V3
* @author @ChaosLabsInc
* - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-and-borrow-caps-on-v3-ethereum-09-05-2023/14764
*/
contract MainnetCapsIncrease_20230906 is CapsPlusRiskStewardMainnet {
/**
* @return string name identifier used for the diff
*/
function name() internal pure override returns (string memory) {
return 'mainnetCapsIncrease_20230906';
}

/**
* @return IAaveV3ConfigEngine.CapsUpdate[] capUpdates to be performed
*/
function capsUpdates() internal pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) {
IAaveV3ConfigEngine.CapsUpdate[] memory capUpdates = new IAaveV3ConfigEngine.CapsUpdate[](4);

capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3EthereumAssets.RPL_UNDERLYING,
840_000,
EngineFlags.KEEP_CURRENT
);

capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3EthereumAssets.MKR_UNDERLYING,
15_000,
3_000
);

capUpdates[2] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3EthereumAssets.UNI_UNDERLYING,
4_000_000,
EngineFlags.KEEP_CURRENT
);

capUpdates[3] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3EthereumAssets.cbETH_UNDERLYING,
EngineFlags.KEEP_CURRENT,
2_400
);

return capUpdates;
}
}

0 comments on commit beb9d7b

Please sign in to comment.