Architecture

GasYard’s Bridge Workflow

  1. Router Contract: Users initiate a bridge request by sending native tokens to the liquidity pool.

  2. Liquidity Pool Contract: Users can add liquidity to receive wrapped tokens and can burn wrapped tokens to receive native tokens back. The actual transfer of liquidity during bridging is exclusively managed by the router contract, which is executed by the relayer.

  3. Settlement Chain (Manager Contract): Upon receiving any bridge request on any chain, the router contract emits an event. The maintainer key stored in GasYard's backend attests to this transaction on the chain for public visibility, along with a quote, which is monitored by the relayer and Stamper Nodes.

  4. Verifier Nodes: These nodes operate within our infrastructure, enforcing security rules and checks. They validate the source deposit transaction and confirm it to the relayer, enabling the relayer to proceed with the final transfer of liquidity to the user on the destination chain.

  5. Relayer: Operating in a secure, isolated environment, the relayer monitors events emitted by the settlement chain. Upon receiving confirmation from the Stamper Nodes, it executes the bridge request by calling the executeBridgeRequest function on the destination chain.

Roles and Responsibilities

  • Owner Role: From day one, the owner of the router, liquidity, and manager contracts will be a Gnosis Safe multisig wallet. The owner has the authority to modify all roles described below and can pause all contracts if necessary.

  • Maintainer Role: This role is responsible solely for submitting bridge requests on the settlement chain. The key for this role is securely held by the GasYard backend.

  • Verifier Role: Verifier addresses provide confirmation to the relayer by signing with a BLS signature. They are not linked to any contract on any chain. These addresses function as our 2FA keys for relayers. Even if the relayer key is compromised despite isolation, the verifier will not send the required confirmed signatures to execute the bridge request.

  • Relayer Role: This critical role involves executing bridge requests on the router contract on the destination chain. The relayer key is pivotal for the final transfer of liquidity.

Last updated