Skip to content

Interfaces And Libraries

These interfaces and libraries cover V2 shared vaults, not per-user GHO Staking. For Saving-specific routing and accounting, see Aave GHO Saving.

Before integration or administration, verify the listed signatures, events, and permissions against the deployed implementation and its verified source. See Documentation scope and verification.

Core Interfaces

IRouter

Minimal interface declared inside HyperCoreAllocator.sol for allocator/router interaction.

Function Description
totalAssets() Returns router-managed assets.
approveOnlyForAllocator() Allows allocator to pull router idle ERC-20 balance.

IVault

Function Description
idleAssets() Vault idle balance.
shutdownTime() Shutdown timestamp.
pushFundOnlyForController(address strategy, uint256 amount) Controller-gated asset transfer to strategy.
mintFeeSharesOnlyForController(address recipient, uint256 shares) Controller-gated fee share mint.
harvestOnlyForController(address token, address recipient) Controller-gated token sweep.
pause() Pause vault.
unpause() Unpause vault.
shutdown() Permanently shut down vault.
emergencyRedeem(address receiver) Shutdown-only emergency redemption.

IStrategy

Function Description
receiver() Address receiving divested assets.
asset() Underlying asset.
totalAssets() Strategy-managed assets.
invest(uint256 amount) Deploy assets.
divest(uint256 amount) Requests strategy-specific withdrawal; asynchronous strategies may return before assets reach the receiver.
replenish(uint256 amount) Requests assets for the synchronous vault liquidity waterfall; unsupported by HyperStrategy.
exit(bool ignore) Invokes the strategy-specific exit procedure. HyperStrategy only returns local assets and does not unwind remote positions.
harvest(IERC20 asset) Sweep non-primary token.

IStrategicFund

Function Description
totalStrategyAssets(address vault) Sum strategy assets for vault.
strategies(address vault) Return vault strategies.
strategyAdd(address vault, address strategy_) Register strategy.
strategyRevoke(address vault, address strategy_, bool force) Revoke strategy.
fundInvest(address vault, address strategy_, uint256 amount) Invest vault funds.
fundDivest(address vault, address strategy_, uint256 amount) Initiates divestment under the strategy's synchronous or asynchronous withdrawal mechanics.
fundReplenishOnlyForVault(address vault, uint256 shortage) Vault-only liquidity waterfall.
fundExitOnlyForVault(address vault) Vault-only invocation of strategy exit procedures; does not guarantee recovery of all remote or unavailable assets.

IMarkToMarket

Function Description
prevMarkedValues(address vault) Previous confirmed NAV values.
markedValues(address vault) Current confirmed NAV values.
proposeValues(address vault) Create pending NAV epoch.
confirmValues(address vault, uint256 epoch) Confirm pending NAV epoch.

Constants And Errors

Constants.sol groups protocol-level errors, events, roles, and known addresses.

Protocol Errors

Error Meaning
FunctionNotSupported() Function intentionally unsupported.
OperationInProgress() Another in-flight operation exists.
ExceedsTotalSupply() Requested shares exceed remote supply.
PrecompileFailed() HyperCore precompile call failed.
ZeroAddress() Address parameter is zero.
ZeroAmount() Amount parameter is zero.
ZeroShares() Shares parameter is zero.
UnauthorizedCaller(address caller, address expectCaller) Caller is not expected contract.
UnauthorizedSource(uint32 sourceDomain, address sender, uint32 expectedDomain, address expectedSender) CCTP source mismatch.
VaultNotRegistered(address vault) Vault not registered in Controller.
VaultAlreadyRegistered(address vault) Vault already registered.
RouterAlreadyRegistered(address router) Router already registered.
StrategyRegistered(address vault, address strategy) Strategy already registered.
StrategyNotRegistered(address vault, address strategy) Strategy not registered.
EpochMismatch(uint256 expected, uint256 actual) NAV epoch invalid.
ProposalStale(uint256 deadline, uint256 timestamp) NAV proposal older than allowed window.
VaultIsShutdown() Active-only operation called after shutdown.
VaultNotShutdown() Shutdown-only operation called before shutdown.
InsufficientIdleAssets(uint256 requested, uint256 available) Contract lacks idle asset for requested operation.
InvalidHarvestToken(address token) Attempted to harvest protected token.
NothingToClaim() Async request is not claimable.
ExitFailed() Strategy exit failed and ignore flag is false.
ReceiveMessageFailed() CCTP receiveMessage returned false.
AllocatorNotSet() HyperStrategy allocator not configured.
AllocatorAlreadySet() HyperStrategy allocator already configured.
UnsupportedChain(uint256 chainId) AddressBook does not support current chain.
AssetMismatch() Strategy or address asset mismatch.
ReceiverMismatch() Strategy receiver mismatch.
InsufficientStrategyAssets(uint256 requested, uint256 available) Strategy liquidity insufficient.
MintRecipientMismatch() CCTP mint recipient is not expected allocator.
InvalidFeeRate(uint256 feeRate) Fee rate is >= 1_000_000.
WithdrawTooLow(uint256 min, uint256 actual) Withdraw amount below vault minimum.

Protocol Events

