Skip to content

Commit

Permalink
Merge pull request #40 from bgd-labs/chaos/support_gnosis
Browse files Browse the repository at this point in the history
Update Caps on Gnosis + add support for Gnosis
  • Loading branch information
yonikesel authored Nov 20, 2023
2 parents 66ff3cd + 6e3e754 commit aecd23f
Show file tree
Hide file tree
Showing 8 changed files with 167 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ optimism-contract:; forge script ${contract_path} --rpc-url optimism --sig "run(
arbitrum-contract:; forge script ${contract_path} --rpc-url arbitrum --sig "run(bool)" false -vv
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

# 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,92 @@
## Reserve changes

### Reserve altered

#### wstETH ([0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6](https://blockscout.com/xdai/mainnet/address/0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 4,000 wstETH | 5,000 wstETH |


#### USDC ([0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83](https://blockscout.com/xdai/mainnet/address/0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 1,000,000 USDC | 1,500,000 USDC |
| borrowCap | 1,000,000 USDC | 1,500,000 USDC |


#### sDAI ([0xaf204776c7245bF4147c2612BF6e5972Ee483701](https://blockscout.com/xdai/mainnet/address/0xaf204776c7245bF4147c2612BF6e5972Ee483701))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 1,500,000 sDAI | 3,000,000 sDAI |


#### EURe ([0xcB444e90D8198415266c6a2724b7900fb12FC56E](https://blockscout.com/xdai/mainnet/address/0xcB444e90D8198415266c6a2724b7900fb12FC56E))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 500,000 EURe | 750,000 EURe |
| borrowCap | 500,000 EURe | 750,000 EURe |


#### WXDAI ([0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d](https://blockscout.com/xdai/mainnet/address/0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 1,500,000 WXDAI | 2,300,000 WXDAI |
| borrowCap | 1,500,000 WXDAI | 2,300,000 WXDAI |


## Raw diff

```json
{
"reserves": {
"0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6": {
"supplyCap": {
"from": 4000,
"to": 5000
}
},
"0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83": {
"borrowCap": {
"from": 1000000,
"to": 1500000
},
"supplyCap": {
"from": 1000000,
"to": 1500000
}
},
"0xaf204776c7245bF4147c2612BF6e5972Ee483701": {
"supplyCap": {
"from": 1500000,
"to": 3000000
}
},
"0xcB444e90D8198415266c6a2724b7900fb12FC56E": {
"borrowCap": {
"from": 500000,
"to": 750000
},
"supplyCap": {
"from": 500000,
"to": 750000
}
},
"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d": {
"borrowCap": {
"from": 1500000,
"to": 2300000
},
"supplyCap": {
"from": 1500000,
"to": 2300000
}
}
}
}
```
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ fantom = "${RPC_FANTOM}"
harmony = "${RPC_HARMONY}"
metis = "${RPC_METIS}"
base = "${RPC_BASE}"
gnosis = "${RPC_GNOSIS}"

[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 185 files
2 changes: 1 addition & 1 deletion lib/aave-helpers
Submodule aave-helpers updated 186 files
2 changes: 1 addition & 1 deletion lib/forge-std
10 changes: 10 additions & 0 deletions scripts/CapsPlusRiskStewardGnosis.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 {AaveV3Gnosis} from 'aave-address-book/AaveV3Gnosis.sol';
import {CapsPlusRiskStewardBase} from './CapsPlusRiskStewardBase.s.sol';

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

import {AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {CapsPlusRiskStewardGnosis} from '../scripts/CapsPlusRiskStewardGnosis.s.sol';

/**
* @title Update Caps on Gnosis V3
* @author Chaos Labs
* - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-and-borrow-caps-on-v3-gnosis-11-10-2023/15469
*/
contract GnosisCapsIncrease_20231112 is CapsPlusRiskStewardGnosis {
/**
* @return string name identifier used for the diff
*/
function name() internal pure override returns (string memory) {
return 'gnosis_caps_increase_20231112';
}

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

capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3GnosisAssets.wstETH_UNDERLYING,
5_000,
EngineFlags.KEEP_CURRENT
);

capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3GnosisAssets.WXDAI_UNDERLYING,
2_300_000,
2_300_000
);

capUpdates[2] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3GnosisAssets.sDAI_UNDERLYING,
3_000_000,
EngineFlags.KEEP_CURRENT
);

capUpdates[3] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3GnosisAssets.USDC_UNDERLYING,
1_500_000,
1_500_000
);

capUpdates[4] = IAaveV3ConfigEngine.CapsUpdate(
AaveV3GnosisAssets.EURe_UNDERLYING,
750_000,
750_000
);

return capUpdates;
}
}

0 comments on commit aecd23f

Please sign in to comment.