nxtp: A simpler xchain protocol

Arjun Bhuptani
Connext
Published in
4 min readAug 6, 2021

TL;DR

nxtp is live on testnet! It is a simple, purpose-driven protocol to execute crosschain transfers and contract . Check out the docs and try it out here!

The Origin Story

We launched cross-evm transfers in January using a generalized state channel protocol. Since launching, we’ve grown at an astounding pace to hit $40m in weekly volume in only a few months. We’ve also learned a lot.

To recap, using Vector to perform a crosschain transfer has the following flow:

Crosschain flow using Vector

This design is certainly effective as a method of achieving crosschain transfers, but is it the best method? First, let’s consider a few practical drawbacks:

  • Vector has both offchain and onchain state which need to be kept in sync. This adds complexity and race conditions in the basic flow.
  • Users need to store their offchain data in browser storage, which are notoriously unreliable environments.
  • The protocol is highly interactive, with 12 state updates in this flow. Both parties have to be online to validate and sign each update.
  • Each protocol update requires at least one RPC call for verification. On chains with unstable RPCs, this creates many possible failure modes where transfers can get halted.
  • Routers distribute funds across many channel contracts, making accounting challenging.

Additionally, while we had proposed and started to work on a way to decentralize routing and scale up liquidity, progress on getting it launched was slow, largely due to the difficulty with accounting for funds in a scalable way offchain.

NXTP Has Entered the Chat

Nxtp is a simple protocol for fully noncustodial crosschain transfers and contract calls. It drills down on the things that make Vector great, but does it in a primarily contract-driven way:

  • Rather than fighting to keep on and offchain state in sync, we decided to instead delete our DBs 🔥. Nxtp uses an onchain data model only.
  • Users still sign a message to complete their tx on the receiving chain, but the flow for this is now simple and stateless, with the same UX as approvetransferFrom.
  • Funds in nxtp are held in a single contract on each chain, making accounting and building explorers/analytics dashboards easy.
  • Nxtp treats chain RPCs as unreliable by default, using subgraphs for reading data, and a ultra-robust transaction service for sending txs.
  • As a largely contract-oriented system, nxtp opens the door for developers to build contract-to-contract interactions across chains and rollups.

The key takeaway is: all the information needed for both parties is available onchain. Because this solves our issues with accounting, it also means that nxtp does all of the ground work needed for Route Auctioning and Virtual AMMs to work!

Nxtp Transaction Flow

Crosschain flow using nxtp

With nxtp, crosschain transactions go through three phases:

  1. Route selection: Users select the chains and assets and start an auction with the transfer information, and routers bid to complete the transfer with a time/price range.
  2. Prepare: Users send a transaction to the nxtp contracts on the sending chain. Upon seeing the contract event, routers lock up liquidity on the receiving chain.
  3. Fulfill: Users provide a signature to unlock funds on the receiving chain, and routers use the revealed signature to claim the liquidity on the sending chain.

At any point in this flow, a transaction may be cancelled by the participant who is owed funds (user on the receiving chain, router on the sending chain). Once the transaction has expired, the transaction becomes cancellable by either party. This means nxtp retains the exact same security model as vector for crosschain transactions.

Using the Protocol

NXTP in action! (You may want to put it at 2x)

If you want to try nxtp out as a user, check out the E2E demo built by LiFi here! 🎉

The protocol is now also fully ready for developer integrations. You can find documentation on how to get set up here. The following testnets are already supported:

  • Goerli
  • Rinkeby
  • Optimism-kovan
  • Arbitrum-rinkeby
  • Mumbai

To ensure this new protocol is launched in the safest way possible, we will be performing a guarded launch with whitelisted routers and assets. If you are interested in providing liquidity, or want to see specific assets included in the protocol, let us know right here.

Wen mainnet

Nxtp is fully working and feature-complete on testnet. We have also completed two rounds of contract audits so far.

We are currently completing our final audit which comprises both the contracts and offchain system. We’re also load testing nxtp to make sure that it can support and far exceed the transaction volume we’re currently seeing on mainnet.

We fully expect nxtp to be launched within the next three weeks with initial support for Ethereum, Arbitrum, Optimism, Polygon, Fantom, xDai, and BSC + more evm-compatible systems shortly after.

Stay tuned 🎉 🚀 🌕!

Want to Get Involved?

  • We’re hiring! Check out our job postings if you’re interested in joining the core team.
  • Join our discord chat — we have a super active community that would love to meet you!
  • If you want to use Connext as part of your project, check out our docs and/or reach out to us on our discord above.
  • Connext is fully open source, so community members are always welcome and encouraged to contribute to the protocol!

About Connext

Connext is the interoperability protocol of L2 Ethereum.

Website | Documentation | Twitter | Discord | Github | Blog

--

--

Arjun Bhuptani
Connext
Editor for

Founder of Everclear (prev Connext). Ethereum developer, game theory enthusiast, physics nerd, occasional sleeper.