Skip to content

Commit

Permalink
feat: USDS BR update
Browse files Browse the repository at this point in the history
  • Loading branch information
Rozengarden committed Nov 22, 2024
1 parent ad22f03 commit 4fda313
Show file tree
Hide file tree
Showing 9 changed files with 416 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
## Reserve changes

### Reserve altered

#### sUSDe ([0x9D39A5DE30e57443BfF2A8307A4256c8797A3497](https://etherscan.io/address/0x9D39A5DE30e57443BfF2A8307A4256c8797A3497))

| description | value before | value after |
| --- | --- | --- |
| isFrozen | false | true |
| ltv | 0.05 % [5] | 0 % [0] |


#### USDS ([0xdC035D45d973E3EC169d2276DDab16f1e407384F](https://etherscan.io/address/0xdC035D45d973E3EC169d2276DDab16f1e407384F))

| description | value before | value after |
| --- | --- | --- |
| maxVariableBorrowRate | 82 % | 84 % |
| variableRateSlope1 | 6.25 % | 8.25 % |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=62500000000000000000000000&variableRateSlope2=750000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=7500000000000000000000000&maxVariableBorrowRate=820000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=82500000000000000000000000&variableRateSlope2=750000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=7500000000000000000000000&maxVariableBorrowRate=840000000000000000000000000) |

## Raw diff

