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 Frax of Isolation Mode - Draft #471

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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,59 @@
## Reserve changes

### Reserves altered

#### FRAX ([0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F](https://arbiscan.io/address/0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F))

| description | value before | value after |
| --- | --- | --- |
| debtCeiling | 1,000,000 $ [100000000] | 0 $ [0] |
| ltv | 0 % [0] | 75 % [7500] |
| liquidationThreshold | 72 % [7200] | 78 % [7800] |
| liquidationBonus | 6 % | 5 % |
| reserveFactor | 20 % [2000] | 15 % [1500] |
| maxVariableBorrowRate | 80.5 % | 65.5 % |
| variableRateSlope2 | 75 % | 60 % |
| interestRate | ![before](/.assets/a6c0aceaa49e1b7b29b7ac5bfdef770548c468d6.svg) | ![after](/.assets/d7c18f984b71e5f66cebf23ccf14dfe374c5aea5.svg) |

## Raw diff

```json
{
"reserves": {
"0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F": {
"debtCeiling": {
"from": 100000000,
"to": 0
},
"liquidationBonus": {
"from": 10600,
"to": 10500
},
"liquidationThreshold": {
"from": 7200,
"to": 7800
},
"ltv": {
"from": 0,
"to": 7500
},
"reserveFactor": {
"from": 2000,
"to": 1500
}
}
},
"strategies": {
"0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F": {
"maxVariableBorrowRate": {
"from": "805000000000000000000000000",
"to": "655000000000000000000000000"
},
"variableRateSlope2": {
"from": "750000000000000000000000000",
"to": "600000000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## Reserve changes

### Reserves altered

#### FRAX ([0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64](https://snowtrace.io/address/0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64))

| description | value before | value after |
| --- | --- | --- |
| debtCeiling | 1,000,000 $ [100000000] | 0 $ [0] |
| ltv | 0 % [0] | 75 % [7500] |
| liquidationThreshold | 77 % [7700] | 81 % [8100] |
| liquidationBonus | 5 % | 4 % |
| reserveFactor | 20 % [2000] | 15 % [1500] |
| maxVariableBorrowRate | 80.5 % | 65.5 % |
| variableRateSlope2 | 75 % | 60 % |
| interestRate | ![before](/.assets/8501d8a163c1631c522dfa4e690ece4f705e1e75.svg) | ![after](/.assets/c460bdc5514185b4dbe953a444830fa62df1e05b.svg) |

## Raw diff

```json
{
"reserves": {
"0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64": {
"debtCeiling": {
"from": 100000000,
"to": 0
},
"liquidationBonus": {
"from": 10500,
"to": 10400
},
"liquidationThreshold": {
"from": 7700,
"to": 8100
},
"ltv": {
"from": 0,
"to": 7500
},
"reserveFactor": {
"from": 2000,
"to": 1500
}
}
},
"strategies": {
"0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64": {
"maxVariableBorrowRate": {
"from": "805000000000000000000000000",
"to": "655000000000000000000000000"
},
"variableRateSlope2": {
"from": "750000000000000000000000000",
"to": "600000000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
## Reserve changes

### Reserves altered

#### FRAX ([0x853d955aCEf822Db058eb8505911ED77F175b99e](https://etherscan.io/address/0x853d955aCEf822Db058eb8505911ED77F175b99e))

| description | value before | value after |
| --- | --- | --- |
| debtCeiling | 10,000,000 $ [1000000000] | 0 $ [0] |
| ltv | 0 % [0] | 75 % [7500] |
| liquidationThreshold | 72 % [7200] | 78 % [7800] |
| liquidationBonus | 6 % | 4.5 % |
| liquidationProtocolFee | 10 % [1000] | 20 % [2000] |
| reserveFactor | 20 % [2000] | 15 % [1500] |
| optimalUsageRatio | 90 % | 92 % |
| maxVariableBorrowRate | 80.5 % | 65.5 % |
| variableRateSlope2 | 75 % | 60 % |
| interestRate | ![before](/.assets/a05225d2527d0291dbe4574aa3ce9f1f7d877630.svg) | ![after](/.assets/b0acfa5411927b1e11f45e03da6fe62446569b2d.svg) |

## Raw diff

```json
{
"reserves": {
"0x853d955aCEf822Db058eb8505911ED77F175b99e": {
"debtCeiling": {
"from": 1000000000,
"to": 0
},
"liquidationBonus": {
"from": 10600,
"to": 10450
},
"liquidationProtocolFee": {
"from": 1000,
"to": 2000
},
"liquidationThreshold": {
"from": 7200,
"to": 7800
},
"ltv": {
"from": 0,
"to": 7500
},
"reserveFactor": {
"from": 2000,
"to": 1500
}
}
},
"strategies": {
"0x853d955aCEf822Db058eb8505911ED77F175b99e": {
"maxVariableBorrowRate": {
"from": "805000000000000000000000000",
"to": "655000000000000000000000000"
},
"optimalUsageRatio": {
"from": "900000000000000000000000000",
"to": "920000000000000000000000000"
},
"variableRateSlope2": {
"from": "750000000000000000000000000",
"to": "600000000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol';
import {AaveV3PayloadArbitrum} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadArbitrum.sol';
import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol';
/**
* @title Remove Frax from Isolation Mode
* @author Aave Chan Initiative
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x89f056f633646ee0676e226da41e2c6a7df756a7087204a96db8c3d74427244a
* - Discussion: https://governance.aave.com/t/arfc-remove-frax-from-isolation-mode-and-onboard-sfrax-to-aave-v3-mainnet/18506
*/
contract AaveV3Arbitrum_RemoveFraxFromIsolationMode_20240926 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.FRAX_UNDERLYING,
params: IAaveV3ConfigEngine.InterestRateInputData({
optimalUsageRatio: EngineFlags.KEEP_CURRENT,
baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
variableRateSlope1: EngineFlags.KEEP_CURRENT,
variableRateSlope2: 60_00
})
});

return rateStrategies;
}
function collateralsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.CollateralUpdate[] memory)
{
IAaveV3ConfigEngine.CollateralUpdate[]
memory collateralUpdate = new IAaveV3ConfigEngine.CollateralUpdate[](1);

collateralUpdate[0] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3ArbitrumAssets.FRAX_UNDERLYING,
ltv: 75_00,
liqThreshold: 78_00,
liqBonus: 5_00,
debtCeiling: 0,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});

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

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

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

/**
* @dev Test for AaveV3Arbitrum_RemoveFraxFromIsolationMode_20240926
* command: FOUNDRY_PROFILE=arbitrum forge test --match-path=src/20240926_Multi_RemoveFraxFromIsolationMode/AaveV3Arbitrum_RemoveFraxFromIsolationMode_20240926.t.sol -vv
*/
contract AaveV3Arbitrum_RemoveFraxFromIsolationMode_20240926_Test is ProtocolV3TestBase {
AaveV3Arbitrum_RemoveFraxFromIsolationMode_20240926 internal proposal;

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

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

import {AaveV3AvalancheAssets} from 'aave-address-book/AaveV3Avalanche.sol';
import {AaveV3PayloadAvalanche} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadAvalanche.sol';
import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol';
/**
* @title Remove Frax from Isolation Mode
* @author Aave Chan Initiative
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x89f056f633646ee0676e226da41e2c6a7df756a7087204a96db8c3d74427244a
* - Discussion: https://governance.aave.com/t/arfc-remove-frax-from-isolation-mode-and-onboard-sfrax-to-aave-v3-mainnet/18506
*/
contract AaveV3Avalanche_RemoveFraxFromIsolationMode_20240926 is AaveV3PayloadAvalanche {
function rateStrategiesUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.RateStrategyUpdate[] memory)
{
IAaveV3ConfigEngine.RateStrategyUpdate[]
memory rateStrategies = new IAaveV3ConfigEngine.RateStrategyUpdate[](1);
rateStrategies[0] = IAaveV3ConfigEngine.RateStrategyUpdate({
asset: AaveV3AvalancheAssets.FRAX_UNDERLYING,
params: IAaveV3ConfigEngine.InterestRateInputData({
optimalUsageRatio: EngineFlags.KEEP_CURRENT,
baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
variableRateSlope1: EngineFlags.KEEP_CURRENT,
variableRateSlope2: 60_00
})
});

return rateStrategies;
}
function collateralsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.CollateralUpdate[] memory)
{
IAaveV3ConfigEngine.CollateralUpdate[]
memory collateralUpdate = new IAaveV3ConfigEngine.CollateralUpdate[](1);

collateralUpdate[0] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3AvalancheAssets.FRAX_UNDERLYING,
ltv: 75_00,
liqThreshold: 81_00,
liqBonus: 4_00,
debtCeiling: 0,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});

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

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

return borrowUpdates;
}
}
Loading