Developer Center

Developer Center

  • Getting Started
  • Built-in Features
  • REST API Endpoints
  • Guides
  • Cheat Sheet

›Built-in Features

Getting Started

  • What is Sirius Chain
  • Setting up your workstation
  • Writing your first application

Built-in Features

  • Account
  • Mosaic (SDA)
  • Namespace
  • Transfer Transaction
  • Aggregate Transaction
  • Multisig Account
  • Metadata
  • Account Restriction
  • Cross-Chain Swaps
  • Exchange Market
  • Decentralized Exchange Market
  • Liquidity Provider
  • Storage

Protocol

  • Node
  • Block
  • Cryptography
  • Transaction
  • Validating
  • Consensus Algorithms
  • Receipt
  • Inflation

REST API

  • Overview
  • Tools
  • Serialization
  • Websockets
  • Status Errors

SDKs

  • Overview
  • Architecture
  • Languages
  • Extending Sirius Chain Capabilities
  • SDK Development
  • SDK Documentation

Wallets & Explorers

  • Wallets & Explorers

Cheat Sheet

  • Sirius Chain Cheat Sheet

Guides

  • Overview
  • External Guides
  • Account

    • Creating and opening an account
    • Getting account information
    • Getting the amount of XPX sent to an account
    • Reading transactions from an account

    Account Restriction

    • Preventing spam attacks with account restrictions

    Aggregate Transaction

    • Sending payouts with aggregate-complete transaction
    • Creating an escrow with aggregate bonded transaction
    • Asking for mosaics with aggregate-bonded transaction
    • Signing announced aggregate-bonded transactions

    Block

    • Listening to New Blocks
    • Getting block by height

    Cross Chain Swaps

    • Atomic cross-chain swap between Sirius public and private chains

    Metadata

    • Account Metadata
    • Mosaic Metadata
    • Namespace Metadata
    • Account Metadata (Deprecated since 0.7.0 Sirius Chain release)
    • Mosaic Metadata (Deprecated since 0.7.0 Sirius Chain release)
    • Namespace Metadata (Deprecated since 0.7.0 Sirius Chain release)

    Monitoring

    • Monitor transaction

    Mosaic

    • Creating a mosaic (SDA)
    • Getting the mosaic information
    • Getting the asset identifier behind a namespace with receipts

    Mosaic Levy

    • Modifying Mosaic Supply

    Multisig Account

    • Converting an account to multisig
    • Modifying a multisig account
    • Creating a multi-level multisig-account
    • Sending a multisig transaction

    Namespace

    • Registering a namespace
    • Registering a subnamespace
    • Getting the Namespace information
    • Linking a namespace to a mosaic
    • Linking namespace to account

    Transfer Transaction

    • Transfer transaction
    • Sending an encrypted message

    Storage

    • Data Modification Cancel
    • Data Modification
    • Download Channel
    • Download Payment
    • Drive Closure
    • Finish Download Channel
    • Prepare Bc Drive
    • Replicator Offboarding
    • Replicator Onboarding
    • Storage Payment
    • Verification Payment

Storage

  • Overview
  • Participate
  • External Economy
  • Roles
  • Verification
  • Challenge
  • Rewards
  • Transaction Schemas
  • Built-In Features

    • Drive
    • Replicator
    • Verifier
    • Supercontracts

    Protocols

    • Cross-Block Protocol
    • Fair Streaming

    Storage User Application

    • Overview
    • Getting Started
    • Managing Drives
    • Managing Drive Files
    • Downloading Data

Decentralized Exchange Market

Overview

A user can create an SDA-SDA offer through the Sirius Chain Decentralized Exchange Market.

Note

It is not possible to exchange services mosaics such as Review, SO, SM and SC.

SDA-SDA Exchange

The decentralized exchange mechanism involves automatically exchanging whole units of Sirius Digital Assets (SDAs).

This feature can be used only when fast finality is enabled, and NXT PoS is disabled. It comes with the following constraints:

  1. An offer that exchanges with the same unit types cannot be placed. For example, it is not allowed to place an offer to exchange SDA1 units with SDA1 units.
  2. More than 1 offer that exchanges with the same unit types cannot be placed. For example, it is not allowed to place two offers to exchange SDA1 units with SDA2 units even with different amounts.
  3. Offers containing 0 units cannot be placed. For example, it is not allowed to place an offer to exchange a. 0 SDA1 units with 0 SDA2 units, b. 0 SDA2 units with 25 SDA1 units, or c. 25 SDA2 units with 0 SDA1 units.
  4. The mosaic must not expire during the duration of the offer. Note: SDA1 and SDA2 are examples. These units do not exist.

