infrablockchain-docs
en
en
  • InfraBlockchain
    • Learn
      • Architecture
        • Architecture
        • Network Participants
        • Parachain
          • System Parachains
      • Protocol
        • System Token
        • Transaction Fee
        • Proof of Transaction
      • Substrate
        • Learn
          • Basic
            • Cryptography
            • Blockchain Basics
            • Consensus
            • Networks and Nodes
            • Blockchain Transaction
            • Transaction Life Cycle
            • Offchain Operations
            • Light Client
            • Rust for Substrate
            • Introduction to Library
            • Architecture and Rust Libraries
            • File Architecture
            • Accounts, Addresses, and Keys
            • Transaction Format
            • Blockchain Randomness
          • FRAME
            • FRAME Pallets
            • FRAME Macros
            • Custom Pallets
            • Pallet Coupling
            • Origin
            • Events and Erros
            • Runtime Storage
            • State Transitions and Storage
            • SCALE Encoding
            • Weight and Fee
            • Runtime API
            • Runtime Development
          • Account
          • Address Format
          • Glossary
          • CLI
            • Archive
            • Memory Profiler
            • Node Template
            • sidecar
            • srtool
            • Subkey
            • subxt
            • try-runtime
            • tx-wrapper
          • Runtime Development
            • Basics
              • Configure Genesis State
              • Configure Runtime Constants
              • Customize a Chain Spec
              • Import a Pallet
              • Use Helper Function
            • Consensus Model
              • PoW
              • Create a Hybrid Node
            • Offchain Worker
              • Request Offchain HTTP
              • Offchain Indexing
              • Offchain Local Storage
            • Pallet Design
              • Create a Storage Structure
              • Implement Lockable Currency
              • Incorporate Randomness
              • Loose Coupling
              • Tight Coupling
            • Parachain Development
              • Add HRMP Channel
              • Add Paranodes
              • Connect to a Local Relay Chain
              • Convert a Solo Chain
              • Prepare to Launch
              • Select Collator
              • Upgrade a Parachain
            • Storage Migration
              • Basics
              • Trigger Migration
            • Test
              • Basics
              • Test a Transfer Transaction
            • Tools
              • Create a TxWrapper
              • Use Sidecar
              • try-runtime
              • Verify WASM
            • Weigths
              • Benchmark
              • Calculate Fees
              • Use Conditional Weights
              • Use Custom Weights
        • Build
          • Decide What to Build
          • Build Process
          • Determinisitc Runtime
          • Chain Spec
          • Genesis Configuration
          • Application Development
          • RPC
          • Troubleshoot Your Code
        • Tutorials
          • Install
            • Developer Tools
            • Linux
            • macOS
            • Rust Toolchain
            • Issues
            • Windows
          • Quick Start
            • Explore the Code
            • Modify Runtime
            • Start a Node
            • Substrate Basics
          • Build a Blockchain
            • Add Trusted Nodes
            • Authorize Specific Nodes
            • Build a Local Blockchain
            • Simulate Network
            • Upgrade a Running Network
          • Build Application Logic
            • Add a Pallet
            • Add Offchasin Workers
            • Publish Custom Pallets
            • Specify Origin for a Call
            • Use Macros in a Custom Pallet
          • Integrate with Tools
            • Access EVM Accounts
            • EVM Integration
            • Explore Sidecar Endpoints
            • Integrate a Light Client Node
          • Smart Contracts
            • Strategy
            • Build a Token Contract
            • Develop a Smart Contract
            • Prepare Your First Contract
            • Troubleshoot Smart Contracts
            • Use Maps for Storing Values
      • XCM
        • XCM
        • XCM Format
    • Service Chains
      • InfraDID
      • InfraEVM
      • URAuth(Universal Resource Auth)
    • DevOps
      • Build
      • Deploy
      • Monitoring
      • Runtime Upgrade
    • Tutorials
      • Basic
        • How to Interact with System Token
        • How To Pay Transaction Fee
        • How To Vote with TaaV
        • Hot to Get Validator Reward
      • Build
        • Build InfraRelayChain
        • Build Parachain
        • Open Message Passing Channels
        • Transfer Assets with XCM
      • Test
        • Benchmark
        • Check Runtime
        • Debug
        • Simulate Parachains
        • Unit Testing
      • Service Chains
        • Play with InfraDID
          • Build
          • Add Keys
          • Add Service Endpoint
          • Create InfraDID
        • Play with InfraEVM
          • Build
          • Deposit and Withdraw Token
          • Deploy ERC20 Contract
          • Deploy ERC721 Contract
          • Deploy ERC1155 Contract
  • Newnal Data Market
