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 arb isolation #256

Merged
merged 20 commits into from
Mar 25, 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,25 @@
## Reserve changes

### Reserves altered

#### ARB ([0x912CE59144191C1204E64559FE8253a0e49E6548](https://arbiscan.io/address/0x912CE59144191C1204E64559FE8253a0e49E6548))

| description | value before | value after |
| --- | --- | --- |
| debtCeiling | 14,000,000 $ | 0 $ |


## Raw diff

```json
{
"reserves": {
"0x912CE59144191C1204E64559FE8253a0e49E6548": {
"debtCeiling": {
"from": 1400000000,
"to": 0
}
}
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbi
import {AaveV3PayloadArbitrum} from 'aave-helpers/v3-config-engine/AaveV3PayloadArbitrum.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';

/**
* @title stablecoin harmonization
* @author Aave Chan Initiative
Expand Down Expand Up @@ -44,6 +45,7 @@ contract AaveV3Arbitrum_StablecoinHarmonization_20240312 is AaveV3PayloadArbitru

return collateralUpdate;
}

function borrowsUpdates()
public
pure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {AaveV3AvalancheAssets} from 'aave-address-book/AaveV3Avalanche.sol';
import {AaveV3PayloadAvalanche} from 'aave-helpers/v3-config-engine/AaveV3PayloadAvalanche.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';

/**
* @title stablecoin harmonization
* @author Aave Chan Initiative
Expand Down Expand Up @@ -40,6 +41,7 @@ contract AaveV3Avalanche_StablecoinHarmonization_20240312 is AaveV3PayloadAvalan

return collateralUpdate;
}

function borrowsUpdates()
public
pure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethe
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 stablecoin harmonization
* @author Aave Chan Initiative
Expand Down Expand Up @@ -86,6 +87,7 @@ contract AaveV3Ethereum_StablecoinHarmonization_20240312 is AaveV3PayloadEthereu

return collateralUpdate;
}

function borrowsUpdates()
public
pure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol';
import {AaveV3PayloadGnosis} from 'aave-helpers/v3-config-engine/AaveV3PayloadGnosis.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';

/**
* @title stablecoin harmonization
* @author Aave Chan Initiative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {AaveV3MetisAssets} from 'aave-address-book/AaveV3Metis.sol';
import {AaveV3PayloadMetis} from 'aave-helpers/v3-config-engine/AaveV3PayloadMetis.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';

/**
* @title stablecoin harmonization
* @author Aave Chan Initiative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {AaveV3OptimismAssets} from 'aave-address-book/AaveV3Optimism.sol';
import {AaveV3PayloadOptimism} from 'aave-helpers/v3-config-engine/AaveV3PayloadOptimism.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';

/**
* @title stablecoin harmonization
* @author Aave Chan Initiative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {AaveV3Polygon, AaveV3PolygonAssets} from 'aave-address-book/AaveV3Polygo
import {AaveV3PayloadPolygon} from 'aave-helpers/v3-config-engine/AaveV3PayloadPolygon.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';

/**
* @title stablecoin harmonization
* @author Aave Chan Initiative
Expand Down Expand Up @@ -36,6 +37,7 @@ contract AaveV3Polygon_StablecoinHarmonization_20240312 is AaveV3PayloadPolygon

return collateralUpdate;
}

function borrowsUpdates()
public
pure
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: "Remove ARB from Isolation Mode on Arbitrum"
author: "karpatkey_TokenLogic_ACI"
discussions: "https://governance.aave.com/t/arfc-remove-arb-from-isolation-mode-on-arbitrum-market/16703"
snapshot: "https://snapshot.org/#/aave.eth/proposal/0xbc5471496bbc2beda343625cee22c34fc9672785112cc5d19a25ca87c5b422c3"
---

## Summary

This publication proposes disabling Isolation Mode for ARB on Aave v3 Arbitrum.

## Motivation

Since the ARB airdrop, April 2023, the Arbitrum ecosystem has experienced exponential like growth and the ARB liquidity has improved significantly.

With the support of the Risk Service providers, this proposal is to disable Isolation Mode and enable ARB to be used in combination with other assets as collateral.

## Specification:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Specification is completely arbitrary, not saying anything of what the proposal does

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True.
I suppose that's a flaw in the initial proposal itself.

This has already been voted on though, should we change it only here or also in the forum?


Ticker: ARB
Contract Address: [0x912CE59144191C1204E64559FE8253a0e49E6548](https://arbiscan.io/address/0x912CE59144191C1204E64559FE8253a0e49E6548)

The following parameters are to be updated as follows in Arbitrum market:

| Asset | Debt Ceiling |
| ----- | ------------ |
| ARB | 0 |

The executor will call the ArbitrumV3 configurator and use the "setDebtCeiling" method.

## Disclaimer:

TokenLogic and karpatkey receive no payment for this proposal. TokenLogic and karpatkey are both delegates within the Aave community.

## References

- Implementation: [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315)
- Tests: [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.sol)
- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0xbc5471496bbc2beda343625cee22c34fc9672785112cc5d19a25ca87c5b422c3)
- [Discussion](https://governance.aave.com/t/arfc-remove-arb-from-isolation-mode-on-arbitrum-market/16703)

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

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol';
import {ArbitrumScript, EthereumScript} from 'aave-helpers/ScriptUtils.sol';
import {AaveV3Arbitrum_ARBRemoveIsolation_20240315} from './AaveV3Arbitrum_ARBRemoveIsolation_20240315.sol';

/**
* @dev Deploy Arbitrum
* deploy-command: make deploy-ledger contract=src/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.s.sol:DeployArbitrum chain=arbitrum
* verify-command: npx catapulta-verify -b broadcast/AaveV3Arbitrum_ARBRemoveIsolation_20240315.s.sol/1/run-latest.json
*/
contract DeployArbitrum is ArbitrumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3Arbitrum_ARBRemoveIsolation_20240315).creationCode
);

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

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

/**
* @dev Create Proposal
* command: make deploy-ledger contract=src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.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 actionsArbitrum = new IPayloadsControllerCore.ExecutionAction[](1);
actionsArbitrum[0] = GovV3Helpers.buildAction(
type(AaveV3Arbitrum_ARBRemoveIsolation_20240315).creationCode
);
payloads[0] = GovV3Helpers.buildArbitrumPayload(vm, actionsArbitrum);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovV3Helpers.ipfsHashFile(
vm,
'src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/ARBRemoveIsolation.md'
)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol';
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol';

/**
* @title ARB Remove Isolation Mode
* @author karpatkey_TokenLogic_ACI
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0xbc5471496bbc2beda343625cee22c34fc9672785112cc5d19a25ca87c5b422c3
* - Discussion: https://governance.aave.com/t/arfc-remove-arb-from-isolation-mode-on-arbitrum-market/16703
*/
contract AaveV3Arbitrum_ARBRemoveIsolation_20240315 is IProposalGenericExecutor {
function execute() external {
// set debtCeiling to 0 exits isolation Mode
AaveV3Arbitrum.POOL_CONFIGURATOR.setDebtCeiling(AaveV3ArbitrumAssets.ARB_UNDERLYING, 0);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {AaveV3Arbitrum} from 'aave-address-book/AaveV3Arbitrum.sol';
import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol';
import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol';
import {ProtocolV3TestBase} from 'aave-helpers/ProtocolV3TestBase.sol';
import {DataTypes} from 'aave-v3-core/contracts/protocol/libraries/types/DataTypes.sol';
import {AaveV3Arbitrum_ARBRemoveIsolation_20240315} from './AaveV3Arbitrum_ARBRemoveIsolation_20240315.sol';

/**
* @dev Test for AaveV3Arbitrum_ARBRemoveIsolation_20240315
* command: make test-contract filter=AaveV3Arbitrum_ARBRemoveIsolation_20240315
*/
contract AaveV3Arbitrum_ARBRemoveIsolation_20240315_Test is ProtocolV3TestBase {
AaveV3Arbitrum_ARBRemoveIsolation_20240315 internal proposal;

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

function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Arbitrum_ARBRemoveIsolation_20240315',
AaveV3Arbitrum.POOL,
address(proposal)
);
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_removalFromIsolation() public {
uint iCeiling = AaveV3Arbitrum.AAVE_PROTOCOL_DATA_PROVIDER.getDebtCeiling(
AaveV3ArbitrumAssets.ARB_UNDERLYING
);
DataTypes.ReserveData memory iData = AaveV3Arbitrum.POOL.getReserveData(
AaveV3ArbitrumAssets.ARB_UNDERLYING
);

assertGt(iCeiling, 0, 'Ceiling already at 0');
assertGt(iData.isolationModeTotalDebt, 0, 'IsolationMode total Debt not 0');

executePayload(vm, address(proposal));

uint pCeiling = AaveV3Arbitrum.AAVE_PROTOCOL_DATA_PROVIDER.getDebtCeiling(
AaveV3ArbitrumAssets.ARB_UNDERLYING
);
DataTypes.ReserveData memory pData = AaveV3Arbitrum.POOL.getReserveData(
AaveV3ArbitrumAssets.ARB_UNDERLYING
);

assertEq(pCeiling, 0, 'Ceiling not updated to 0');
assertEq(pData.isolationModeTotalDebt, 0, 'IsolationMode total Debt not 0');
}
}
15 changes: 15 additions & 0 deletions src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {ConfigFile} from '../../generator/types';
export const config: ConfigFile = {
rootOptions: {
pools: ['AaveV3Arbitrum'],
title: 'Remove ARB from Isolation Mode on Arbitrum',
shortName: 'ARBRemoveIsolation',
date: '20240315',
author: 'karpatkey_TokenLogic_ACI',
discussion:
'https://governance.aave.com/t/arfc-remove-arb-from-isolation-mode-on-arbitrum-market/16703',
snapshot:
'https://snapshot.org/#/aave.eth/proposal/0xbc5471496bbc2beda343625cee22c34fc9672785112cc5d19a25ca87c5b422c3',
},
poolOptions: {AaveV3Arbitrum: {configs: {OTHERS: {}}, cache: {blockNumber: 191404560}}},
};