1LAYER Tech Documentation
  • Intro
  • 1LAYER AI
    • AI Cognitive Framework
  • 1LAYER DeFi
    • Smart Contract System
      • Flows
        • Swap Flow
          • Interchain Swap
          • Intrachain Swap
        • Vault Flow
      • Smart Contracts
        • Broadcaster Components Diagram
        • User Components Diagram
        • Admin Components Diagram
Powered by GitBook
On this page
  1. 1LAYER DeFi

Smart Contract System

This page contains the high-level architecture of 1LAYER protocol.

Previous1LAYER DeFiNextFlows

Last updated 3 months ago

Overall Structure: The architecture is divided into two main parts: the "Offchain" at the top and the "Onchain" represented by 2 networks on the bottom.

Offchain:

  • Frontend: The user interface of the system.

  • Data Provider Service: Provides information about the system to the front end.

  • Messaging Service: Handles cross-chain messages and passes them from network 1 to network 2.

  • Swap Executor: Executes swap when a message is delivered.

Messaging Service & Swap Executor can be 1 single service. However, the logic must be separated to allow further migration to a more complex cross-chain messaging protocol.

Admin Panel: Sets up and monitors the system.

Onchain:

  • Executor: Handles the execution of swaps.

  • Gateway: Serves as an entry point for cross-chain messaging.

  • OneLayer Gateway: A specific gateway for the 1LAYER system.

  • Vault (Stablecoin): A secure storage for stablecoins.

  • Swap Protocol (thirdparty): Handles the actual swap operations.

Page cover image