Skip to content

Commit

Permalink
Merge pull request #53 from bgd-labs/chaoslabs/scroll_caps_increase_2…
Browse files Browse the repository at this point in the history
…0240214

Scroll caps increase 20240214
  • Loading branch information
eyalovadya authored Feb 21, 2024
2 parents a18d4c7 + 9ab1335 commit 3af508d
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ arbitrum-contract:; forge script ${contract_path} --rpc-url arbitrum --sig "run(
metis-contract:; forge script ${contract_path} --rpc-url metis --sig "run(bool)" false -vv
base-contract:; forge script ${contract_path} --rpc-url base --sig "run(bool)" false -vv
gnosis-contract:; forge script ${contract_path} --rpc-url gnosis --sig "run(bool)" false -vv
scroll-contract:; forge script ${contract_path} --rpc-url scroll --sig "run(bool)" false -vv

# only emit
mainnet-example:; forge script src/MainnetExample.s.sol:MainnetExample --rpc-url mainnet --sig "run(bool)" false -vv
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Reserve changes

### Reserve altered

#### USDC ([0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4](https://scrollscan.com/address/0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 1,000,000 USDC | 2,000,000 USDC |


#### WETH ([0x5300000000000000000000000000000000000004](https://scrollscan.com/address/0x5300000000000000000000000000000000000004))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 240 WETH | 480 WETH |


#### wstETH ([0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32](https://scrollscan.com/address/0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 130 wstETH | 260 wstETH |


## Raw diff

```json
{
"reserves": {
"0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4": {
"supplyCap": {
"from": 1000000,
"to": 2000000
}
},
"0x5300000000000000000000000000000000000004": {
"supplyCap": {
"from": 240,
"to": 480
}
},
"0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32": {
"supplyCap": {
"from": 130,
"to": 260
}
}
}
}
```
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ harmony = "${RPC_HARMONY}"
metis = "${RPC_METIS}"
base = "${RPC_BASE}"
gnosis = "${RPC_GNOSIS}"
scroll = "${RPC_SCROLL}"

[etherscan]
mainnet = { key="${ETHERSCAN_API_KEY_MAINNET}", chainId=1 }
Expand Down
2 changes: 1 addition & 1 deletion lib/aave-address-book
Submodule aave-address-book updated 190 files
2 changes: 1 addition & 1 deletion lib/aave-helpers
Submodule aave-helpers updated 51 files
+1 −0 .assets/005b16eaa54199269ae451836387895a28c5d76e.svg
+1 −0 .assets/08d9252b4f8f8c9e59638a9a35a34e736f126166.svg
+0 −1 .assets/3bff92d2cfac98105fbeed24302d9d3577cb1325.svg
+1 −0 .assets/463b4c710a9b305cac1e136801dfbb5d2264a078.svg
+1 −0 .assets/5f02ea67e5ba53eee2797379ac1cd619db8b194e.svg
+0 −1 .assets/66aa72f6fe3716b9b6a43abb25a455671672849e.svg
+0 −1 .assets/6f34858c4ab5446d26b260c353dc36aa73d94358.svg
+1 −0 .assets/8062d95ddc9e1bec6e4a6b53fca46e335385d902.svg
+0 −1 .assets/9ed0ac5bda0d6aea5b627325dd757aab5a706122.svg
+1 −0 .assets/a9946a5d9adc46c59f833ceafb1d7a117d8d5e26.svg
+1 −0 .assets/cf503516adca0ef2b3e859f702e54d27d132edf2.svg
+0 −1 .assets/d89ecf5f1ccbeb07b104da02d99f5a5862da4efa.svg
+1 −0 .assets/ee0b6581b78f686087dd5f50440a7a76f4dd607d.svg
+1 −0 .assets/f75716c7eaa3c871931fca294b19538f6ade058c.svg
+5 −0 .env.example
+1 −1 .github/workflows/merge-main.yml
+10 −2 Makefile
+4 −4 diffs/preTestEngineOptV3Gauntlet_postTestEngineOptV3Gauntlet.md
+7 −7 diffs/preTestEngineOptV3_postTestEngineOptV3.md
+5 −5 diffs/preTestEngineRates_postTestEngineRates.md
+4 −0 foundry.toml
+1 −1 lib/aave-address-book
+1 −1 lib/forge-std
+1 −1 package.json
+176 −96 reports/default_after.json
+1,308 −1 reports/default_before.json
+79 −79 reports/postTestEngineOptV3.json
+76 −76 reports/postTestEngineRates.json
+76 −76 reports/preTestEngineOptV3.json
+76 −76 reports/preTestEngineRates.json
+1,508 −1 reports/preTestV2RatesUpdates.json
+82 −1 scripts/AaveV3ConfigEngine.s.sol
+14 −0 scripts/FreezingStewards.s.sol
+23 −0 scripts/RiskStewards.s.sol
+38 −0 scripts/V3RateStrategyFactory.s.sol
+3 −0 src/ChainIds.sol
+21 −20 src/CommonTestBase.sol
+1 −15 src/GovHelpers.sol
+63 −7 src/GovV3Helpers.sol
+1 −1 src/IpfsUtils.sol
+8 −0 src/ScriptUtils.sol
+15 −0 src/v3-config-engine/AaveV3PayloadPolygonZkEvm.sol
+15 −0 src/v3-config-engine/AaveV3PayloadScroll.sol
+22 −0 tests/CommonTestBase.t.sol
+0 −82 tests/GovTest.t.sol
+0 −71 tests/GovV2_5.t.sol
+14 −8 tests/GovV3Test.t.sol
+6 −5 tests/swaps/DepositV3SwapPayloadTest.t.sol
+1 −1 tests/v3-config-engine/AaveV3ConfigEngineTest.t.sol
+2 −2 tests/v3-config-engine/V3RateStrategyFactory.t.sol
+312 −114 yarn.lock
2 changes: 1 addition & 1 deletion lib/forge-std
10 changes: 10 additions & 0 deletions scripts/CapsPlusRiskStewardScroll.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 {AaveV3Scroll} from 'aave-address-book/AaveV3Scroll.sol';
import {CapsPlusRiskStewardBase} from './CapsPlusRiskStewardBase.s.sol';

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

import {AaveV3ScrollAssets} from 'aave-address-book/AaveV3Scroll.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {CapsPlusRiskStewardScroll} from '../scripts/CapsPlusRiskStewardScroll.s.sol';

/**
* @title Update Caps on Scroll V3
* @author Chaos Labs - eyalovadya
* - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-caps-on-v3-scroll-02-14-2024/16626
*/
contract ScrollCapsIncrease_20240214 is CapsPlusRiskStewardScroll {
/**
* @return string name identifier used for the diff
*/
function name() internal pure override returns (string memory) {
return 'scroll_caps_increase_20240214';
}

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

capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3ScrollAssets.USDC_UNDERLYING,
2_000_000,
EngineFlags.KEEP_CURRENT
);

capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3ScrollAssets.WETH_UNDERLYING,
480,
EngineFlags.KEEP_CURRENT
);

capUpdates[2] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3ScrollAssets.wstETH_UNDERLYING,
260,
EngineFlags.KEEP_CURRENT
);

return capUpdates;
}
}

0 comments on commit 3af508d

Please sign in to comment.