BandChain Documentation

website·Indexed 34 days ago

https://docs.bandchain.org

Developer and operator guides for BandChain, featuring documentation on the Band Verifiable Random Function (VRF), Threshold Signature Scheme (TSS), and Oracle Binary Encoding (OBI). Includes technical specifications for the signaling hub, concurrent price streams, and instructions for setting up validator nodes on the Laozi Mainnet and testnets, as well as guides for staking, delegating, and using developer tools like BandChain.js and pyband.

Tokens
60.3K
Snippets
226
Records
388
Agent score
70%

What's inside BandChain

  1. Overview of Yoda for BandChain Validators

    Yoda is a program that allows BandChain validator nodes to automatically fulfill data requests. It eliminates the need for validators to manually send MsgReportData transactions by automatically querying data providers via data source scripts and submitting the results to the network.

    Yoda runs as a separate process alongside the main BandChain daemon. To maintain security, it uses a dedicated 'reporter account' (private key) owned by the validator. This ensures that if the Yoda server is compromised, the validator's primary private key remains secure, and it allows for 24/7 automated operation which is not feasible with hardware wallets.

  2. Overview of IBC Hook Route

    The IBC Hook Route is an extension of the IBC Route used to transmit tunnel packet data from BandChain to other Cosmos SDK-based blockchains. Unlike standard IBC Routes, the IBC Hook Route uses ICS-20 token transfers to interact directly with WASM contracts on the destination chain, allowing smart contracts to receive and integrate real-time price data.
  3. Overview of BandChain.js capabilities

    BandChain.js is a TypeScript library for interacting with BandChain and Cosmos SDK blockchains. It provides three primary functional areas:

    1. Query Client: Supports REST and gRPC-web (HTTP/1.5 or HTTP/2 via proxy) to access Band Protocol-specific data (oracle requests, price feeds, TSS) and standard Cosmos modules (bank, staking, governance). It is cross-platform, supporting Node.js and browsers.
    2. Message Composer: Allows for type-safe construction of multi-message transactions. It supports two patterns: fromPartial (message data only) and withTypeUrl (complete protobuf messages). It covers Band Protocol modules (oracle, feeds, tss, tunnel) and Cosmos SDK modules (bank, staking, governance, distribution, authz).
    3. Transaction Management: Integrates with Cosmos wallets (Keplr, Cosmostation, WalletConnect), supports online/offline signing, and provides automatic gas estimation and fee calculation.
  4. Overview of IBC Tunnel Routes

    The IBC Route is used to transmit tunnel packet data from BandChain to other Cosmos SDK-based blockchains. To receive this data on the destination chain, developers can choose one of two implementation paths: 1) Core Application Implementation, which requires updating the chain's core logic to support the IBC tunnel via the OnRecvPacket function, or 2) WASM Contract Implementation, which requires the destination chain to support WASM contracts.
  5. Overview of Band and BandChain

    Band is a unified data layer that aggregates and connects real-world data and APIs to AI and smart contracts. It is powered by BandChain, a Cosmos-SDK-based blockchain designed for compatibility with most smart contract and blockchain development frameworks. BandChain offloads the monitoring and processing of price data from destination smart contract platforms to prevent network congestion and high transaction fees, allowing the same data points to be verified efficiently across multiple blockchains.
  6. Overview of Owasm Library Structure

    Owasm (Oracle WebAssembly) is Band's Domain Specific Language (DSL) used for writing data scripts within the BandChain ecosystem. The library is split into two primary components:

    1. owasm-vm: Implements a Wasmer virtual machine runtime and the logic required for the on-chain execution of data scripts.
    2. owasm-kit: A toolkit for developing data scripts, containing the Owasm Environment Interface (OEI) and extension modules.
  7. Overview of BandChain TSS Route

    The TSS Route is a tunnel mechanism used to transmit tunnel packet data from BandChain to EVM-compatible chains. It allows developers to create smart contracts on destination chains that receive and integrate real-time price data from BandChain via the Tunnel Router bridge.
  8. Overview of BandChain Cylinder

    Cylinder is a program that automates the submission of group creation information and signatures for TSS (Threshold Signature Scheme) members on BandChain. It replaces the manual process of sending transactions, providing an event-driven mechanism to handle signing and submission concurrently. To enhance security, Cylinder uses 'grantee accounts' (additional wallet private keys) to submit transactions. This ensures that if the Cylinder server is compromised, only the grantee account is exposed, while the member's main private key (ideally stored in a hardware wallet) remains secure.
  9. Overview of Oracle WebAssembly (Owasm)

    Oracle WebAssembly (Owasm) is a Domain Specific Language (DSL) built on Rust used for writing data scripts within the BandChain ecosystem. It is organized into two primary modules:

    1. owasm/oei: The Owasm Environment Interface. It defines functions accessible to a data script during execution to interact with the host environment.
    2. owasm/ext: The extension module. It provides utility functions for data scripts, such as calculating mean, median, and majority values from validator reports during the aggregation phase.
  10. Overview of BandChain Router Route

    The Router Route uses IBC hooks and the Router Bridge Protocol to transmit packet data from BandChain to other EVM-compatible chains. This allows developers to create smart contracts on destination chains that receive and integrate real-time price data from BandChain.
  11. Overview of the BandChain TSS Signing Process

    The Threshold Signature Scheme (TSS) on BandChain allows a decentralized group of signers to collectively generate digital signatures. This ensures that no single participant possesses the full private key, providing security, decentralization, and fault tolerance during transaction signing.
  12. Overview of BandChain V3 Threshold Signature Scheme (TSS)

    BandChain V3 includes a native Threshold Signature Scheme (TSS) implemented via the bandtss module. TSS allows a group of participants to collaboratively generate and manage signatures without any single party possessing the full private key. This approach provides several advantages over traditional multi-signature methods: it requires minimal computation and gas for data verification, eliminates single-point failures, and enhances network resilience. The system is primarily used to request TSS signatures to verify BandChain data on external blockchain systems and incentivizes participant involvement through fee distribution.