Skip to content

Commit

Permalink
[ACI] Set wstETH RF to 5% on all market (bgd-labs#382)
Browse files Browse the repository at this point in the history
* wstETH payload to 5% on all markets

* Update src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.sol

Co-authored-by: Harsh Pandey <[email protected]>

* Update src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.sol

Co-authored-by: Harsh Pandey <[email protected]>

* New imports, new tests, new diffs

---------

Co-authored-by: Harsh Pandey <[email protected]>
Co-authored-by: Marc Zeller <[email protected]>
Co-authored-by: marczeller <[email protected]>
  • Loading branch information
4 people authored Jul 31, 2024
1 parent c7303fb commit 25cb42a
Show file tree
Hide file tree
Showing 24 changed files with 1,061 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

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

| description | value before | value after |
| --- | --- | --- |
| reserveFactor | 15 % [1500] | 5 % [500] |


## Raw diff

```json
{
"reserves": {
"0x5979D7b546E38E414F7E9822514be443A4800529": {
"reserveFactor": {
"from": 1500,
"to": 500
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

#### wstETH ([0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452](https://basescan.org/address/0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452))

| description | value before | value after |
| --- | --- | --- |
| reserveFactor | 15 % [1500] | 5 % [500] |


## Raw diff

```json
{
"reserves": {
"0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452": {
"reserveFactor": {
"from": 1500,
"to": 500
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

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

| description | value before | value after |
| --- | --- | --- |
| reserveFactor | 15 % [1500] | 5 % [500] |


## Raw diff

```json
{
"reserves": {
"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0": {
"reserveFactor": {
"from": 1500,
"to": 500
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

#### wstETH ([0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6](https://gnosisscan.io/address/0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6))

| description | value before | value after |
| --- | --- | --- |
| reserveFactor | 15 % [1500] | 5 % [500] |


## Raw diff

```json
{
"reserves": {
"0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6": {
"reserveFactor": {
"from": 1500,
"to": 500
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

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

| description | value before | value after |
| --- | --- | --- |
| reserveFactor | 15 % | 5 % |


## Raw diff

```json
{
"reserves": {
"0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb": {
"reserveFactor": {
"from": 1500,
"to": 500
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

#### wstETH ([0x03b54A6e9a984069379fae1a4fC4dBAE93B3bCCD](https://polygonscan.com/address/0x03b54A6e9a984069379fae1a4fC4dBAE93B3bCCD))

| description | value before | value after |
| --- | --- | --- |
| reserveFactor | 15 % [1500] | 5 % [500] |


## Raw diff

```json
{
"reserves": {
"0x03b54A6e9a984069379fae1a4fC4dBAE93B3bCCD": {
"reserveFactor": {
"from": 1500,
"to": 500
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

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

| description | value before | value after |
| --- | --- | --- |
| reserveFactor | 15 % [1500] | 5 % [500] |


## Raw diff

```json
{
"reserves": {
"0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32": {
"reserveFactor": {
"from": 1500,
"to": 500
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol';
import {AaveV3PayloadArbitrum} from 'aave-helpers/v3-config-engine/AaveV3PayloadArbitrum.sol';
import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol';
/**
* @title Reduce Reserve Factor on wstETH
* @author Aave Chan Initiative
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d
* - Discussion: https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1
*/
contract AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716 is AaveV3PayloadArbitrum {
function borrowsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.BorrowUpdate[] memory)
{
IAaveV3ConfigEngine.BorrowUpdate[]
memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1);

borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3ArbitrumAssets.wstETH_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
borrowableInIsolation: EngineFlags.KEEP_CURRENT,
withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
reserveFactor: 5_00
});

return borrowUpdates;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Arbitrum} from 'aave-address-book/AaveV3Arbitrum.sol';

import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.sol';

/**
* @dev Test for AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716
* command: FOUNDRY_PROFILE=arbitrum forge test --match-path=src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.t.sol -vv
*/
contract AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716_Test is ProtocolV3TestBase {
AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('arbitrum'), 232890608);
proposal = new AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716',
AaveV3Arbitrum.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3BaseAssets} from 'aave-address-book/AaveV3Base.sol';
import {AaveV3PayloadBase} from 'aave-helpers/v3-config-engine/AaveV3PayloadBase.sol';
import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol';
/**
* @title Reduce Reserve Factor on wstETH
* @author Aave Chan Initiative
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d
* - Discussion: https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1
*/
contract AaveV3Base_ReduceReserveFactorOnWstETH_20240716 is AaveV3PayloadBase {
function borrowsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.BorrowUpdate[] memory)
{
IAaveV3ConfigEngine.BorrowUpdate[]
memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1);

borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3BaseAssets.wstETH_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
borrowableInIsolation: EngineFlags.KEEP_CURRENT,
withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
reserveFactor: 5_00
});

return borrowUpdates;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Base_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Base_ReduceReserveFactorOnWstETH_20240716.sol';

/**
* @dev Test for AaveV3Base_ReduceReserveFactorOnWstETH_20240716
* command: FOUNDRY_PROFILE=base forge test --match-path=src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.t.sol -vv
*/
contract AaveV3Base_ReduceReserveFactorOnWstETH_20240716_Test is ProtocolV3TestBase {
AaveV3Base_ReduceReserveFactorOnWstETH_20240716 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('base'), 17182417);
proposal = new AaveV3Base_ReduceReserveFactorOnWstETH_20240716();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Base_ReduceReserveFactorOnWstETH_20240716',
AaveV3Base.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';
import {AaveV3PayloadEthereum} from 'aave-helpers/v3-config-engine/AaveV3PayloadEthereum.sol';
import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol';
/**
* @title Reduce Reserve Factor on wstETH
* @author Aave Chan Initiative
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d
* - Discussion: https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1
*/
contract AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716 is AaveV3PayloadEthereum {
function borrowsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.BorrowUpdate[] memory)
{
IAaveV3ConfigEngine.BorrowUpdate[]
memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1);

borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.wstETH_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
borrowableInIsolation: EngineFlags.KEEP_CURRENT,
withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
reserveFactor: 5_00
});

return borrowUpdates;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';

import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.sol';

/**
* @dev Test for AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.t.sol -vv
*/
contract AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716_Test is ProtocolV3TestBase {
AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 20320832);
proposal = new AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716',
AaveV3Ethereum.POOL,
address(proposal)
);
}
}
Loading

0 comments on commit 25cb42a

Please sign in to comment.