Skip to content

Commit

Permalink
Borrow Caps Reductions V3 Ethereum 20240311
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalovadya committed Mar 24, 2024
1 parent 2a22410 commit 639b2a6
Show file tree
Hide file tree
Showing 7 changed files with 441 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
## Reserve changes

### Reserve altered

#### 1INCH ([0x111111111117dC0aa78b770fA6A738034120C302](https://etherscan.io/address/0x111111111117dC0aa78b770fA6A738034120C302))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 720,000 1INCH | 475,200 1INCH |


#### UNI ([0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984](https://etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 500,000 UNI | 330,000 UNI |


#### FXS ([0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0](https://etherscan.io/address/0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 500,000 FXS | 330,000 FXS |


#### LDO ([0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32](https://etherscan.io/address/0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 3,000,000 LDO | 1,500,000 LDO |


#### MKR ([0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2](https://etherscan.io/address/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 3,000 MKR | 1,980 MKR |


#### STG ([0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6](https://etherscan.io/address/0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 5,500,000 STG | 3,200,000 STG |


#### SNX ([0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F](https://etherscan.io/address/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 1,100,000 SNX | 150,000 SNX |


#### RPL ([0xD33526068D116cE69F19A9ee46F0bd304F21A51f](https://etherscan.io/address/0xD33526068D116cE69F19A9ee46F0bd304F21A51f))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 480,000 RPL | 316,800 RPL |


#### CRV ([0xD533a949740bb3306d119CC777fa900bA034cd52](https://etherscan.io/address/0xD533a949740bb3306d119CC777fa900bA034cd52))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 5,000,000 CRV | 2,750,000 CRV |


#### BAL ([0xba100000625a3754423978a60c9317c58a424e3D](https://etherscan.io/address/0xba100000625a3754423978a60c9317c58a424e3D))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 370,000 BAL | 244,200 BAL |


#### KNC ([0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202](https://etherscan.io/address/0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202))

| description | value before | value after |
| --- | --- | --- |
| borrowCap | 650,000 KNC | 350,000 KNC |


## Raw diff

