generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
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
brotherlymite
merged 20 commits into
bgd-labs:main
from
TokenLogic-com-au:remove-arb-isolation
Mar 25, 2024
Merged
Remove arb isolation #256
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b579c26
ALC funding with 500k GHO
Luigy-Lemon 1f935c4
Merge branch 'bgd-labs:main' into main
efecarranza fb272d7
basic fixes
a2f028e
adjusting md file
e3f3ae9
Merge branch 'alc-funding'
bfa3add
init commit
21c5f7b
debt ceiling 0
474cdbb
tests and script
a4c1ca1
update config and test block
c6ad7b3
merge main
efecarranza 308ca14
chore: update links
efecarranza 9025d59
chore: merge main
efecarranza 351b516
forge install: aave-helpers
efecarranza 464e615
feat: PR updates with right links
efecarranza fe5bb30
chore: merge main
efecarranza 9f2721b
forge install: aave-helpers
efecarranza 0ea18ab
chore: update block'
efecarranza 9b936a0
forge install: aave-helpers
efecarranza 593ef9b
chore: run lint
efecarranza ebd713c
fix: clarify Specification of proposal
Luigy-Lemon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
39 changes: 39 additions & 0 deletions
39
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,39 @@ | ||
--- | ||
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) | ||
Chainlink Oracle: [0xb2A824043730FE05F3DA2efaFa1CBbe83fa548D6](https://arbiscan.io/address/0xb2A824043730FE05F3DA2efaFa1CBbe83fa548D6) | ||
|
||
Risk parameters can be proposed by Risk Service providers. | ||
|
||
## 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}}}, | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This Specification is completely arbitrary, not saying anything of what the proposal does
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.
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?