Introducing Hyperlane V3

Nosleepjon
Hyperlane
Published in
5 min readAug 28, 2023

Welcome to the premiere of Hyperlane V3, an upgrade that advances Hyperlane’s modular approach to interoperability and further streamlines the developer experience.

The V3 Synopsis

Previously with V2, the Mailbox needed multiple calls to send a message, was complicated to integrate with native bridge message routing, and required new code to relay with Permissionless Deployment chains. V3 resolves those developer pain points, and introduces some shiny new features:

Additional Customization and Security Options

  • Introduction of Hooks, which allow you to customize your message routing (ISMs already allow you to customize your app’s interchain security).

Now you can fully customize how your interchain messages are transported and secured, from beginning to end.

  • You get even more security options now. Use Hooks to route messages through native/canonical bridges or 3rd party interop providers, with one Hyperlane API call.

Streamlined Developer Experience

  • Easier integrations and usage with a single call/single address Hyperlane API. You still get all of the Hooks customization with one API call.
  • No-code integrations that enable users/apps on core chains to start messaging to Permissionless Deployment chains immediately.

Introducing Hyperlane Hooks

The main architectural change introduced with V3 is Hyperlane Hooks, or post dispatch hooks. Before, we offered modular security through Interchain Security Modules (ISMs) — which helped verify the transaction after dispatch (message send). Hooks complement ISMs by offering a way to choose before dispatch which transport and security layers you want, plus perform additional customizable tasks.

If you are not familiar with API hooks, think of Hooks as an API extension or even a zap. Or even think about them like a lego button that triggers more actions if you add more lego attachments (hooks).

For example, with Hooks you can customize how your messages are routed, whether it’s through the default Hyperlane interop layer, native bridges, other transport/interop layers, or to pay interchain gas to relayers. All through one Hyperlane API.

Introducing: Single Call Hyperlane API

Before V3, you needed to make separate calls to send the message, to pay the IGP contract, to route through native bridges, to route through 3rd party interop providers. The multi-call setup led to mix ups and was unnecessarily complex. Less code is better code. So we decided to unify them.

With V3, we streamlined parts of the Mailbox into Hooks and removed the need for multiple calls. Now there’s just one call and address needed. Plus you can customize the Hyperlane API with Hooks to have additional integrations triggered simultaneously when called (while remaining one unified call).

V3 makes the Hyperlane integration experience significantly easier and faster than before.

Route Messages Through Native Bridges or 3rd Parties

The message lifecycle with Hooks

There are cases where the default Hyperlane Interchain Security Module (ISM) or your configured ISM isn’t sufficient for your app’s security needs. Builders may want to benefit from the security of a native bridge like Optimism or a third-party interop provider like Wormhole.

With V3, you can now route through these alternative “transport layers” with Hooks, without leaving the Hyperlane Mailbox interface or needing a bridge-specific implementation.

What’s important is that you can use different hooks for different chains and different preferences. While you can technically send messages through these other transport layers individually, Hyperlane allows you to customize your message routing for every chain, in one interface.

Some additional details:

The V3 mailbox has a required protocol hook and a default hook that can be overridden by the sender. You can always use your own hooks and ISMs if you don’t like or trust the defaults enough. These hooks are governable, enabling Mailbox operators to add message-specific capabilities as default or required over time.

Simple Integration

The post dispatch hook interface is designed for easy implementation (similar to the ISM verification interface). In addition to message content, the sender can provide metadata to further express preferences. The interface is simple with only a few lines of code. See how the calls look before and after V3:

Before

After

Streamlined Permissionless Interoperability

One of the direct benefits of the new V3 architecture is making Permissionless Deployment chains (non-core Hyperlane deployments) easier to integrate.

Before, you had to integrate a custom route to send messages from core chains to these Permissionless chains, which was inefficient and time-consuming. Now with Hooks, no new code needed to route messages to them. Start relaying messages to Permissionless chains immediately once deployed.

More Modular Interoperability

V3’s modular mailbox enables chains and applications to choose both the message transport and security layers that best fit their requirements, without being tied to a one-size-fits-all solution. As new transport and security protocols emerge, you’ll be able to easily plug them in without overhauling the entire system. More flexible and future proof interoperability.

What’s Next

We’ve implemented these changes for the EVM implementation of Hyperlane and are sending them off for audit, targeting a mainnet launch by mid-September. V3 will be a breaking change to V2 so:

  • If you are still on Hyperlane V1 → just skip V2 and wait for V3.
  • If you are on V2, or building with V2 → be aware there will be a breaking change in about a month, so adjust accordingly.

To start getting familiar with the V3 implementation, see our technical overview.

To start building with Hooks, see our docs. Remember, anyone can build a hook and contribute to Hyperlane!

More about Hyperlane

Hyperlane is the first Permissionless Interoperability layer, enabling anyone to connect any blockchain, out-of-the-box. With Hyperlane, developers can build Interchain Applications, apps that abstract away the complexity of interchain interactions and serve users on any connected chain. Additionally, Hyperlane’s modular security stack gives developers the power to customize their interchain security. Hyperlane development is open-source and led by core developers at Abacus Works.

Go Interchain with Hyperlane

Start building with our Docs.
Experiment with Hyperlane in 5 minutes with our Quickstarts.
Join our Discord if you have any questions.
Apply to join our crew Here.
Find us on Twitter.

--

--