Skip to content

Commit

Permalink
Merge pull request #24 from ChaosLabsInc/chaoslabs/cpas_increase_2023…
Browse files Browse the repository at this point in the history
…0901

Caps Increase 20230901 and Base chain support
  • Loading branch information
yonikesel authored Sep 28, 2023
2 parents beb9d7b + 07aa6b0 commit 73e6f28
Show file tree
Hide file tree
Showing 9 changed files with 269 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ optimism-example:; forge script src/OptimismExample.s.sol:OptimismExample --rpc-
arbitrum-example:; forge script src/ArbitrumExample.s.sol:ArbitrumExample --rpc-url arbitrum --sig "run(bool)" false -vv
avalanche-example:; forge script src/AvalancheExample.s.sol:AvalancheExample --rpc-url avalanche --sig "run(bool)" false -vv

mainnet-contract:; forge script ${contract_path} --rpc-url mainnet --sig "run(bool)" false -vv
arbitrum-contract:; forge script ${contract_path} --rpc-url arbitrum --sig "run(bool)" false -vv
base-contract:; forge script ${contract_path} --rpc-url base --sig "run(bool)" false -vv

# Broadcast to safe backend
safe-mainnet-example:; forge script src/MainnetExample.s.sol:MainnetExample --rpc-url mainnet --sig "run(bool)" true -vv
safe-polygon-example:; forge script src/PolygonExample.s.sol:PolygonExample --rpc-url polygon --sig "run(bool)" true -vv
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Reserve changes

### Reserve altered

#### wstETH ([0x5979D7b546E38E414F7E9822514be443A4800529](https://arbiscan.io/address/0x5979D7b546E38E414F7E9822514be443A4800529))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 800 wstETH | 1,600 wstETH |


#### LUSD ([0x93b346b6BC2548dA6A1E7d98E9a421B42541425b](https://arbiscan.io/address/0x93b346b6BC2548dA6A1E7d98E9a421B42541425b))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 900,000 LUSD | 1,400,000 LUSD |


#### LINK ([0xf97f4df75117a78c1A5a0DBb814Af92458539FB4](https://arbiscan.io/address/0xf97f4df75117a78c1A5a0DBb814Af92458539FB4))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 810,000 LINK | 1,300,000 LINK |


## Raw diff

```json
{
"reserves": {
"0x5979D7b546E38E414F7E9822514be443A4800529": {
"borrowCap": {
"from": 800,
"to": 1600
}
},
"0x93b346b6BC2548dA6A1E7d98E9a421B42541425b": {
"supplyCap": {
"from": 900000,
"to": 1400000
}
},
"0xf97f4df75117a78c1A5a0DBb814Af92458539FB4": {
"supplyCap": {
"from": 810000,
"to": 1300000
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

#### cbETH ([0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22](https://basescan.org/address/0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 100 cbETH | 200 cbETH |


## Raw diff

```json
{
"reserves": {
"0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22": {
"borrowCap": {
"from": 100,
"to": 200
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Reserve changes

### Reserve altered

#### wstETH ([0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0](https://etherscan.io/address/0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 600,000 wstETH | 750,000 wstETH |
| borrowCap | 12,000 wstETH | 24,000 wstETH |


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

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 210,000 RPL | 420,000 RPL |
| borrowCap | 105,000 RPL | 160,000 RPL |


## Raw diff

```json
{
"reserves": {
"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0": {
"borrowCap": {
"from": 12000,
"to": 24000
},
"supplyCap": {
"from": 600000,
"to": 750000
}
},
"0xD33526068D116cE69F19A9ee46F0bd304F21A51f": {
"borrowCap": {
"from": 105000,
"to": 160000
},
"supplyCap": {
"from": 210000,
"to": 420000
}
}
}
}
```
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ arbitrum = "${RPC_ARBITRUM}"
fantom = "${RPC_FANTOM}"
harmony = "${RPC_HARMONY}"
metis = "${RPC_METIS}"
base = "${RPC_BASE}"

[etherscan]
mainnet = { key="${ETHERSCAN_API_KEY_MAINNET}", chainId=1 }
Expand Down
10 changes: 10 additions & 0 deletions scripts/CapsPlusRiskStewardBaseChain.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveGovernanceV2} from 'aave-address-book/AaveGovernanceV2.sol';
import {AaveV3Base} from 'aave-address-book/AaveV3Base.sol';
import {CapsPlusRiskStewardBase} from './CapsPlusRiskStewardBase.s.sol';

abstract contract CapsPlusRiskStewardBaseChain is CapsPlusRiskStewardBase {
constructor() CapsPlusRiskStewardBase(AaveV3Base.POOL, AaveV3Base.CAPS_PLUS_RISK_STEWARD) {}
}
51 changes: 51 additions & 0 deletions src/ArbitrumCapsIncrease_20230901.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {CapsPlusRiskStewardArbitrum} from '../scripts/CapsPlusRiskStewardArbitrum.s.sol';

/**
* @title Update Caps on Arbitrum V3
* @author Chaos Labs
* - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-and-borrow-caps-on-v3-08-29-2023/14688
*/
contract ArbitrumCapsIncrease_20230901 is CapsPlusRiskStewardArbitrum {
/**
* @return string name identifier used for the diff
*/
function name() internal pure override returns (string memory) {
return 'arbitrum_caps_increase_20230901';
}

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

// LUSD
capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3ArbitrumAssets.LUSD_UNDERLYING,
1_400_000,
EngineFlags.KEEP_CURRENT
);

// LINK
capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3ArbitrumAssets.LINK_UNDERLYING,
1_300_000,
EngineFlags.KEEP_CURRENT
);

// wstETH
capUpdates[2] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3ArbitrumAssets.wstETH_UNDERLYING,
EngineFlags.KEEP_CURRENT,
1_600
);

return capUpdates;
}
}
37 changes: 37 additions & 0 deletions src/BaseCapsIncrease_20230901.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3BaseAssets} from 'aave-address-book/AaveV3Base.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {CapsPlusRiskStewardBaseChain} from '../scripts/CapsPlusRiskStewardBaseChain.s.sol';

/**
* @title Update Caps on Base V3
* @author Chaos Labs
* - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-and-borrow-caps-on-v3-08-29-2023/14688
*/
contract BaseCapsIncrease_20230901 is CapsPlusRiskStewardBaseChain {
/**
* @return string name identifier used for the diff
*/
function name() internal pure override returns (string memory) {
return 'base_caps_increase_20230901';
}

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

// cbETH
capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3BaseAssets.cbETH_UNDERLYING,
EngineFlags.KEEP_CURRENT,
200
);

return capUpdates;
}
}
42 changes: 42 additions & 0 deletions src/MainnetCapsIncrease_20230901.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// 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-08-29-2023/14688
*/
contract MainnetCapsIncrease_20230901 is CapsPlusRiskStewardMainnet {
/**
* @return string name identifier used for the diff
*/
function name() internal pure override returns (string memory) {
return 'mainnetCapsIncrease_20230901';
}

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

capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3EthereumAssets.RPL_UNDERLYING,
420_000,
160_000
);

capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3EthereumAssets.wstETH_UNDERLYING,
750_000,
24_000
);

return capUpdates;
}
}

0 comments on commit 73e6f28

Please sign in to comment.