Pre-Requisites
To complete the following walkthrough, you should have the following available:- An origin and destination network of choice, between which you’d like to deploy the yield route.
- The address of an ERC-4626 vault on the origin network from which you want yield to be generated. This vault’s underlying asset will be set as the collateral for the HWR (e.g. if vault is USDC funded, the HWR will also support USDC transfer).
- An installed instance of the Hyperlane CLI and a wallet private key set as the
HYP_KEY
env var funded on your origin and destination networks.
Walkthrough
Concepts
- ERC-4626 Vault: The Ethereum standard for tokenized yield-bearing vaults. Upon deposit, share tokens are minted representing ownership of the underlying asset.
- Yield Route (EvmHypOwnerCollateral & EvmHypSynthetic): The Hyperlane representation of a yield-bearing EVM collateral token. Note that the yield route’s vault’s deposited asset address is used as the HWRs collateral token.
- This specific yield route variant distributes vault yields to the owner. There is an alternative setup where yields are distributed to the users (EvmHypCollateral & EvmHypSyntheticRebase). For most of this guide, we will refer to the former variants. The concepts remain the same.
For the sake of this walkthrough, the “origin” network will refer to the
network on which the yield is generated (e.g. Ethereum has a USDC lending
vault that has claimable yield. A synthetic USDC is minted on the destination
chain called yourchain).
Yield Route Deployment Steps
Using the Hyperlane CLI, deploy a USDC EvmHypOwnerCollateral and EvmHypSynthetic tokens on Ethereum and yourchain, respectively:1. Run hyperlane warp init
to generate a HWR config:
-
Select
yourchain
andEthereum
using space, and hit enter. -
For Ethereum, select
collateralVault
, accept the mailbox, and enter the USDC vault address on yourchain.- Alternatively, you can select
collateralVaultRebase
which is a yield route variant that distribute yields to users by increasing their holding amount.
- Alternatively, you can select
-
For yourchain, select
synthetic
and accept the mailbox.- If you selected
collateralVaultRebase
, you must pair it with asyntheticRebase
- If you selected
2. Run hyperlane warp deploy
to deploy the HWR.
Claiming Yield
Depending on the yield route variant, yield can be claimed by either callingHypERC4626OwnerCollateral.sweep()
or HypERC4626Collateral.rebase()
on their respective contracts.
🎉 Congrats! You have now created a new yield route with your vault. Bridged
user assets can now earn passive yield while present in the origin HWR.
Please note that this collateralization strategy takes on certain ISM trust
assumptions, and there is inherent risk that the underlying ERC-4626
vault
becomes under-collateralized.