diff --git a/diffs/AaveV3Arbitrum_ARBRemoveIsolation_20240315_before_AaveV3Arbitrum_ARBRemoveIsolation_20240315_after.md b/diffs/AaveV3Arbitrum_ARBRemoveIsolation_20240315_before_AaveV3Arbitrum_ARBRemoveIsolation_20240315_after.md new file mode 100644 index 000000000..1b5e79571 --- /dev/null +++ b/diffs/AaveV3Arbitrum_ARBRemoveIsolation_20240315_before_AaveV3Arbitrum_ARBRemoveIsolation_20240315_after.md @@ -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 + } + } + } +} +``` \ No newline at end of file diff --git a/src/20240312_Multi_StablecoinHarmonization/AaveV3Arbitrum_StablecoinHarmonization_20240312.sol b/src/20240312_Multi_StablecoinHarmonization/AaveV3Arbitrum_StablecoinHarmonization_20240312.sol index 189a6dfa3..a43de5707 100644 --- a/src/20240312_Multi_StablecoinHarmonization/AaveV3Arbitrum_StablecoinHarmonization_20240312.sol +++ b/src/20240312_Multi_StablecoinHarmonization/AaveV3Arbitrum_StablecoinHarmonization_20240312.sol @@ -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 @@ -44,6 +45,7 @@ contract AaveV3Arbitrum_StablecoinHarmonization_20240312 is AaveV3PayloadArbitru return collateralUpdate; } + function borrowsUpdates() public pure diff --git a/src/20240312_Multi_StablecoinHarmonization/AaveV3Avalanche_StablecoinHarmonization_20240312.sol b/src/20240312_Multi_StablecoinHarmonization/AaveV3Avalanche_StablecoinHarmonization_20240312.sol index 823a5ced0..75a9c5585 100644 --- a/src/20240312_Multi_StablecoinHarmonization/AaveV3Avalanche_StablecoinHarmonization_20240312.sol +++ b/src/20240312_Multi_StablecoinHarmonization/AaveV3Avalanche_StablecoinHarmonization_20240312.sol @@ -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 @@ -40,6 +41,7 @@ contract AaveV3Avalanche_StablecoinHarmonization_20240312 is AaveV3PayloadAvalan return collateralUpdate; } + function borrowsUpdates() public pure diff --git a/src/20240312_Multi_StablecoinHarmonization/AaveV3Ethereum_StablecoinHarmonization_20240312.sol b/src/20240312_Multi_StablecoinHarmonization/AaveV3Ethereum_StablecoinHarmonization_20240312.sol index 6634e0865..7423052c4 100644 --- a/src/20240312_Multi_StablecoinHarmonization/AaveV3Ethereum_StablecoinHarmonization_20240312.sol +++ b/src/20240312_Multi_StablecoinHarmonization/AaveV3Ethereum_StablecoinHarmonization_20240312.sol @@ -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 @@ -86,6 +87,7 @@ contract AaveV3Ethereum_StablecoinHarmonization_20240312 is AaveV3PayloadEthereu return collateralUpdate; } + function borrowsUpdates() public pure diff --git a/src/20240312_Multi_StablecoinHarmonization/AaveV3Gnosis_StablecoinHarmonization_20240312.sol b/src/20240312_Multi_StablecoinHarmonization/AaveV3Gnosis_StablecoinHarmonization_20240312.sol index bdcb76e3b..2398d6ec8 100644 --- a/src/20240312_Multi_StablecoinHarmonization/AaveV3Gnosis_StablecoinHarmonization_20240312.sol +++ b/src/20240312_Multi_StablecoinHarmonization/AaveV3Gnosis_StablecoinHarmonization_20240312.sol @@ -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 diff --git a/src/20240312_Multi_StablecoinHarmonization/AaveV3Metis_StablecoinHarmonization_20240312.sol b/src/20240312_Multi_StablecoinHarmonization/AaveV3Metis_StablecoinHarmonization_20240312.sol index 3ed188b11..b64dbe1f5 100644 --- a/src/20240312_Multi_StablecoinHarmonization/AaveV3Metis_StablecoinHarmonization_20240312.sol +++ b/src/20240312_Multi_StablecoinHarmonization/AaveV3Metis_StablecoinHarmonization_20240312.sol @@ -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 diff --git a/src/20240312_Multi_StablecoinHarmonization/AaveV3Optimism_StablecoinHarmonization_20240312.sol b/src/20240312_Multi_StablecoinHarmonization/AaveV3Optimism_StablecoinHarmonization_20240312.sol index b95beab44..275a63fa3 100644 --- a/src/20240312_Multi_StablecoinHarmonization/AaveV3Optimism_StablecoinHarmonization_20240312.sol +++ b/src/20240312_Multi_StablecoinHarmonization/AaveV3Optimism_StablecoinHarmonization_20240312.sol @@ -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 diff --git a/src/20240312_Multi_StablecoinHarmonization/AaveV3Polygon_StablecoinHarmonization_20240312.sol b/src/20240312_Multi_StablecoinHarmonization/AaveV3Polygon_StablecoinHarmonization_20240312.sol index 41a8f3e72..88e1b218a 100644 --- a/src/20240312_Multi_StablecoinHarmonization/AaveV3Polygon_StablecoinHarmonization_20240312.sol +++ b/src/20240312_Multi_StablecoinHarmonization/AaveV3Polygon_StablecoinHarmonization_20240312.sol @@ -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 @@ -36,6 +37,7 @@ contract AaveV3Polygon_StablecoinHarmonization_20240312 is AaveV3PayloadPolygon return collateralUpdate; } + function borrowsUpdates() public pure diff --git a/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/ARBRemoveIsolation.md b/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/ARBRemoveIsolation.md new file mode 100644 index 000000000..60a718615 --- /dev/null +++ b/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/ARBRemoveIsolation.md @@ -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: + +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/). diff --git a/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.s.sol b/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.s.sol new file mode 100644 index 000000000..9e204e556 --- /dev/null +++ b/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.s.sol @@ -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' + ) + ); + } +} diff --git a/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.sol b/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.sol new file mode 100644 index 000000000..a7cb622ba --- /dev/null +++ b/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.sol @@ -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); + } +} diff --git a/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.t.sol b/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.t.sol new file mode 100644 index 000000000..c5a5b2ed3 --- /dev/null +++ b/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.t.sol @@ -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'); + } +} diff --git a/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/config.ts b/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/config.ts new file mode 100644 index 000000000..9b2082d62 --- /dev/null +++ b/src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/config.ts @@ -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}}}, +};