hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
240 stars 272 forks source link

Epic: Liquidity Layer should be more native to permissionless Hyperlane #2379

Open nambrot opened 1 year ago

nambrot commented 1 year ago

The existing Liquidity Layer API is in beta and was created as a experiment to see how developers could combine message processing with token bridging. Since then, a lot of has changed, and lessons have been learned, so this ticket captures the next version that would be an improvement over the current version. Specifically:

An important insight is that there is no single answer to how to bridge a token (i.e. I have token X on chain A and want token Y on chain B). Sometimes it might be a wrapped token bridge (either a warp route, canonical like Optimism or external like Wormhole), sometimes it's gonna be a DEX, but then other times its actually just the issuer (i.e. CCTP for USDC).

In effect, the liquidity layer can reduce to simple sending tokens via arbitrary bridges to an ICA of the sender on the destination and then make conventional function calls. These various mechanisms can be abstracted behind adapters that mostly implement the same interface, i.e. just transferRemote(destination, recipient, amount). On the destination chain, there can be ISMs that complete the bridge transfer to the ICA, thus each adapter most likely needs their own ISM implementation + support in the relayer (unless the token bridge relays itself)

To complete the scope of this ticket:

### Older issues
- [ ] https://github.com/hyperlane-xyz/issues/issues/355
nambrot commented 1 year ago

@mellowcroc is working on this

daniel-savu commented 3 months ago

Bumping this, since someone recently asked for the ability to send both tokens and data via hyperlane. Seeing it's marked as a bounty but I think the original developer has stopped working on this? @avious00 @aroralanuk

nambrot commented 3 months ago

Yeah the linked PR has a lot of good stuff, but IMO there is plenty of work left here for somebody else to take this over

nambrot commented 2 months ago

We should call this something else, liquidity layer at this point has a different connotation. ICA with tokens or something