Event Emitted By Meaning
FeeSharesMinted Controller Performance fee shares minted when a non-zero fee applies. The current performance fee rate for Ethereum Network Lending, AAVE GHO Saving, and Hyperliquidity Provider (HLP)—the V2 portals documented here—is 0%, so no fee shares are minted for those portals.
FeeReceiverSet Controller Manager changed.
FeeRateSet Controller Vault fee rate changed. The current V2 portal fee rate is 0%.
VaultRegistered Controller Vault registered.
ValuesProposed Controller Pending NAV proposed.
ValuesConfirmed Controller Pending NAV confirmed.
StrategyAdded Controller Strategy registered.
StrategyRevoked Controller Strategy removed.
VaultShutdown Vault Vault permanently shutdown.
EmergencyRedeemed Vault Shutdown redemption executed.
RedeemRequested Async Vault Async redeem request queued.
RedeemExecuted Async Vault / Allocator Async or cross-chain redemption executed.
Claimed Async Vault Investor claimed executed assets.
RemoteStateUpdated HyperStrategy Remote HyperEVM state updated.
RouterAdded Allocator HyperCore router registered.
DivestHandled Allocator CCTP invest message handled and shares minted.
RedeemRequestQueued Allocator Cross-chain redeem shares queued.
Allocated Library event placeholder ERC-20 assets deposited into CoreDepositWallet.
CoreAllocated Library event placeholder HyperCore balances moved into HLP.
CoreCollected Library event placeholder HyperCore balances collected.
Collected Library event placeholder ERC-20 assets collected back to Allocator.
Harvested Strategies / Allocator / Router Non-primary token swept.
FundPushed Vault Vault pushed asset to strategy.
FeeSharesMintedForRecipient Vault Fee shares minted by the vault when a non-zero fee applies. This mechanism is inactive for the V2 portals documented here at their current 0% fee rate.
VaultHarvested Vault Vault token swept.

AddressBook

AddressBook returns known protocol addresses by block.chainid.

Function Supported Chains Description
usdc() Ethereum, Base Sepolia, HyperEVM, HyperEVM Testnet Returns USDC address.
aaveUsdc() Ethereum, Base Sepolia Returns Aave USDC address.
aavev3() Ethereum, Base Sepolia Returns Aave V3 Pool address.
aavev3IncentivesController() Ethereum, Base Sepolia Returns Aave rewards controller.
morpho() Ethereum Returns Morpho address.
morphoUniversalRewardsDistributor() Ethereum Returns Morpho rewards distributor.
tokenMessenger() Ethereum, Base Sepolia, HyperEVM, HyperEVM Testnet Returns CCTP TokenMessengerV2.
messageTransmitter() Ethereum, Base Sepolia, HyperEVM, HyperEVM Testnet Returns CCTP MessageTransmitterV2.
coreDepositWallet() HyperEVM, HyperEVM Testnet Returns HyperCore deposit wallet.
vaultHlp() HyperEVM, HyperEVM Testnet Returns HLP vault address.

AsyncMessages

Struct Fields Used By
RedeemMessage shares HyperStrategy.divest() sends it to HyperCoreAllocator.
UpdatedStateMessage nonce, timestamp, processedAssets, processedShares, totalAssets, totalSupply Allocator sends state back to HyperStrategy.

CCTP Parsing Libraries

These internal libraries facilitate the formatting and decoding of raw CCTP byte arrays.

BurnMessage

Function Description
_formatMessage(...) Formats legacy burn message.
_getMessageSender(bytes) Reads message sender.
_getBurnToken(bytes) Reads burn token.
_getMintRecipient(bytes) Reads mint recipient.
_getAmount(bytes) Reads burn amount.
_getVersion(bytes) Reads burn message version.
_validateBurnMessageFormat(bytes) Validates message length.

BurnMessageV2

Function Description
_formatMessageForRelay(...) Formats CCTP V2 burn message for relay.
_getVersion(bytes) Reads version.
_getBurnToken(bytes) Reads burn token.
_getMintRecipient(bytes) Reads mint recipient.
_getAmount(bytes) Reads amount.
_getMessageSender(bytes) Reads message sender.
_getMaxFee(bytes) Reads maximum fee.
_getFeeExecuted(bytes) Reads executed fee.
_getExpirationBlock(bytes) Reads expiration block.
_getHookData(bytes) Reads hook data payload.
_validateBurnMessageFormat(bytes) Validates CCTP V2 burn message length.

MessageV2

Function Description
_formatMessageForRelay(...) Formats CCTP V2 message.
_getVersion(bytes) Reads message version.
_getSourceDomain(bytes) Reads source CCTP domain.
_getDestinationDomain(bytes) Reads destination CCTP domain.
_getNonce(bytes) Reads nonce.
_getSender(bytes) Reads sender.
_getRecipient(bytes) Reads recipient.
_getDestinationCaller(bytes) Reads destination caller.
_getMinFinalityThreshold(bytes) Reads required finality.
_getFinalityThresholdExecuted(bytes) Reads executed finality.
_getMessageBody(bytes) Returns message body slice.
_validateMessageFormat(bytes) Validates message format.