forked from aave-dao/aave-v3-origin
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Phase Two Asset Listing #37
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
Open
yan-man
wants to merge
40
commits into
main
Choose a base branch
from
feat/phase-two-listing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 36 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
88417fb
feat: phase two asset listing
yan-man a50b18b
feat: deploy with config engine
yan-man 7789168
fix: cleanup
yan-man 3db17b0
test: VBILL listing
yan-man 774ea78
test: registry checks; address lib horizon
yan-man 2e91d4f
test: clean up; add more for new aggregator
yan-man 96dda27
test: clean up latestRoundData bounds
yan-man b6cb0ad
chore: test comments
yan-man 281d52e
test: clean up
yan-man 4220cfb
test: post-migration aggregator tests
yan-man 2c06eec
test: read admin cleanup; post migration tests
yan-man 61294e0
fix: test cleanup; print current price
yan-man cf8d4df
Merge branch 'test/dynamic-bounds' into feat/phase-two-listing
yan-man 6fd7074
fix: file, lib clean up
yan-man 2c8903a
feat: makefile and cleanup
yan-man 598a2bb
fix: clean up tests
yan-man d49ca96
test: cleanup and add fork
yan-man 1ffa349
chore: address book dep
yan-man 367ef5b
chore: horizon addrs dep
yan-man 8c06f44
fix: migrate to address book
yan-man 71bb4e1
chore: clean up remaining migration to addr book
yan-man b18f305
fix: update make file; clean up tests and add for emode
yan-man 7baa99a
test: clean up; add current emode label
yan-man 4e58f3b
test: param registry VBILL
yan-man 35c7f11
fix: pin fork to block
yan-man c63ed6f
fix: pr comments; interface for param registry
yan-man f62cc60
fix: rm address book
yan-man 6d439ee
fix: remaining low level call
yan-man 143107f
fix: param registry updater
yan-man 9139b7a
Merge branch 'test/dynamic-bounds' into feat/phase-two-listing
yan-man b552e42
chore: migrate to non address book dep
yan-man 67d30fc
fix: revert address book
yan-man f7488af
fix: resolve tests
yan-man 9f063a1
Merge branch 'main' into feat/phase-two-listing
yan-man 4f99c46
fix: clean up param registry naming; horizon addrs deps
yan-man c4d2317
fix: pr comments
yan-man 81be34e
fix: pr comments
yan-man 47f3395
test: post-deployment; payload addr
yan-man ddc97c8
fix: tests on vtestnet sim
yan-man 91c5b34
test: post-execution checks
yan-man 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
This file contains hidden or 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 hidden or 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,14 @@ | ||
| { | ||
| "lib/solidity-utils": { | ||
| "rev": "627712ae49771530594bc6ea0eb384544979d4ca" | ||
| }, | ||
| "lib/forge-std": { | ||
| "rev": "999be66ec94c78090087f674bbf52ce1cca12b75" | ||
| }, | ||
| "lib/aave-address-book": { | ||
| "tag": { | ||
| "name": "v4.36.0", | ||
| "rev": "6cb3a0f32db8c85115c2c7434c0e5644f18e11ff" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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,31 @@ | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| import {AaveV3EthereumHorizonCustom} from 'tests/horizon/utils/AaveV3EthereumHorizonCustom.sol'; | ||
| import {HorizonPhaseTwoListing} from 'src/deployments/inputs/HorizonPhaseTwoListing.sol'; | ||
| import {AaveV3HelpersBatchOne} from 'src/deployments/projects/aave-v3-batched/batches/AaveV3HelpersBatchOne.sol'; | ||
| import {AaveV3ConfigEngine} from 'src/contracts/extensions/v3-config-engine/AaveV3ConfigEngine.sol'; | ||
| import {Script} from 'forge-std/Script.sol'; | ||
|
|
||
| contract DeployHorizonPhaseTwoPayload is Script { | ||
| function run() public returns (address, address) { | ||
| vm.startBroadcast(); | ||
| AaveV3HelpersBatchOne helpersBatchOne = new AaveV3HelpersBatchOne( | ||
| AaveV3EthereumHorizonCustom.POOL, | ||
| AaveV3EthereumHorizonCustom.POOL_CONFIGURATOR, | ||
| AaveV3EthereumHorizonCustom.DEFAULT_INTEREST_RATE_STRATEGY, | ||
| AaveV3EthereumHorizonCustom.AAVE_ORACLE, | ||
| AaveV3EthereumHorizonCustom.REWARDS_CONTROLLER, | ||
| AaveV3EthereumHorizonCustom.REVENUE_SPLITTER, | ||
| AaveV3EthereumHorizonCustom.ATOKEN_IMPL, | ||
| AaveV3EthereumHorizonCustom.VARIABLE_DEBT_TOKEN_IMPL | ||
| ); | ||
|
|
||
| HorizonPhaseTwoListing horizonPhaseTwoListing = new HorizonPhaseTwoListing( | ||
| helpersBatchOne.getConfigEngineReport().configEngine | ||
miguelmtzinf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ); | ||
| vm.stopBroadcast(); | ||
|
|
||
| return (address(helpersBatchOne), address(horizonPhaseTwoListing)); | ||
| } | ||
| } | ||
This file contains hidden or 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,101 @@ | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| import {IAaveV3ConfigEngine as IEngine} from '../../contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; | ||
| import {EngineFlags} from '../../contracts/extensions/v3-config-engine/EngineFlags.sol'; | ||
| import {AaveV3Payload} from '../../contracts/extensions/v3-config-engine/AaveV3Payload.sol'; | ||
|
|
||
| import {AaveV3EthereumHorizonCustom} from 'tests/horizon/utils/AaveV3EthereumHorizonCustom.sol'; | ||
|
|
||
| contract HorizonPhaseTwoListing is AaveV3Payload { | ||
| constructor(address configEngine) AaveV3Payload(IEngine(configEngine)) {} | ||
|
|
||
| function eModeCategoriesUpdates() | ||
| public | ||
| pure | ||
| override | ||
| returns (IEngine.EModeCategoryUpdate[] memory) | ||
| { | ||
| IEngine.EModeCategoryUpdate[] memory eModeCategories = new IEngine.EModeCategoryUpdate[](1); | ||
|
|
||
| // VBILL GHO | ||
| eModeCategories[0] = IEngine.EModeCategoryUpdate({ | ||
| eModeCategory: 1, // overwrite previous empty eMode category | ||
miguelmtzinf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ltv: 84_00, | ||
| liqThreshold: 89_00, | ||
| liqBonus: 3_00, | ||
| label: 'VBILL GHO' | ||
| }); | ||
|
|
||
| return eModeCategories; | ||
| } | ||
|
|
||
| function newListingsCustom() | ||
| public | ||
| view | ||
| override | ||
| returns (IEngine.ListingWithCustomImpl[] memory) | ||
| { | ||
| IEngine.ListingWithCustomImpl[] memory listingsCustom = new IEngine.ListingWithCustomImpl[](1); | ||
|
|
||
| listingsCustom[0] = IEngine.ListingWithCustomImpl( | ||
| IEngine.Listing({ | ||
| asset: AaveV3EthereumHorizonCustom.VBILL_UNDERLYING, | ||
| assetSymbol: 'VBILL', | ||
| priceFeed: AaveV3EthereumHorizonCustom.VBILL_PRICE_FEED, | ||
| rateStrategyParams: IEngine.InterestRateInputData({ | ||
| optimalUsageRatio: 99_00, | ||
| baseVariableBorrowRate: 0, | ||
| variableRateSlope1: 0, | ||
| variableRateSlope2: 0 | ||
| }), | ||
| enabledToBorrow: EngineFlags.DISABLED, | ||
| borrowableInIsolation: EngineFlags.DISABLED, | ||
| withSiloedBorrowing: EngineFlags.DISABLED, | ||
| flashloanable: EngineFlags.DISABLED, | ||
| ltv: 83_00, | ||
| liqThreshold: 88_00, | ||
| liqBonus: 3_00, | ||
miguelmtzinf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| reserveFactor: EngineFlags.KEEP_CURRENT, | ||
| supplyCap: 15_000_000, | ||
| borrowCap: 0, | ||
| debtCeiling: 0, | ||
| liqProtocolFee: 0 | ||
| }), | ||
| IEngine.TokenImplementations({ | ||
| aToken: AaveV3EthereumHorizonCustom.RWA_ATOKEN_IMPL, | ||
| vToken: AaveV3EthereumHorizonCustom.VARIABLE_DEBT_TOKEN_IMPL | ||
| }) | ||
| ); | ||
|
|
||
| return listingsCustom; | ||
| } | ||
|
|
||
| function assetsEModeUpdates() public view override returns (IEngine.AssetEModeUpdate[] memory) { | ||
| IEngine.AssetEModeUpdate[] memory assetsEMode = new IEngine.AssetEModeUpdate[](2); | ||
|
|
||
| uint256 index = 0; | ||
|
|
||
| // Overwrite empty eMode category 1 | ||
| assetsEMode[index++] = IEngine.AssetEModeUpdate({ | ||
| asset: AaveV3EthereumHorizonCustom.VBILL_UNDERLYING, | ||
| eModeCategory: 1, | ||
| collateral: EngineFlags.ENABLED, | ||
| borrowable: EngineFlags.DISABLED | ||
| }); | ||
| assetsEMode[index++] = IEngine.AssetEModeUpdate({ | ||
| asset: AaveV3EthereumHorizonCustom.GHO_UNDERLYING, | ||
| eModeCategory: 1, | ||
| collateral: EngineFlags.DISABLED, | ||
| borrowable: EngineFlags.ENABLED | ||
| }); | ||
|
|
||
| assert(index == assetsEMode.length); | ||
|
|
||
| return assetsEMode; | ||
| } | ||
|
|
||
| function getPoolContext() public pure override returns (IEngine.PoolContext memory) { | ||
| return IEngine.PoolContext({networkName: 'Horizon RWA', networkAbbreviation: 'HorRwa'}); | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.