generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
380aaa8
commit c5a7669
Showing
13 changed files
with
230 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...veIsolation_20240315_before_AaveV3Arbitrum_ARBRemoveIsolation_20240315_after.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/20240315_AaveV3Arbitrum_ARBRemoveIsolation/ARBRemoveIsolation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
||
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/). |
58 changes: 58 additions & 0 deletions
58
...240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.s.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
) | ||
); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...20240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
...240315_AaveV3Arbitrum_ARBRemoveIsolation/AaveV3Arbitrum_ARBRemoveIsolation_20240315.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}}}, | ||
}; |
c5a7669
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Foundry report
Build log
Test success 🌈