Skip to content

HyperStrategy

Source: src/strategies/HyperStrategy.sol

The HyperStrategy is the Ethereum-side strategy for the V2 HLP product. It bridges USDC to and from HyperEVM using CCTP V2; it is not the per-user GHO Staking strategy.

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

Cross-chain investment, redemption, and state updates require separate transactions and Circle attestations. A divest request does not immediately return USDC, and exit() does not recover remote positions. Follow the cross-chain flow and confirm completed asset receipts separately from submitted requests.

Public And External Functions

Function Access Description
receiver() public view Returns source-chain vault receiver.
asset() public view Returns source-chain asset.
hyperevmAllocator() public view Returns configured HyperEVM allocator.
lastUpdateTime() public view Returns timestamp of latest accepted remote state.
lastStateNonce() public view Returns latest accepted remote state nonce.
totalAssets() public view Returns remoteAssets + processingAssets + local asset balance; the remote component is cached, not a live cross-chain query.
remoteAssets() public view Returns tracked HyperEVM assets from the latest accepted remote state.
totalSupply() public view Returns tracked HyperEVM internal share supply.
processingAssets() public view Returns CCTP invest assets in flight.
processingShares() public view Returns CCTP redeem shares in flight.
setHyperevmAllocator(address) Admin Sets allocator once. Reverts if already set.
setCctpMaxFee(uint256 maxFee) Keeper Sets max CCTP fee for bridge calls.
invest(uint256 amount) Keeper Initiates a CCTP burn on the source chain; minting to the allocator requires destination-chain completion.
divest(uint256 amount) Keeper Converts amount to remote shares and sends RedeemMessage to allocator. Returns 0 because redemption is async.
replenish(uint256) pure Unsupported; always reverts FunctionNotSupported().
exit(bool) Keeper Transfers local source-chain asset balance to receiver. Does not unwind remote HyperEVM assets.
harvest(IERC20 asset_) Keeper Sweeps non-primary tokens to receiver.
updateRemoteState(bytes message, bytes attestation) Keeper Relays finalized CCTP state update.
completeInvest(bytes message, bytes attestation) Keeper Relays finalized CCTP invest response.
completeDivest(bytes message, bytes attestation) Keeper Relays finalized CCTP divest response, updates state from hook, transfers local asset to receiver.
handleReceiveFinalizedMessage(...) CCTP MessageTransmitter only Handles finalized UpdatedStateMessage.
handleReceiveUnfinalizedMessage(...) external pure Accepts unfinalized message path and returns true.

Internal Functions

Function Description
_validateSource(...) Ensures source CCTP domain and sender match expected allocator.
_updateRemoteState(UpdatedStateMessage) Applies processed asset/share deltas and updates remote totals if nonce is fresh.
_addressToBytes32(address) Converts address to CCTP bytes32 format.
_bytes32ToAddress(bytes32) Converts CCTP bytes32 sender to address.