Nomad series: What changed with Connext and Nomad with the Amarok upgrade?

Nomad series: What changed with Connext and Nomad with the Amarok upgrade?

Background of Nomad

Nomad is a security-first cross-chain messaging protocol leveraging an optimistic verification mechanism to verify cross-chain transactions. The optimistic verification mechanism is battle tested. It requires a sequencer which is assumed to be honest, to keep the entire system safe. To assure that the sequencer is honest, several independent external verifiers are replaying what the sequencer does and generating a fraud-proof in case the sequencer does some fraud. That fraud-proof will be submitted into the destination chain to revert the malicious transactions during the fraud-proof window period. The fraud-proof window period for the Nomad case is 30 minutes. This means any cross-chain transaction using Nomad requires a 30 minutes delay before executing on the destination chain. Thirty minutes delay is a fundamental problem of optimistic verification.

The core of Nomad is limited to just sending messages from one chain to another. To bridge a token from one chain to another, external developers must develop another dApp. Nomad has also developed a dApp to bridge tokens, but it uses a lock-and-mint mechanism which has many problems, such as liquidity problem, as Nomad-wrapped token usually doesn’t have liquidity paired with the real one.

Background of Connext

Connext has come to solve these bridge problems but without arbitrary message passing support before the Amarok upgrade. By introducing Routers. Routers are responsible for relaying funds (and data after the Amarok upgrade) between domains. To be able to relay funds, routers are responsible for holding pools of real tokens liquidity for unlocking in the destination chain. The router’s owner should provide liquidity to her router first. After that, anyone may add liquidity to your router. Routers earn cross-chain swap fees from users who use Connext to perform cross-chain swaps or bridges.

The problem of Connext before the Amarok upgrade

https://commons.wikimedia.org/wiki/File:Antique_Clock_Face.jpg

Connext seems to be perfect. However, Connext is using Nomad as its underlying infrastructure. So, Connext also has a 30 minutes delay caused by the optimistic verification mechanism Nomad uses. Moreover, Connext also requires up to 4 cross-chain message passing steps, which, summed to 120 minutes delay, is ridiculously long. Nobody will tolerate waiting even 30 minutes to perform one swap. In the worst case, the price may spike or crash during that 30 minutes, which causes the swap to fail due to slippage.

What is the Amarok upgrade?

The Amarok upgrade is an upgrade for Connext to add arbitrary message passing support for cross-chain swap. This fast liquidity route allows routers to unlock a token in the destination chain immediately and then receive a token from Nomad later, and a new router workflow allows each router to cooperate to achieve maximum performance.

The Amarok upgrade is aimed to solve these Connext problems:

  1. The 30–120 minutes delay when cross-chain swapping
  2. The signing to claim problem
  3. Fund lockup risk
  4. Cannot send an arbitrary message with a cross-chain swap

Let’s dive deep into each problem and its corresponding solution.

The 30–120 minutes delay when cross-chain swapping

Before Amarok upgrade, a cross-chain swap request requires 1–4 Nomad’s message passing steps. Each step requires at least a 30 minutes delay due to fraud-proof windows. It summed up to at most 120 minutes delay that is ridiculously long. Nobody will tolerate waiting even 30 minutes to perform one swap. In the worst case, the price may spike or crash during that 30 minutes, which causes the swap to fail due to slippage.

Amarok upgrade solves this problem by allowing routers to execute cross-chain swap orders, unlock the required token in the destination chain immediately, and claim against Nomad later. This is the fast liquidity route feature of Connext.

But solving this problem comes at the cost of another new problem. Routers may race to become the first to execute the transaction and collect the fee, just like what MEV bots are doing. Losing routers will lose gas fees for nothing. To solve this problem, Connext built a new sequencer (not Nomad’s sequencer) to pack transactions into a batch and distribute work to each active router fairly.

For simplicity, new fast route cross-chain swapping flow works like this

  1. A user uses Connext UI to swap 1 ETH in Ethereum to 1500 USDC in Polygon with fast liquidity route enabled.
  2. Connext UI calculates call data in the background. Then the user confirms the transaction in Metamask.
  3. Connext’s sequencer picks up transactions with a fast liquidity route enabled and then packs them into a batch.
  4. Connext’s sequencer distributes batches to routers fairly.
  5. A router receives a batch from the sequencer. Then execute and unlock funds in the destination chain to recipients.
  6. That router waits 30–120 minutes for Nomad to process the swap as usual.
  7. After Nomad approved the swap, the router claimed the fund from Nomad.

These processes take an average of 2–3 minutes to unlock funds to the corresponding user, which is very fast compared to other bridge providers. In some cases, a complex swap route is used; it may take up to 6–8 minutes.

The signing to claim problem

Before the Amarok upgrade, Connext requires users to open their browser online until the cross-chain swap process has finished, as Connext requires users to sign multiple times. The most important one is the final signing to claim the token on the destination chain. Cross-chain swap process usually takes 30–120 minutes which is ridiculously long. Accidents are likely to happen during this period. If the user fails to sign a step, Connext will lock the fund for 72 hours.

After the Amarok upgrade, users aren’t required to sign anymore after they have confirmed their cross-chain swap transaction and paid the gas fee one time on the source chain. Consequently, users aren’t required to stay online during the swap process. In other words, the user can confirm the transaction and close the browser, and the fund will still be unlocked.

Fund lockup risk

Before the Amarok upgrade, funds can be locked for 72 hours if either user or router has failed to remain fully operational during the cross-chain swap process. If the user is offline, fails to sign during the swapping process, or the router is down during the swapping process, Connext will lock up the user’s fund.

After the Amarok upgrade, the signing to claim the problem has been solved, which means users can go offline after they confirm the transaction without getting their funds locked up. Moreover, the user doesn’t need to specify the exact router anymore. With a new sequencer, the router can be picked up automatically from a pool of available routers which means the router never goes offline. As a result, fund lockup risk is mitigated.

Cannot send arbitrary messages with cross-chain swap

Before the Amarok upgrade, Connext does not support any arbitrary message passing despite using Nomad’s message passing for its cross-chain swap.

After the Amarok upgrade, Connext has redesigned the connector so users can send their messages along with the swap information. As a result, Connext has supported not only cross-chain swap but also arbitrary message passing.

Conclusion

Amarok upgrade is an upgrade for Connext to solve the problems in the first version. The most important problem to solve is the 30–120 minutes delay when cross-chain swapping problem. It is solved by a fast liquidity feature that allows the router to immediately execute and pay the user for the cross-chain swap transaction and then claim the fund from Nomad later. This process takes 2–3 minutes on average, while it uses 30–120 minutes before the upgrade. This solution also solved the signing to claim problem and fund lockup risk problem. Finally, Connext has also enabled sending arbitrary messages with the cross-chain swap.

Read more