Nomad Docs
  • Nomad 101
    • Funds Recovery
    • Introduction
    • Our Mission
    • Getting Started
  • The Nomad Protocol
    • Overview
    • Cross-chain Messaging
      • Lifecycle of a Message
    • Verification Mechanisms
      • Background on Verification
      • Native Verification
      • External Verification
      • Optimistic Verification
      • Comparing Mechanisms
    • Security
      • Root of Trust
        • Fraud
          • Optimistic Timeout Period
          • Fraud Recovery
        • App-Governed Root of Trust
        • Liveness Assumptions
      • Attack Vectors
        • Key Compromise
        • Economic Attacks
        • Smart Contract Bugs
      • Long-Term Security
        • Permissionless Watchers
        • Financial Controls
        • Cross-Domain MEV
    • Smart Contracts
      • Home
      • Replica
      • XAppConnectionManager
    • Off-chain Agents
      • Updater
      • Watchers
      • Relayer
      • Processor
  • Token Bridge
    • Overview
    • How to Bridge
      • Using Etherscan
      • Nomad Bridge App
      • Testnet Bridge App
    • Asset Issuers
      • Custom Representations
    • Deployed Tokens
      • Mainnet
      • Testnet
    • Smart Contracts
      • BridgeRouter
      • TokenRegistry
      • BridgeToken
      • BridgeMessage
    • Architecture
    • FAQ
  • Governance Bridge
    • Overview
    • Zodiac: Nomad Module
    • Smart Contracts
      • NomadModule
    • Architecture
  • Developers
    • Quickstart
      • Send Messages
      • Receive Messages
    • Environments
      • Domain (Chain) IDs
    • Application Developers
      • Building xApps
      • SDK
        • Contracts SDK
        • Typescript SDK
      • Examples
        • Ping Pong
        • Example Bridge GUI
        • xApp Example
      • Advanced
        • Router Pattern
    • Node Operators
      • Running Agents Guide
        • Troubleshooting
      • Running a Watcher
      • Agent Operations
      • Agent Gas Values
      • The Keymaster
    • Core Developers
      • Upgrade Setup
      • Deploying Contracts
        • Development
        • Production
  • Operational Security
    • Audits
    • Bug Bounty
    • Governance
    • Contracts
    • Agent Operations
  • Resources
    • Awesome Interoperability
    • Brand Kit
    • FAQ
    • Glossary
    • GitHub
    • Discord
    • Twitter
    • Website
Powered by GitBook
On this page
  1. Developers
  2. Application Developers

Building xApps

PreviousApplication DevelopersNextSDK

Last updated 2 years ago

A xApp (pronounced "zap") is a cross-chain application built on top of the .

Nomad sends messages from one chain to another in the form of raw bytes. A xApp that wishes to use Nomad will need to define the rules for and messages for its use case.

Each cross-chain application must implement its own messaging interface. By convention, we call the contracts that implement this protocol the application's Router contracts. These Router contracts must:

  • Maintain a permissioned set of the contract(s) on remote chains from which it will accept messages via Nomad — this could be a single owner of the application on one chain; it could be a registry of other applications implementing the same rules on various chains

  • Maintain a permissioned registry of connections via the XappConnectionManager contract (see ).

  • Encode messages in a standardized format, so they can be decoded by the Router contract on the destination chain

  • Handle messages from remote Router contracts

  • Dispatch messages to remote Router contracts

By implementing these pieces of functionality within a Router contract and deploying it across multiple chains, we create a working xApp using a common language and set of rules. Applications of this kind may use Nomad message passing channels as the cross-chain courier for sending and receiving messages between chains.

Connection Management

The router implements the abstract contract. This contract provides convenience functions for working with a .

The XCM is the primary permissioning point for channels. It provides functions by which

  • xApp administrators can enroll or unenroll Replica contracts for inbound messages

  • xApp administrators can enroll or unenroll a Home contract for outbound messages

  • xApp administrators can permission or de-permission watchers

  • watchers can unenroll Replica contracts

When deploying a xApp Router, the xApp administrators must select an existing XappConnectionManager, or deploy their own. The address of the XappConnectionManager must be passed to the router's initialization method.

Nomad Protocol
sending
receiving
XappConnectionClient
XAppConnectionManager
Connection Management