Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove USDS from sUSDe emode in Aave Prime instance - Review #553

Merged
merged 3 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Emodes changed

### EMode: ETH correlated(id: 1)



### EMode: LRT Stablecoins main(id: 2)



### EMode: LRT wstETH main(id: 3)



### EMode: sUSDe Stablecoins(id: 4)

| description | value before | value after |
| --- | --- | --- |
| eMode.label (unchanged) | sUSDe Stablecoins | sUSDe Stablecoins |
| eMode.ltv (unchanged) | 90 % | 90 % |
| eMode.liquidationThreshold (unchanged) | 92 % | 92 % |
| eMode.liquidationBonus | 3 % | 4 % |
| eMode.borrowableBitmap | USDS, USDC, GHO | USDC, GHO |
| eMode.collateralBitmap (unchanged) | sUSDe | sUSDe |


### EMode: rsETH LST main(id: 5)



## Raw diff

```json
{
"eModes": {
"4": {
"borrowableBitmap": {
"from": "76",
"to": "72"
},
"liquidationBonus": {
"from": 10300,
"to": 10400
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Emodes changed

### EMode: ETH correlated(id: 1)



### EMode: sUSDe Stablecoins(id: 2)

| description | value before | value after |
| --- | --- | --- |
| eMode.label (unchanged) | sUSDe Stablecoins | sUSDe Stablecoins |
| eMode.ltv (unchanged) | 90 % | 90 % |
| eMode.liquidationThreshold (unchanged) | 92 % | 92 % |
| eMode.liquidationBonus | 3 % | 4 % |
| eMode.borrowableBitmap (unchanged) | USDC, USDT, USDS | USDC, USDT, USDS |
| eMode.collateralBitmap (unchanged) | sUSDe | sUSDe |


### EMode: rsETH LST main(id: 3)



## Raw diff

```json
{
"eModes": {
"2": {
"liquidationBonus": {
"from": 10300,
"to": 10400
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3EthereumLidoAssets, AaveV3EthereumLidoEModes} 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 Proposal to Remove USDS from sUSDe Liquid E-Mode in Aave Prime Instance
* @author Aave-chan Initiative
* - Snapshot: https://snapshot.box/#/s:aave.eth/proposal/0x2be035a75fb8c5bb4e99e56006e57b7eb7df8bdd5616d903309ef6fc5b7446de
* - Discussion: https://governance.aave.com/t/arfc-proposal-to-remove-usds-from-susde-liquid-e-mode-in-aave-prime-instance/20264
*/
contract AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224 is
AaveV3PayloadEthereumLido
{
function eModeCategoriesUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.EModeCategoryUpdate[] memory)
{
IAaveV3ConfigEngine.EModeCategoryUpdate[]
memory eModeUpdates = new IAaveV3ConfigEngine.EModeCategoryUpdate[](1);

eModeUpdates[0] = IAaveV3ConfigEngine.EModeCategoryUpdate({
eModeCategory: AaveV3EthereumLidoEModes.SUSDE_STABLECOINS,
ltv: EngineFlags.KEEP_CURRENT,
liqThreshold: EngineFlags.KEEP_CURRENT,
liqBonus: 4_00,
label: EngineFlags.KEEP_CURRENT_STRING
});

return eModeUpdates;
}
function assetsEModeUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.AssetEModeUpdate[] memory)
{
IAaveV3ConfigEngine.AssetEModeUpdate[]
memory assetEModeUpdates = new IAaveV3ConfigEngine.AssetEModeUpdate[](1);

assetEModeUpdates[0] = IAaveV3ConfigEngine.AssetEModeUpdate({
asset: AaveV3EthereumLidoAssets.USDS_UNDERLYING,
eModeCategory: AaveV3EthereumLidoEModes.SUSDE_STABLECOINS,
borrowable: EngineFlags.DISABLED,
collateral: EngineFlags.KEEP_CURRENT
});

return assetEModeUpdates;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// 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_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224} from './AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224.sol';

/**
* @dev Test for AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241224_Multi_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance/AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224.t.sol -vv
*/
contract AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224_Test is
ProtocolV3TestBase
{
AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224
internal proposal;

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

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224',
AaveV3EthereumLido.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 {AaveV3EthereumEModes} 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 Proposal to Remove USDS from sUSDe Liquid E-Mode in Aave Prime Instance
* @author Aave-chan Initiative
* - Snapshot: https://snapshot.box/#/s:aave.eth/proposal/0x2be035a75fb8c5bb4e99e56006e57b7eb7df8bdd5616d903309ef6fc5b7446de
* - Discussion: https://governance.aave.com/t/arfc-proposal-to-remove-usds-from-susde-liquid-e-mode-in-aave-prime-instance/20264
*/
contract AaveV3Ethereum_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224 is
AaveV3PayloadEthereum
{
function eModeCategoriesUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.EModeCategoryUpdate[] memory)
{
IAaveV3ConfigEngine.EModeCategoryUpdate[]
memory eModeUpdates = new IAaveV3ConfigEngine.EModeCategoryUpdate[](1);

eModeUpdates[0] = IAaveV3ConfigEngine.EModeCategoryUpdate({
eModeCategory: AaveV3EthereumEModes.SUSDE_STABLECOINS,
ltv: EngineFlags.KEEP_CURRENT,
liqThreshold: EngineFlags.KEEP_CURRENT,
liqBonus: 4_00,
label: EngineFlags.KEEP_CURRENT_STRING
});

return eModeUpdates;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// 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_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224} from './AaveV3Ethereum_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224.sol';

/**
* @dev Test for AaveV3Ethereum_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241224_Multi_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance/AaveV3Ethereum_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224.t.sol -vv
*/
contract AaveV3Ethereum_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224_Test is
ProtocolV3TestBase
{
AaveV3Ethereum_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224
internal proposal;

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

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Ethereum_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224',
AaveV3Ethereum.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "Proposal to Remove USDS from sUSDe Liquid E-Mode in Aave Prime Instance"
author: "Aave-chan Initiative"
discussions: "https://governance.aave.com/t/arfc-proposal-to-remove-usds-from-susde-liquid-e-mode-in-aave-prime-instance/20264"
snapshot: "https://snapshot.box/#/s:aave.eth/proposal/0x2be035a75fb8c5bb4e99e56006e57b7eb7df8bdd5616d903309ef6fc5b7446de"
---

## Simple Summary

This proposal recommends the removal of USDS from the sUSDe Liquid E-Mode in the Aave Prime instance.

## Motivation

The sUSDe Liquid E-Mode was introduced to enhance capital efficiency for users by allowing higher loan-to-value (LTV) ratios when using sUSDe as collateral to borrow stablecoins like USDS. See [this proposal](https://governance.aave.com/t/arfc-onboard-and-enable-susde-liquid-e-mode-on-aave-v3-mainnet-and-lido-instance/19703) for more context.

However, recent market observations have indicated increased borrow rates and potential liquidity mismatches involving USDS within this E-Mode. To address these concerns, this proposal suggests temporarily removing USDS from the sUSDe Liquid E-Mode in the Aave Prime instance.

The primary motivations for this proposal are:

1. **Risk Mitigation:** The inclusion of USDS in the sUSDe Liquid E-Mode has led to elevated borrow rates and potential liquidity mismatches.
2. **Collateral Isolation:** Until a wrapper is available to isolate USDS collateral in the Prime instance, USDS remains the primary exposure. Removing it from the sUSDe Liquid E-Mode will help manage associated risks more effectively.
3. **User Impact:** This change will not negatively impact existing user positions but will prevent the establishment of new ones involving USDS in the sUSDe Liquid E-Mode, thereby safeguarding current users while mitigating potential future risks.

## Specification

The proposed changes are as follows:

- **Asset Removal:** Exclude USDS from the sUSDe Liquid E-Mode in the Aave Prime instance.
- **Parameter Adjustments:** Update the E-Mode configuration to reflect the removal of USDS, ensuring alignment with the protocol’s risk management framework.
- **Liquidation buffer improvement:**
echoing concerns from @LlamaRisk and other service providers, sUSDe emode on both Prime & Core instances are set to increase their buffer for liquidations.
- Increase Liquidation Bonus from 3 to 4% on e-modes on Core and Prime instances.

Current ARFC will be reviewed by Risk Service Providers and their feedback will be included in the current ARFC.

## References

- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241224_Multi_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance/AaveV3Ethereum_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224.sol), [AaveV3EthereumLido](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241224_Multi_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance/AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224.sol)
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241224_Multi_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance/AaveV3Ethereum_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224.t.sol), [AaveV3EthereumLido](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241224_Multi_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance/AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224.t.sol)
- [Snapshot](https://snapshot.box/#/s:aave.eth/proposal/0x2be035a75fb8c5bb4e99e56006e57b7eb7df8bdd5616d903309ef6fc5b7446de)
- [Discussion](https://governance.aave.com/t/arfc-proposal-to-remove-usds-from-susde-liquid-e-mode-in-aave-prime-instance/20264)

## 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,72 @@
// 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_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224} from './AaveV3Ethereum_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224.sol';
import {AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224} from './AaveV3EthereumLido_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance_20241224.sol';

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

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL,
GovV3Helpers.ipfsHashFile(
vm,
'src/20241224_Multi_ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance/ProposalToRemoveUSDSFromSUSDeLiquidEModeInAavePrimeInstance.md'
)
);
}
}
Loading
Loading