```json
{
"reserves": {
"0x111111111117dC0aa78b770fA6A738034120C302": {
"borrowCap": {
"from": 720000,
"to": 475200
}
},
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984": {
"borrowCap": {
"from": 500000,
"to": 330000
}
},
"0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0": {
"borrowCap": {
"from": 500000,
"to": 330000
}
},
"0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32": {
"borrowCap": {
"from": 3000000,
"to": 1500000
}
},
"0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2": {
"borrowCap": {
"from": 3000,
"to": 1980
}
},
"0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6": {
"borrowCap": {
"from": 5500000,
"to": 3200000
}
},
"0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F": {
"borrowCap": {
"from": 1100000,
"to": 150000
}
},
"0xD33526068D116cE69F19A9ee46F0bd304F21A51f": {
"borrowCap": {
"from": 480000,
"to": 316800
}
},
"0xD533a949740bb3306d119CC777fa900bA034cd52": {
"borrowCap": {
"from": 5000000,
"to": 2750000
}
},
"0xba100000625a3754423978a60c9317c58a424e3D": {
"borrowCap": {
"from": 370000,
"to": 244200
}
},
"0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202": {
"borrowCap": {
"from": 650000,
"to": 350000
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// 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-helpers/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';

/**
* @title Borrow Cap Reductions on Aave V3 Ethereum
* @author Chaos Labs
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x9fb23244675bb07e1b5406fa4276aeeb712a80026721e2321ce41bd0e612de73
* - Discussion: https://governance.aave.com/t/arfc-chaos-labs-borrow-cap-reductions-on-aave-ethereum-03-11-24/16918
*/
contract AaveV3Ethereum_BorrowCapReductionsOnAaveV3Ethereum_20240311 is AaveV3PayloadEthereum {
function capsUpdates() public pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) {
IAaveV3ConfigEngine.CapsUpdate[] memory capsUpdate = new IAaveV3ConfigEngine.CapsUpdate[](11);

capsUpdate[0] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.CRV_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 2_750_000
});
capsUpdate[1] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.MKR_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 1_980
});
capsUpdate[2] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.SNX_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 150_000
});
capsUpdate[3] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.BAL_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 244_200
});
capsUpdate[4] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.UNI_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 330_000
});
capsUpdate[5] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.LDO_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 1_500_000
});
capsUpdate[6] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.ONE_INCH_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 475_200
});
capsUpdate[7] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.RPL_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 316_800
});
capsUpdate[8] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.STG_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 3_200_000
});
capsUpdate[9] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.KNC_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 350_000
});
capsUpdate[10] = IAaveV3ConfigEngine.CapsUpdate({
asset: AaveV3EthereumAssets.FXS_UNDERLYING,
supplyCap: EngineFlags.KEEP_CURRENT,
borrowCap: 330_000
});

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

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

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

/**
* @dev Test for AaveV3Ethereum_BorrowCapReductionsOnAaveV3Ethereum_20240311
* command: make test-contract filter=AaveV3Ethereum_BorrowCapReductionsOnAaveV3Ethereum_20240311
*/
contract AaveV3Ethereum_BorrowCapReductionsOnAaveV3Ethereum_20240311_Test is ProtocolV3TestBase {
struct Change {
address asset;
uint256 borrowCap;
}

AaveV3Ethereum_BorrowCapReductionsOnAaveV3Ethereum_20240311 internal proposal;

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

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
(ReserveConfig[] memory allConfigsBefore, ReserveConfig[] memory allConfigsAfter) = defaultTest(
'AaveV3Ethereum_BorrowCapReductionsOnAaveV3Ethereum_20240311',
AaveV3Ethereum.POOL,
address(proposal)
);

address[] memory assetsChanged = new address[](11);
assetsChanged[0] = AaveV3EthereumAssets.MKR_UNDERLYING;
assetsChanged[1] = AaveV3EthereumAssets.LDO_UNDERLYING;
assetsChanged[2] = AaveV3EthereumAssets.UNI_UNDERLYING;
assetsChanged[3] = AaveV3EthereumAssets.RPL_UNDERLYING;
assetsChanged[4] = AaveV3EthereumAssets.SNX_UNDERLYING;
assetsChanged[5] = AaveV3EthereumAssets.FXS_UNDERLYING;
assetsChanged[6] = AaveV3EthereumAssets.CRV_UNDERLYING;
assetsChanged[7] = AaveV3EthereumAssets.STG_UNDERLYING;
assetsChanged[8] = AaveV3EthereumAssets.KNC_UNDERLYING;
assetsChanged[9] = AaveV3EthereumAssets.ONE_INCH_UNDERLYING;
assetsChanged[10] = AaveV3EthereumAssets.BAL_UNDERLYING;

_noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged);

Change[] memory assetsChanges = new Change[](11);

assetsChanges[0] = Change({asset: AaveV3EthereumAssets.MKR_UNDERLYING, borrowCap: 1_980});
assetsChanges[1] = Change({asset: AaveV3EthereumAssets.LDO_UNDERLYING, borrowCap: 1_500_000});
assetsChanges[2] = Change({asset: AaveV3EthereumAssets.UNI_UNDERLYING, borrowCap: 330_000});
assetsChanges[3] = Change({asset: AaveV3EthereumAssets.RPL_UNDERLYING, borrowCap: 316_800});
assetsChanges[4] = Change({asset: AaveV3EthereumAssets.SNX_UNDERLYING, borrowCap: 150_000});
assetsChanges[5] = Change({asset: AaveV3EthereumAssets.FXS_UNDERLYING, borrowCap: 330_000});
assetsChanges[6] = Change({asset: AaveV3EthereumAssets.CRV_UNDERLYING, borrowCap: 2_750_000});
assetsChanges[7] = Change({asset: AaveV3EthereumAssets.STG_UNDERLYING, borrowCap: 3_200_000});
assetsChanges[8] = Change({asset: AaveV3EthereumAssets.KNC_UNDERLYING, borrowCap: 350_000});
assetsChanges[9] = Change({
asset: AaveV3EthereumAssets.ONE_INCH_UNDERLYING,
borrowCap: 475_200
});
assetsChanges[10] = Change({asset: AaveV3EthereumAssets.BAL_UNDERLYING, borrowCap: 244_200});

for (uint i = 0; i < assetsChanges.length; i++) {
ReserveConfig memory config = _findReserveConfig(allConfigsAfter, assetsChanges[i].asset);
assertEq(config.borrowCap, assetsChanges[i].borrowCap);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "Borrow Cap Reductions on Aave V3 Ethereum"
author: "Chaos Labs"
discussions: "https://governance.aave.com/t/arfc-chaos-labs-borrow-cap-reductions-on-aave-ethereum-03-11-24/16918"
snapshot: "https://snapshot.org/#/aave.eth/proposal/0x9fb23244675bb07e1b5406fa4276aeeb712a80026721e2321ce41bd0e612de73"
---

## Simple Summary

Reduce Borrow Caps for long-tailed assets on Aave V3 Ethereum

## Motivation

As part of our ongoing 2 strategy to minimize theoretical exposure to long-tailed debt on Aave, this proposal aims to mitigate the impact of volatility in debt assets further by implementing a substantial reduction in Borrow Cap values. Borrowing these assets typically yields minimal revenue but can pose significant risks, particularly in scenarios where liquidating these positions necessitates obtaining the underlying asset during a large pump. Given the recent upward volatility in asset prices, we propose a refined methodology for determining and implementing these Borrow Cap reductions. This approach aims to enhance the protocol’s resilience and stability amidst dynamic market conditions, safeguarding the interests of Aave users and stakeholders.

## Specification

| Asset | Current Borrow Cap | Recommended Borrow Cap |
| ----- | ------------------ | ---------------------- |
| MKR | 3k | 1.98k |
| LDO | 3m | 1.5m |
| UNI | 500k | 330k |
| RPL | 480k | 316.8k |
| SNX | 1.1m | 150k |
| FXS | 500k | 330k |
| CRV | 5m | 2.75m |
| STG | 5.5m | 3.2m |
| KNC | 650k | 350k |
| 1INCH | 720k | 475.2k |
| BAL | 370k | 244.2k |

## References

- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240311_AaveV3Ethereum_BorrowCapReductionsOnAaveV3Ethereum/AaveV3Ethereum_BorrowCapReductionsOnAaveV3Ethereum_20240311.sol)
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240311_AaveV3Ethereum_BorrowCapReductionsOnAaveV3Ethereum/AaveV3Ethereum_BorrowCapReductionsOnAaveV3Ethereum_20240311.t.sol)
- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0x9fb23244675bb07e1b5406fa4276aeeb712a80026721e2321ce41bd0e612de73)
- [Discussion](https://governance.aave.com/t/arfc-chaos-labs-borrow-cap-reductions-on-aave-ethereum-03-11-24/16918)

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Loading

0 comments on commit 639b2a6

Please sign in to comment.