Confidential Cross-Chain Bridging with TRAIN Protocol

Title

Integrating Aztec L2 into the TRAIN Protocol: A Trustless and Permissionless Intent-Based Bridging

Contact Details

tg:bot_insane, a[at]layerswap[dot]io

Summary

The TRAIN Protocol uses an intent/solver based system secured by Atomic Swaps and Local Verification (e.g. Light Client running inside a browser). This ensures uniform, trustless security across all chains.

The TRAIN protocol is already live on Ethereum, Optimism, Base, Arbitrum, zkSync, and Starknet mainnets. You can find it here: https://app.train.tech.

Start and End Date

The integration of Aztec into TRAIN has already begun, including the implementation of PreHTLC smart contracts and solver infrastructure. We plan to have a working demo on testnets by the end of April.

About You

TRAIN Protocol was created by the team behind Layerswap, one of the first cross-chain bridges. With over two years of experience operating a bridge, we have built best-in-class infrastructure to navigate the unpredictable cross-chain environment. Layerswap supports 55+ networks and has processed more than 3 million transactions, totaling over $1 billion in volume.

Details

  • We plan to demonstrate confidential and public bridging to and from Aztec on https://testnet.train.tech. Users will be able to bridge assets to and from all supported networks, including L2s and L1s such as Starknet, Solana, zkSync, and Ethereum.
  • We are integrating Aztec into an already existing intent-based bridging protocol called TRAIN.

How the design will meet the requirements?

  • Trustless cross-chain swaps
  • Supports both public and private bridging (in and out)
  • Connects to all L2s (including other altVMs), as well as to L1s

The user flow and journey

It’s going to be the same as for other networks; most of the technical complexity is handled behind the scenes. For the current flow, try it at https://app.train.tech.

How the design will meet the requirements

This is the core process of the TRAIN PreHTLC swaps, with notes on how it will look for Aztec.
Let’s assume the swap is from Arbitrum to Aztec.

  1. User Commit:
    • The User creates a PreHTLC, committing funds to a chosen Solver (or a set of Solvers)
    on the source chain.
    • This commitment has no hashlock, only a timelock.
  2. Solver Lock:
    • The Solver detects this PreHTLC.
    • The Solver generates a random secret S.
    • Computes the hashlock = HASH(S).
    • Locks funds (minus the Solver fee) for the User on the destination chain.

Aztec modification: This lock should be private, represented by a private note for the user, which the user can decrypt.

  1. User AddLock:
    • The User observes the Solver’s transaction on the destination chain.
    • Retrieves the hashlock.
    • Converts their PreHTLC into a standard HTLC (using the hashlock) on the source chain
    and confirms the final Solver if multiple Solvers were specified during the commitment.

Aztec modification: The user will receive the private note and decrypt it in the dApp.

  1. Unlocks:
    • The Solver releases the User’s funds on the destination chain by revealing S.
    • The Solver then claims its funds on the source chain using S.

This is the general idea. We are still experimenting with various ways to design/implement it. There are some challenges to address, particularly regarding the need to reveal S publicly without exposing the receiver.

What routes will be supported?

Once the PreHTLC is implemented in Aztec, it will be connected to all networks supported by TRAIN (currently Ethereum, OP Stack chains, Starknet, Fuel, and Solana).

How much grant are you looking for?

We are requesting a $50,000 grant to:

  • Design and implement PreHTLC contracts for Aztec
  • Integrate Aztec Network into the Solver
1 Like