How SDA-SDA Offers Are Automatically Exchanged

The offers of the Sirius Digital Assets are exchanged based on the sorting policy and presence of matching offers in the blockchain. Sorting policy is the order in which the offers will be exchanged. Matching offers are offers which match the ratio of the exchange.

There are 6 Sorting Policies, whereby the sorting policy needs to be set in the config-network.properties of the node.

  1. Default or 0: no sorting, exchange with the matched existing offers as it is from the list.
  2. SmallToBig or 1: sort matched existing offers from the smallest to the biggest amount being offered.
  3. SmallToBigSortedByEarliestExpiry or 2: sort matched existing offers from the smallest amount being offered & earliest Duration to the biggest amount being offered & latest Duration.
  4. BigToSmall or 3: sort matched existing offers from the biggest to the smallest amount being offered.
  5. BigToSmallSortedByEarliestExpiry or 4: sort matched existing offers from the biggest amount being offered & earliest Duration to the smallest amount being offered & latest Duration.
  6. ExactOrClosest or 5: sort matched existing offers from the closest amount being offered with the amount being exchanged.

Example Use Case

  1. Alice has SDA1 and wants to swap it for SDA2. Alice places an offer X SDA1 for Y SDA2. Alice’s SDA1 balance = current balance - X
  2. Bob has SDA2 and wants to swap it for SDA1. Bob places P SDA2 for Q SDA1. Bob’s SDA2 balance = current balance - P
Alice - Balance: SDA1 1000, SDA2 100Bob - Balance: SDA2 1000, SDA1 1000
Offers 100 SDA1 for 10 SDA2Offers 20 SDA2 for 200 SDA1
Lock Amount: SDA1 1000-100 = 900Lock Amount: SDA2 1000-20 = 980

Exchange Formula: P/Q = Y/X

Bob SDA1/SDA2 = Alice SDA1/SDA2, and when applied, it is 200/20 = 100/10

  1. Bob’s SDA1 balance = current balance + (Q <= X ? Q : X)
  2. Alice’s SDA2 balance = current balance + (P <= Y ? P : Y)
Alice - New BalanceBob - New Balance
SDA1 900SDA2 980
SDA2 100+10=110SDA1 1000+100=1100

Schemas

PlaceSdaExchangeOfferTransaction

Announces a new SDA-SDA exchange place offer transaction.

Version: 0x01

Entity type: 0x416A

PropertyTypeDescription
PlaceSdaOfferarray(SdaOfferWithDuration, count)A new offer that will be announced

RemoveSdaExchangeOfferTransaction

Announces a new SDA-SDA exchange remove offer transaction.

Version: 0x01

Entity type: 0x426A

PropertyTypeDescription
RemoveSdaOfferarray(SdaOfferMosaic, count)Offers that will be removed

SdaOfferWithDuration

PropertyTypeDescription
MosaicGiveUnresolvedMosaicMosaic to be given for the exchange.
MosaicGetUnresolvedMosaicMosaic to be gained from the exchange.
Durationuint64The duration of the offer.

SdaOfferMosaic

NameValueDescription
AssetIdGiveUnresolvedMosaicId or NamespaceIdMosaicId of the offer to be given for the exchange.
AssetIdGetUnresolvedMosaicId or NamespaceIdMosaicId of the offer to be gained from the exchange.
← Exchange MarketLiquidity Provider →
  • SDA-SDA Exchange
  • How SDA-SDA Offers Are Automatically Exchanged
    • Example Use Case
    • Exchange Formula: P/Q = Y/X
  • Schemas
    • PlaceSdaExchangeOfferTransaction
    • RemoveSdaExchangeOfferTransaction
    • SdaOfferWithDuration
    • SdaOfferMosaic
  • Follow our profile
  • Ask development questions
  • Join our Discord channel
  • Explore our Youtube channel
  • Explore Github
Protocol
BlockConsensus AlgorithmsCryptographyInflationNodeReceiptTransactionValidating
Built-in Features
AccountAggregate TransactionCross-Chain SwapsExchange MarketDecentralized Exchange MarketMetadataMosaicMultisig AccountNamespaceTransfer TransactionStorageLiquidity Provider
References
REST APISDKsCheat Sheet
Includes Documentation Forked from NEM
Copyright © 2025 Sirius Chain