```json
{
"reserves": {
"0x9D39A5DE30e57443BfF2A8307A4256c8797A3497": {
"isFrozen": {
"from": false,
"to": true
},
"ltv": {
"from": 5,
"to": 0
}
}
},
"strategies": {
"0xdC035D45d973E3EC169d2276DDab16f1e407384F": {
"maxVariableBorrowRate": {
"from": "820000000000000000000000000",
"to": "840000000000000000000000000"
},
"variableRateSlope1": {
"from": "62500000000000000000000000",
"to": "82500000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Reserve changes

### Reserves altered

#### USDS ([0xdC035D45d973E3EC169d2276DDab16f1e407384F](https://etherscan.io/address/0xdC035D45d973E3EC169d2276DDab16f1e407384F))

| description | value before | value after |
| --- | --- | --- |
| maxVariableBorrowRate | 82 % | 84 % |
| baseVariableBorrowRate | 6.25 % | 8.25 % |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=7500000000000000000000000&variableRateSlope2=750000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=62500000000000000000000000&maxVariableBorrowRate=820000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=7500000000000000000000000&variableRateSlope2=750000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=82500000000000000000000000&maxVariableBorrowRate=840000000000000000000000000) |

## Raw diff

```json
{
"strategies": {
"0xdC035D45d973E3EC169d2276DDab16f1e407384F": {
"baseVariableBorrowRate": {
"from": "62500000000000000000000000",
"to": "82500000000000000000000000"
},
"maxVariableBorrowRate": {
"from": "820000000000000000000000000",
"to": "840000000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3EthereumLido, AaveV3EthereumLidoAssets} from 'aave-address-book/AaveV3EthereumLido.sol';
import {AaveV3PayloadEthereumLido} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadEthereumLido.sol';
import {EngineFlags} from 'aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol';
/**
* @title USDS borrow rate update on Core and Prime Instances
* @author Aave Chan Initiative
* - Snapshot: Direct-to-AIP
* - Discussion: https://governance.aave.com/t/arfc-usds-borrow-rate-update-on-core-and-prime-instances/19901
*/
contract AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122 is
AaveV3PayloadEthereumLido
{
function _postExecute() internal override {
AaveV3EthereumLido.POOL_CONFIGURATOR.setReserveFreeze(
AaveV3EthereumLidoAssets.sUSDe_UNDERLYING,
true
);
}

function rateStrategiesUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.RateStrategyUpdate[] memory)
{
IAaveV3ConfigEngine.RateStrategyUpdate[]
memory rateStrategies = new IAaveV3ConfigEngine.RateStrategyUpdate[](1);
rateStrategies[0] = IAaveV3ConfigEngine.RateStrategyUpdate({
asset: AaveV3EthereumLidoAssets.USDS_UNDERLYING,
params: IAaveV3ConfigEngine.InterestRateInputData({
optimalUsageRatio: EngineFlags.KEEP_CURRENT,
baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
variableRateSlope1: 8_25,
variableRateSlope2: EngineFlags.KEEP_CURRENT
})
});

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

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

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

/**
* @dev Test for AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol -vv
*/
contract AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_Test is
ProtocolV3TestBase
{
AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122 internal proposal;

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

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

import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';
import {AaveV3PayloadEthereum} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadEthereum.sol';
import {EngineFlags} from 'aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol';
/**
* @title USDS borrow rate update on Core and Prime Instances
* @author Aave Chan Initiative
* - Snapshot: Direct-to-AIP
* - Discussion: https://governance.aave.com/t/arfc-usds-borrow-rate-update-on-core-and-prime-instances/19901
*/
contract AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122 is
AaveV3PayloadEthereum
{
function rateStrategiesUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.RateStrategyUpdate[] memory)
{
IAaveV3ConfigEngine.RateStrategyUpdate[]
memory rateStrategies = new IAaveV3ConfigEngine.RateStrategyUpdate[](1);
rateStrategies[0] = IAaveV3ConfigEngine.RateStrategyUpdate({
asset: AaveV3EthereumAssets.USDS_UNDERLYING,
params: IAaveV3ConfigEngine.InterestRateInputData({
optimalUsageRatio: EngineFlags.KEEP_CURRENT,
baseVariableBorrowRate: 8_25,
variableRateSlope1: EngineFlags.KEEP_CURRENT,
variableRateSlope2: EngineFlags.KEEP_CURRENT
})
});

return rateStrategies;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// 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/src/ProtocolV3TestBase.sol';
import {AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122} from './AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol';

/**
* @dev Test for AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol -vv
*/
contract AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_Test is
ProtocolV3TestBase
{
AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122 internal proposal;

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

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122',
AaveV3Ethereum.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: "USDS borrow rate update on Core and Prime Instances"
author: "Aave Chan Initiative"
discussions: "https://governance.aave.com/t/arfc-usds-borrow-rate-update-on-core-and-prime-instances/19901"
snapshot: "Direct-to-AIP"
---

## Simple Summary

This proposal recommends increasing the USDS Core Instance Base Rate (currently at 6.25%) and Slope1 (currently at 6.25%) on Prime Market.

Raising USDS borrowing rates ensures the SSR remains competitive, attracting demand while discouraging excessive borrowing at unsustainable levels.

We also propose pausing sUSDe operations in the Prime instance to focus on scaling USDS liquidity in the Core Market, where there is significant demand.

This is a Direct to AIP Proposal.

## Motivation

Recent observations in the market have highlighted issues stemming from **sUSDe** in the Prime instance:

1. **sUSDe’s Impact on USDS Borrow Rate**:The presence of sUSDe is driving up the USDS Borrow Rate, creating pressure in the Prime Instance. The high rates pose a risk of cascading rebalances, particularly:

- wstETH collateral migrates to Spark for USDS liquidity.
- ezETH loopers exit due to spiking wstETH borrow rates.
- Resulting in a significant outflow of AUM from the market.

2. **Mismatch Between Liquidity and Risk**:

- The liquidity needs of sUSDe are not being met effectively, leading to imbalance.
- The market is unable to accommodate the current sUSDe scale without affecting overall stability.

While at same time there is substantial **Untapped Demand in the Core Instance**:

- The substantial demand in the Core Instance presents an opportunity to scale USDS aggressively while mitigating risk.

## Specification

### 1. **Increase USDS Base Rate 2% on Core Instance and 2% Slope1 on Prime Instance**

- Adjusting the borrow rate is a necessary step to manage the borrowing cost dynamics and balance the market risk posed by sUSDe.
- This adjustment should be implemented across both the Prime and Core Instances.

### 2. **Pause sUSDe on Prime Instance**

- Temporarily halt sUSDe operations in the Prime stance to stabilize the market and focus on optimizing the Core Instance.
- This pause will allow time to reassess the sizing of sUSDe based on available liquidity and market condition.

| **Parameter** | **Current** | **Proposed** | **Change** |
| -------------- | ----------- | ------------ | ---------- |
| _Prime Market_ | | | |
| Base | 0.75% | 0.75% | No change |
| Slope1 | 6.25% | 8.25% | +2% |
| Slope2 | 75% | 75% | No change |
| _Core Market_ | | | |
| Base | 6.25% | 8.25% | +2% |
| Slope1 | 0.75% | 0.75% | No change |
| Slope2 | 75% | 75% | No change |

## References

- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol), [AaveV3EthereumLido](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol)
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol), [AaveV3EthereumLido](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol)
- Snapshot: Direct-to-AIP
- [Discussion](https://governance.aave.com/t/arfc-usds-borrow-rate-update-on-core-and-prime-instances/19901)

## 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,68 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/src/GovV3Helpers.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {EthereumScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol';
import {AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122} from './AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol';
import {AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122} from './AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol';

/**
* @dev Deploy Ethereum
* deploy-command: make deploy-ledger contract=src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.s.sol:DeployEthereum chain=mainnet
* verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.s.sol/1/run-latest.json
*/
contract DeployEthereum is EthereumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122).creationCode
);
address payload1 = GovV3Helpers.deployDeterministic(
type(AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122).creationCode
);

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

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

/**
* @dev Create Proposal
* command: make deploy-ledger contract=src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.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 actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](2);
actionsEthereum[0] = GovV3Helpers.buildAction(
type(AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122).creationCode
);
actionsEthereum[1] = GovV3Helpers.buildAction(
type(AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122).creationCode
);
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL,
GovV3Helpers.ipfsHashFile(
vm,
'src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances.md'
)
);
}
}
Loading

0 comments on commit 4fda313

Please sign in to comment.