Skip to content

Commit

Permalink
Merge branch 'bgd-labs:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
marczeller authored Jun 5, 2024
2 parents b57848b + 239d210 commit 6e297a9
Show file tree
Hide file tree
Showing 8 changed files with 295 additions and 0 deletions.
1 change: 1 addition & 0 deletions .assets/3aaaf674e060809c81e8e6b0316631fac3bf3376.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/e18f8e9f35475a5e5187d5baf9a5a10770d874d4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Reserve changes

### Reserves altered

#### weETH ([0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe](https://arbiscan.io/address/0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe))

| description | value before | value after |
| --- | --- | --- |
| reserveFactor | 15 % | 45 % |
| interestRateStrategy | [0x0fc12Ad84210695dE8C0D5D8B6f720C37cEaB02f](https://arbiscan.io/address/0x0fc12Ad84210695dE8C0D5D8B6f720C37cEaB02f) | [0x4011fcd421b9E90f131B164EC1d162DBE269621C](https://arbiscan.io/address/0x4011fcd421b9E90f131B164EC1d162DBE269621C) |
| optimalUsageRatio | 45 % | 35 % |
| maxExcessUsageRatio | 55 % | 65 % |
| interestRate | ![before](/.assets/859e8f346e62fa5dc8eed4d223ca2a8d1c9fc80c.svg) | ![after](/.assets/e18f8e9f35475a5e5187d5baf9a5a10770d874d4.svg) |

## Raw diff

```json
{
"reserves": {
"0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe": {
"interestRateStrategy": {
"from": "0x0fc12Ad84210695dE8C0D5D8B6f720C37cEaB02f",
"to": "0x4011fcd421b9E90f131B164EC1d162DBE269621C"
},
"reserveFactor": {
"from": 1500,
"to": 4500
}
}
},
"strategies": {
"0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe": {
"address": {
"from": "0x0fc12Ad84210695dE8C0D5D8B6f720C37cEaB02f",
"to": "0x4011fcd421b9E90f131B164EC1d162DBE269621C"
},
"maxExcessUsageRatio": {
"from": "550000000000000000000000000",
"to": "650000000000000000000000000"
},
"optimalUsageRatio": {
"from": "450000000000000000000000000",
"to": "350000000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// 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-helpers/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';
import {IV3RateStrategyFactory} from 'aave-helpers/v3-config-engine/IV3RateStrategyFactory.sol';
/**
* @title Adjusting Interest Rate Curve for weETH on Arbitrum
* @author ACI
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0xed2fd3dfee1f29f04b6cda4a5c4629fcca32a5c961b1b3e2a49ba6842367ce31
* - Discussion: https://governance.aave.com/t/arfc-adjusting-interest-rate-curve-for-weeth-on-arbitrum/17804
*/
contract AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603 is
AaveV3PayloadArbitrum
{
function rateStrategiesUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.RateStrategyUpdate[] memory)
{
IAaveV3ConfigEngine.RateStrategyUpdate[]
memory rateStrategies = new IAaveV3ConfigEngine.RateStrategyUpdate[](1);
rateStrategies[0] = IAaveV3ConfigEngine.RateStrategyUpdate({
asset: AaveV3ArbitrumAssets.weETH_UNDERLYING,
params: IV3RateStrategyFactory.RateStrategyParams({
optimalUsageRatio: _bpsToRay(35_00),
baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
variableRateSlope1: EngineFlags.KEEP_CURRENT,
variableRateSlope2: EngineFlags.KEEP_CURRENT,
stableRateSlope1: EngineFlags.KEEP_CURRENT,
stableRateSlope2: EngineFlags.KEEP_CURRENT,
baseStableRateOffset: EngineFlags.KEEP_CURRENT,
stableRateExcessOffset: EngineFlags.KEEP_CURRENT,
optimalStableToTotalDebtRatio: EngineFlags.KEEP_CURRENT
})
});

return rateStrategies;
}
function borrowsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.BorrowUpdate[] memory)
{
IAaveV3ConfigEngine.BorrowUpdate[]
memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1);

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

return borrowUpdates;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// 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_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603} from './AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603.sol';

/**
* @dev Test for AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603
* command: FOUNDRY_PROFILE=arbitrum forge test --match-path=src/20240603_AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum/AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603.t.sol -vv
*/
contract AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603_Test is
ProtocolV3TestBase
{
AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603 internal proposal;

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

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603',
AaveV3Arbitrum.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: " Adjusting Interest Rate Curve for weETH on Arbitrum"
author: "ACI"
discussions: "https://governance.aave.com/t/arfc-adjusting-interest-rate-curve-for-weeth-on-arbitrum/17804"
snapshot: "https://snapshot.org/#/aave.eth/proposal/0xed2fd3dfee1f29f04b6cda4a5c4629fcca32a5c961b1b3e2a49ba6842367ce31"
---

## Simple Summary

The current proposal suggests adjusting the Interest Rate Curve for weETH on Arbitrum network to align with the mainnet, so Risk Parameters will be the same for weETH on Mainnet, Arbitrum, and Base networks.

The aim is to optimize the utilization rates and improve revenue for the DAO.

## Motivation

By adjusting the Interest Rate Curve and updating the RF, we aim to encourage Increase efficiency and optimize DAO revenue for the weETH asset.

## Specification

Change Arbitrum Risk Parameters for weETH to align with Mainnet & Base.

**Proposed Changes:**

| Parameter | Value |
| -------------- | ------ |
| Uoptimal | 35.00% |
| Reserve Factor | 45.00% |

## References

- Implementation: [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/15298f4d41cd6165cc15d9c03d49c9affa7bbb4b/src/20240603_AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum/AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603.sol)
- Tests: [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/15298f4d41cd6165cc15d9c03d49c9affa7bbb4b/src/20240603_AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum/AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603.t.sol)
- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0xed2fd3dfee1f29f04b6cda4a5c4629fcca32a5c961b1b3e2a49ba6842367ce31)
- [Discussion](https://governance.aave.com/t/arfc-adjusting-interest-rate-curve-for-weeth-on-arbitrum/17804)

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {EthereumScript, ArbitrumScript} from 'aave-helpers/ScriptUtils.sol';
import {AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603} from './AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603.sol';

/**
* @dev Deploy Arbitrum
* deploy-command: make deploy-ledger contract=src/20240603_AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum/AdjustingInterestRateCurveForWeETHOnArbitrum_20240603.s.sol:DeployArbitrum chain=arbitrum
* verify-command: FOUNDRY_PROFILE=arbitrum npx catapulta-verify -b broadcast/AdjustingInterestRateCurveForWeETHOnArbitrum_20240603.s.sol/42161/run-latest.json
*/
contract DeployArbitrum is ArbitrumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603).creationCode
);

// compose action
IPayloadsControllerCore.ExecutionAction[]
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
actions[0] = GovV3Helpers.buildAction(payload0);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
}
}

/**
* @dev Create Proposal
* command: make deploy-ledger contract=src/20240603_AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum/AdjustingInterestRateCurveForWeETHOnArbitrum_20240603.s.sol:CreateProposal chain=mainnet
*/
contract CreateProposal is EthereumScript {
function run() external {
// create payloads
PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1);

// compose actions for validation
IPayloadsControllerCore.ExecutionAction[]
memory actionsArbitrum = new IPayloadsControllerCore.ExecutionAction[](1);
actionsArbitrum[0] = GovV3Helpers.buildAction(
type(AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum_20240603).creationCode
);
payloads[0] = GovV3Helpers.buildArbitrumPayload(vm, actionsArbitrum);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL,
GovV3Helpers.ipfsHashFile(
vm,
'src/20240603_AaveV3Arbitrum_AdjustingInterestRateCurveForWeETHOnArbitrum/AdjustingInterestRateCurveForWeETHOnArbitrum.md'
)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import {ConfigFile} from '../../generator/types';
export const config: ConfigFile = {
rootOptions: {
pools: ['AaveV3Arbitrum'],
title: ' Adjusting Interest Rate Curve for weETH on Arbitrum',
shortName: 'AdjustingInterestRateCurveForWeETHOnArbitrum',
date: '20240603',
author: 'ACI',
discussion:
'https://governance.aave.com/t/arfc-adjusting-interest-rate-curve-for-weeth-on-arbitrum/17804',
snapshot:
'https://snapshot.org/#/aave.eth/proposal/0xed2fd3dfee1f29f04b6cda4a5c4629fcca32a5c961b1b3e2a49ba6842367ce31',
votingNetwork: 'POLYGON',
},
poolOptions: {
AaveV3Arbitrum: {
configs: {
RATE_UPDATE_V3: [
{
asset: 'weETH',
params: {
optimalUtilizationRate: '35',
baseVariableBorrowRate: '0',
variableRateSlope1: '7',
variableRateSlope2: '300',
stableRateSlope1: '7',
stableRateSlope2: '300',
baseStableRateOffset: '0',
stableRateExcessOffset: '00',
optimalStableToTotalDebtRatio: '0',
},
},
],
BORROWS_UPDATE: [
{
enabledToBorrow: 'KEEP_CURRENT',
flashloanable: 'KEEP_CURRENT',
stableRateModeEnabled: 'DISABLED',
borrowableInIsolation: 'DISABLED',
withSiloedBorrowing: 'DISABLED',
reserveFactor: '45',
asset: 'weETH',
},
],
},
cache: {blockNumber: 217920822},
},
},
};

0 comments on commit 6e297a9

Please sign in to comment.