Skip to content

Commit

Permalink
feat: adjust USDS IR curve
Browse files Browse the repository at this point in the history
  • Loading branch information
Rozengarden committed Dec 23, 2024
1 parent 205c197 commit b5689ac
Show file tree
Hide file tree
Showing 9 changed files with 355 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Reserve changes

### Reserves altered

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

| description | value before | value after |
| --- | --- | --- |
| maxVariableBorrowRate | 85 % | 47.5 % |
| variableRateSlope1 | 9.25 % | 11.75 % |
| variableRateSlope2 | 75 % | 35 % |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=92500000000000000000000000&variableRateSlope2=750000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=7500000000000000000000000&maxVariableBorrowRate=850000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=117500000000000000000000000&variableRateSlope2=350000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=7500000000000000000000000&maxVariableBorrowRate=475000000000000000000000000) |

## Raw diff

```json
{
"strategies": {
"0xdC035D45d973E3EC169d2276DDab16f1e407384F": {
"maxVariableBorrowRate": {
"from": "850000000000000000000000000",
"to": "475000000000000000000000000"
},
"variableRateSlope1": {
"from": "92500000000000000000000000",
"to": "117500000000000000000000000"
},
"variableRateSlope2": {
"from": "750000000000000000000000000",
"to": "350000000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Reserve changes

### Reserves altered

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

| description | value before | value after |
| --- | --- | --- |
| maxVariableBorrowRate | 85 % | 47.5 % |
| baseVariableBorrowRate | 9.25 % | 11.75 % |
| variableRateSlope2 | 75 % | 35 % |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=7500000000000000000000000&variableRateSlope2=750000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=92500000000000000000000000&maxVariableBorrowRate=850000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=7500000000000000000000000&variableRateSlope2=350000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=117500000000000000000000000&maxVariableBorrowRate=475000000000000000000000000) |

## Raw diff

```json
{
"strategies": {
"0xdC035D45d973E3EC169d2276DDab16f1e407384F": {
"baseVariableBorrowRate": {
"from": "92500000000000000000000000",
"to": "117500000000000000000000000"
},
"maxVariableBorrowRate": {
"from": "850000000000000000000000000",
"to": "475000000000000000000000000"
},
"variableRateSlope2": {
"from": "750000000000000000000000000",
"to": "350000000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {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 Interest Rate Curve Update
* @author Aave Chan Initiative
* - Snapshot: Direct-to-AIP
* - Discussion: https://governance.aave.com/t/arfc-usds-interest-rate-curve-update/20243
*/
contract AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223 is AaveV3PayloadEthereumLido {
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: 11_75,
variableRateSlope2: 35_00
})
});

return rateStrategies;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// 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_USDSInterestRateCurveUpdate_20241223} from './AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223.sol';

/**
* @dev Test for AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241223_Multi_USDSInterestRateCurveUpdate/AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223.t.sol -vv
*/
contract AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223_Test is ProtocolV3TestBase {
AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223 internal proposal;

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

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223',
AaveV3EthereumLido.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// 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 Interest Rate Curve Update
* @author Aave Chan Initiative
* - Snapshot: Direct-to-AIP
* - Discussion: https://governance.aave.com/t/arfc-usds-interest-rate-curve-update/20243
*/
contract AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223 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: 11_75,
variableRateSlope1: EngineFlags.KEEP_CURRENT,
variableRateSlope2: 35_00
})
});

return rateStrategies;
}
}
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/src/ProtocolV3TestBase.sol';
import {AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223} from './AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223.sol';