Powered by GitBook
On this page
  • Bootstrap Stage
  • Registering System Tokens
  • Using Wrapped System Tokens
  • Stopping System Token Usage
  1. InfraBlockchain
  2. Tutorials
  3. Basic

How to Interact with System Token

This tutorial covers the process of registering and using system tokens in InfraBlockchain.

PreviousBasicNextHow To Pay Transaction Fee

Last updated 1 year ago

InfraBlockchain provides a differentiated blockchain system that uses system tokens as gas fees. The following content is organized to help developers easily understand and develop the process of registering, using, and disposing of system tokens. You can practice this content in .

Bootstrap Stage

Infra Blockchain Runtime has two runtime states. When the network is first started, it is in the Bootstrap stage, where the system token is not yet registered. There are limitations on the transactions that can be performed in the bootstrap stage.

List of transactions that can be performed:

  • Assets::create: Transaction to create a token

  • Assets::set_metadata: Transaction to set metadata for the created token

  • Assets::mint: Transaction to issue a token (at least one token that can be transacted must exist for registration)

  • InfraParaCore::request_register_system_token: Transaction to request registration of the system token

Notation _::_: The part before :: is the palette name, and the part after is the transaction name within the palette.

Registering System Tokens

Registration Request Process

  • Token Creation

  • Metadata Setting

  • Token Issuance

  • System Token Registration Request

    This transaction can be called by an approved account of the relay chain or the governance of the parachain itself.

    Event

    exp represents the expiration time for the registration request.

Once this event is confirmed, the information for the registration request is reflected in the relay chain, and the approval status is determined by the governance of the relay chain validators.

Relay Chain Governance Process

Get Exchange Rate Information

All system tokens are based on fiat currency, and exchange rate information must be reflected for registration to proceed. First, a data request is sent from the relay chain to the oracle node side through the requestExchangeRate transaction. This transaction is carried out through governance.

This transaction is a request for exchange rate data for the system token being used as a reference against the current system token that has been registered or the system token for which registration is requested. When the transaction is executed successfully, the relay chain requests data from the oracle node, and the following event occurs on the oracle node.

When exchange rate data is obtained from an external source, the following event occurs after the relay chain submits the data.

When the relay chain receives the data, it updates the exchange rate data for each fiat currency, and the following event occurs.

Register System Token

Governance Submission: The owner of the token submits relay chain governance to register the token as a system token.

Currency Type is an option when registering a relay chain token as a system token.

Extended Metadata is an option when additional metadata for the system token is desired.

Governance Vote: Relay chain validators participate in governance, and if more than 2/3 agree, the system token is registered.

When approved and registered as a system token, the following event occurs on the chain that issued the token, and the registration as a system token is completed.

End Bootstrap

Once the system token registration is completed, the bootstrap stage is completed, and it is possible to pay transaction fees with the system token. The relay chain performs a transaction to end the bootstrap stage for the chain.

dest represents the chain to end the bootstrap.

When the transaction is executed successfully, the following event occurs on the dest chain:

Using Wrapped System Tokens

Approval to Use Wrapped System Tokens: When you want to use system tokens as gas fees on another chain, you need to submit a governance proposal for using wrapped system tokens.

The para_id option below represents the chain id to use the wrapped system token.

Once approved, you can confirm that the wrapped system token is successfully registered in the ForeignAssets of the chain where you want to use it.

Even after registration is complete, the token can be used as a transaction fee by receiving it through XCM from the chain that issued the token.

Stopping System Token Usage

  • Action in Case of Problems: If there is a problem with the parachain or the system token, you can temporarily suspend or permanently delete the system token or the wrapped system token to prevent harm to the ecosystem.

    The suspension of the system token requires approval from governance, and once approved, the system token and the wrapped system token cannot be used as gas fees.

how-to-pay-transaction-fee
create_token
set_metadata
mint_token
request_register
request_register_event
request_exchange_rate
request_exchange_rate_event
exchange_rate_submit_event
exchange_rate_update_event
register_system_token
register_event
end_bootstrap
end_bootstrap_event
register_wrapped
suspend
derigster