Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
88417fb
feat: phase two asset listing
yan-man Sep 24, 2025
a50b18b
feat: deploy with config engine
yan-man Sep 24, 2025
7789168
fix: cleanup
yan-man Sep 25, 2025
3db17b0
test: VBILL listing
yan-man Sep 25, 2025
774ea78
test: registry checks; address lib horizon
yan-man Sep 29, 2025
2e91d4f
test: clean up; add more for new aggregator
yan-man Sep 29, 2025
96dda27
test: clean up latestRoundData bounds
yan-man Sep 29, 2025
b6cb0ad
chore: test comments
yan-man Sep 29, 2025
281d52e
test: clean up
yan-man Sep 30, 2025
4220cfb
test: post-migration aggregator tests
yan-man Sep 30, 2025
2c06eec
test: read admin cleanup; post migration tests
yan-man Oct 1, 2025
61294e0
fix: test cleanup; print current price
yan-man Oct 1, 2025
cf8d4df
Merge branch 'test/dynamic-bounds' into feat/phase-two-listing
yan-man Oct 8, 2025
6fd7074
fix: file, lib clean up
yan-man Oct 8, 2025
2c8903a
feat: makefile and cleanup
yan-man Oct 8, 2025
598a2bb
fix: clean up tests
yan-man Oct 11, 2025
d49ca96
test: cleanup and add fork
yan-man Oct 11, 2025
1ffa349
chore: address book dep
yan-man Oct 29, 2025
367ef5b
chore: horizon addrs dep
yan-man Oct 29, 2025
8c06f44
fix: migrate to address book
yan-man Oct 29, 2025
71bb4e1
chore: clean up remaining migration to addr book
yan-man Oct 29, 2025
b18f305
fix: update make file; clean up tests and add for emode
yan-man Oct 29, 2025
7baa99a
test: clean up; add current emode label
yan-man Oct 30, 2025
4e58f3b
test: param registry VBILL
yan-man Oct 30, 2025
35c7f11
fix: pin fork to block
yan-man Oct 30, 2025
c63ed6f
fix: pr comments; interface for param registry
yan-man Oct 30, 2025
f62cc60
fix: rm address book
yan-man Oct 30, 2025
6d439ee
fix: remaining low level call
yan-man Oct 30, 2025
143107f
fix: param registry updater
yan-man Oct 30, 2025
9139b7a
Merge branch 'test/dynamic-bounds' into feat/phase-two-listing
yan-man Oct 30, 2025
b552e42
chore: migrate to non address book dep
yan-man Oct 30, 2025
67d30fc
fix: revert address book
yan-man Oct 30, 2025
f7488af
fix: resolve tests
yan-man Oct 30, 2025
9f063a1
Merge branch 'main' into feat/phase-two-listing
yan-man Oct 30, 2025
4f99c46
fix: clean up param registry naming; horizon addrs deps
yan-man Oct 30, 2025
c4d2317
fix: pr comments
yan-man Oct 30, 2025
81be34e
fix: pr comments
yan-man Oct 30, 2025
47f3395
test: post-deployment; payload addr
yan-man Oct 30, 2025
ddc97c8
fix: tests on vtestnet sim
yan-man Oct 31, 2025
91c5b34
test: post-execution checks
yan-man Nov 4, 2025
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/aave-address-book"]
path = lib/aave-address-book
url = https://github.com/bgd-labs/aave-address-book
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ deploy-liquidation-data-provider :;
--sig "run(address,address)" ${pool} ${addressesProvider} \
--verify --broadcast

# Deploys payload to update phase two assets. `make deploy-phase-two-payload CHAIN=mainnet ACCOUNT=<account>`
deploy-phase-two-payload :;
FOUNDRY_PROFILE=${CHAIN} forge script scripts/misc/DeployHorizonPhaseTwoPayload.sol:DeployHorizonPhaseTwoPayload \
--rpc-url ${CHAIN} --account ${ACCOUNT} --slow --gas-estimate-multiplier 150 \
--chain ${CHAIN} --verifier-url ${VERIFIER_URL} \
--sig "run()" \
--verify --broadcast \

# Invariants
echidna:
echidna tests/invariants/Tester.t.sol --contract Tester --config ./tests/invariants/_config/echidna_config.yaml --corpus-dir ./tests/invariants/_corpus/echidna/default/_data/corpus
Expand Down
14 changes: 14 additions & 0 deletions foundry.lock
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"
}
}
}
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ base = "${RPC_BASE}"
metis = "${RPC_METIS}"
linea = "${RPC_LINEA}"
sepolia = "${RPC_SEPOLIA}"
vtestnet = "${RPC_VTESTNET}"

[etherscan]
mainnet = { key = "${ETHERSCAN_API_KEY}", chainId = 1 }
Expand Down
1 change: 1 addition & 0 deletions lib/aave-address-book
Submodule aave-address-book added at 6cb3a0
32 changes: 32 additions & 0 deletions scripts/misc/DeployHorizonPhaseTwoPayload.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {AaveV3EthereumHorizonCustom} from 'tests/horizon/utils/AaveV3EthereumHorizonCustom.sol';
import {AaveV3EthereumHorizon, AaveV3EthereumHorizonAssets} from 'aave-address-book/AaveV3EthereumHorizon.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(
address(AaveV3EthereumHorizon.POOL),
address(AaveV3EthereumHorizon.POOL_CONFIGURATOR),
address(AaveV3EthereumHorizonAssets.GHO_INTEREST_RATE_STRATEGY),
address(AaveV3EthereumHorizon.ORACLE),
address(AaveV3EthereumHorizon.DEFAULT_INCENTIVES_CONTROLLER),
address(AaveV3EthereumHorizon.COLLECTOR),
address(AaveV3EthereumHorizon.DEFAULT_A_TOKEN_IMPL),
address(AaveV3EthereumHorizon.DEFAULT_VARIABLE_DEBT_TOKEN_IMPL)
);

address configEngine = helpersBatchOne.getConfigEngineReport().configEngine;

HorizonPhaseTwoListing horizonPhaseTwoListing = new HorizonPhaseTwoListing(configEngine);
vm.stopBroadcast();

return (configEngine, address(horizonPhaseTwoListing));
}
}
102 changes: 102 additions & 0 deletions src/deployments/inputs/HorizonPhaseTwoListing.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// 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 {AaveV3EthereumHorizon, AaveV3EthereumHorizonAssets} from 'aave-address-book/AaveV3EthereumHorizon.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
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,
reserveFactor: EngineFlags.KEEP_CURRENT,
supplyCap: 15_000_000,
borrowCap: 0,
debtCeiling: 0,
liqProtocolFee: 0
}),
IEngine.TokenImplementations({
aToken: AaveV3EthereumHorizonCustom.RWA_ATOKEN_IMPLEMENTATION,
vToken: AaveV3EthereumHorizon.DEFAULT_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: AaveV3EthereumHorizonAssets.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'});
}
}
Loading
Loading