/**
* @dev Test for AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241223_Multi_USDSInterestRateCurveUpdate/AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223.t.sol -vv
*/
contract AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223_Test is ProtocolV3TestBase {
AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223 internal proposal;

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

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223',
AaveV3Ethereum.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "USDS Interest Rate Curve Update"
author: "ChaosLabs"
discussions: "https://governance.aave.com/t/arfc-usds-interest-rate-curve-update/20243"
---

## Simple Summary

Following our previous stablecoin IR recommendation, Chaos Labs recommends adjustments to USDS’s interest rate curves on the Prime and Core deployments.

## Motivation

As noted in our previous stablecoin IR [recommendation](https://www.notion.so/USDS-IR-Update-15e57ab37ebf80bdb091e3d65ca16bff?pvs=21), we did not provide updates to USDS’s interest rate curves because there was a concurrent [AIP](https://vote.onaave.com/proposal/?proposalId=209&ipfsHash=0x1a9acbab30d3c9c381e899fb79433cf8bdb996bddb514b195baa32a085a84809) that proposed adjusting its IR curves. This AIP has since passed and been implemented, allowing us to recommend further adjustments.

We have observed frequent spikes above UOptimal for USDS on the Core instance, with rates briefly exceeding 100% in December. Rates on the Prime deployment have been more stable as a result of limited sUSDe growth in this deployment. As shown below, the spikes in the Core instance have continued after the passage of the AIP and the associated IR change.

The frequent spikes have coincided with a decrease in borrows, as a result of large market outflows. To optimally price the asset, and to set USDS in line with other stablecoins, we recommend increasing the target borrow rate at UOptimal, which will also reduce the time spent above UOptimal. Specifically, we recommend targeting 12.5% at UOptimal and a Slope2 of 35% for both USDS markets, noting that this is aligned with the target rate for all other major stablecoin markets.

## Specification

| Chain | Market | **Asset** | Current Base Rate | **Current Slope1** | **Current Slope2** | Recommended Base Rate | **Recommended Slope1** | **Recommended Slope2** |
| -------- | ------ | --------- | ----------------- | ------------------ | ------------------ | --------------------- | ---------------------- | ---------------------- |
| Ethereum | Core | USDS | 9.25% | 0.75% | 75% | 11.75% | - | 35% |
| Ethereum | Prime | USDS | 0.75% | 9.25% | 75% | - | 11.75% | 35% |

## References

- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241223_Multi_USDSInterestRateCurveUpdate/AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223.sol), [AaveV3EthereumLido](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241223_Multi_USDSInterestRateCurveUpdate/AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223.sol)
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241223_Multi_USDSInterestRateCurveUpdate/AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223.t.sol), [AaveV3EthereumLido](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241223_Multi_USDSInterestRateCurveUpdate/AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223.t.sol)
- Snapshot: Direct-to-AIP
- [Discussion](https://governance.aave.com/t/arfc-usds-interest-rate-curve-update/20243)

## 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_USDSInterestRateCurveUpdate_20241223} from './AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223.sol';
import {AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223} from './AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223.sol';

/**
* @dev Deploy Ethereum
* deploy-command: make deploy-ledger contract=src/20241223_Multi_USDSInterestRateCurveUpdate/USDSInterestRateCurveUpdate_20241223.s.sol:DeployEthereum chain=mainnet
* verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/USDSInterestRateCurveUpdate_20241223.s.sol/1/run-latest.json
*/
contract DeployEthereum is EthereumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3Ethereum_USDSInterestRateCurveUpdate_20241223).creationCode
);
address payload1 = GovV3Helpers.deployDeterministic(
type(AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223).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/20241223_Multi_USDSInterestRateCurveUpdate/USDSInterestRateCurveUpdate_20241223.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_USDSInterestRateCurveUpdate_20241223).creationCode
);
actionsEthereum[1] = GovV3Helpers.buildAction(
type(AaveV3EthereumLido_USDSInterestRateCurveUpdate_20241223).creationCode
);
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL,
GovV3Helpers.ipfsHashFile(
vm,
'src/20241223_Multi_USDSInterestRateCurveUpdate/USDSInterestRateCurveUpdate.md'
)
);
}
}
48 changes: 48 additions & 0 deletions src/20241223_Multi_USDSInterestRateCurveUpdate/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import {ConfigFile} from '../../generator/types';
export const config: ConfigFile = {
rootOptions: {
configFile: 'tmp.ts',
author: 'Aave Chan Initiative',
pools: ['AaveV3Ethereum', 'AaveV3EthereumLido'],
title: 'USDS Interest Rate Curve Update',
shortName: 'USDSInterestRateCurveUpdate',
date: '20241223',
discussion: 'https://governance.aave.com/t/arfc-usds-interest-rate-curve-update/20243',
snapshot: 'Direct-to-AIP',
votingNetwork: 'POLYGON',
},
poolOptions: {
AaveV3Ethereum: {
configs: {
RATE_UPDATE_V3: [
{
asset: 'USDS',
params: {
optimalUtilizationRate: '',
baseVariableBorrowRate: '11.75',
variableRateSlope1: '',
variableRateSlope2: '35',
},
},
],
},
cache: {blockNumber: 21464361},
},
AaveV3EthereumLido: {
configs: {
RATE_UPDATE_V3: [
{
asset: 'USDS',
params: {
optimalUtilizationRate: '',
baseVariableBorrowRate: '',
variableRateSlope1: '11.75',
variableRateSlope2: '35',
},
},
],
},
cache: {blockNumber: 21464361},
},
},
};

0 comments on commit b5689ac

Please sign in to comment.