LTO Network
  • Getting started
  • What is LTO Network?
  • Tutorials
    • Buying and staking LTO
      • Exchanges
        • Binance
        • AscendEX (Bitmax)
        • Uniswap
        • PancakeSwap
        • Other exchanges
      • Creating your LTO web wallet
      • Using the LTO token bridge
      • Staking LTO tokens
    • Mining
      • Setup your node wallets
      • Node management
      • Public community nodes
    • Anchoring
      • Hashing
    • LetsFlow
  • Wallets
    • LTO Web Wallet
      • Using Ledger
    • Universal Wallet
    • LTO CLI
    • Third-Party Wallets
      • Stakely.io wallet
        • Web wallet
        • Commandline
    • ERC20 Token Swap
  • Running a node
    • Public node
      • Installation Guide
        • Mainnet & Testnet
        • Requirements
        • Configuration
        • (Virtual) Machine
        • Nginx reverse proxy (optional)
        • Troubleshooting FAQ
      • Cloud installation
        • Alibaba Cloud
        • AWS Elastic Beanstalk
        • Google Cloud
        • IBM Cloud
        • Microsoft Azure
        • OKD (OpenShift)
        • Raspberry Pi (Expert)
        • Ubuntu Linux with Container
        • Windows with Container
      • REST API
        • Address
        • Wallet
        • Lease Transactions
        • Peers
        • Blocks
        • Utils
        • FAQ
      • Security Notes
      • FAQ
      • Exchange integration guide
    • Anchor node
      • Installation Guide
        • Linux
        • MacOS
        • Windows
      • REST API
    • Identity node
      • Installation guide
        • Linux
        • MacOs
        • Windows
      • Configuration
        • Trust network
      • REST API
    • Workflow node
      • Installation Guide
        • MacOS
        • Windows
        • Ubuntu Linux
      • REST API
  • Ownables
    • What are Ownables?
    • Making your first ownable
    • Ownables SDK
      • Prerequisites
      • Setup
    • Ownables Architecture
      • Smart Contract
      • Widget
    • Ownables Bridge
  • Templates Overview
  • Libraries
    • JavaScript
      • Accounts
      • Transactions
      • Event chain
      • Messages
      • Identities
      • HTTP Authentication
    • Python
      • Accounts
      • Public layer
    • PHP
      • Accounts
      • Identities
      • Public layer
      • Private layer
      • HTTP Authentication
      • Commandline scripts
    • Java
  • Protocol
    • Cryptography
    • Accounts
      • ED25519
      • secp256k1
      • secp256r1
    • Identities
      • Decentralized identifiers (DID)
      • Trust network
      • Verifiable credentials
    • Public layer
      • Transactions
        • Transfer
        • Lease
        • Cancel Lease
        • Mass Transfer
        • Set Script
        • Data
        • Anchor
        • Association
        • Revoke Association
        • Sponsorship
        • Cancel Sponsorship
        • Register
        • Burn
        • Mapped Anchor
        • Statement
        • Certificate
      • Transaction fees
      • Consensus protocol
      • Activation Protocol
      • Data Structures
    • Private layer
      • Event chain
        • Event
      • Messaging
        • Sending messages
Powered by GitBook
On this page
  • Constraints
  • Fees
  • Binary schema
  1. Protocol
  2. Public layer
  3. Transactions

Mass Transfer

A Mass Transfer combines several ordinary Transfer transactions that share a single sender. Under the hood, it has a list of recipients, and an amount to be transferred to each recipient.

{
  "type" : 11,
  "version" : 3,
  "id" : "BG7MQF8KffVU6MMbJW5xPowVQsohwJhfEJ4wSF8cWdC2",
  "sender" : "3HhQxe5kLwuTfE3psYcorrhogY4fCwz2BSh",
  "senderKeyType": "ed25519",
  "senderPublicKey" : "7eAkEXtFGRPQ9pxjhtcQtbH889n8xSPWuswKfW2v3iK4",
  "fee" : 200000,
  "timestamp" : 1518091313964,
  "proofs" : [ "4Ph6RpcPFfBhU2fx6JgcHLwBuYSpn..." ],
  "attachment" : "59QuUcqP6p",
  "transfers" : [
    {
      "recipient" : "3HUQa6qtLhNvBJNyPV1pDRahbrcuQkaDQv2",
      "amount" : 100000000
    }, {
      "recipient" : "3HaAdZcCXAqhvFj113Gbe3Kww4rCGMUZaEZ",
      "amount" : 200000000
    },
    ...
  ]
}

It's easy to see how compact this transaction is compared to several Transfer transactions. Here we have a sequence of recipients and associated amounts, while sender, fee, timestamp, and signature occur just once.

Constraints

The maximum number of recipients in a single transaction is 100. There is no minimum recipient number. You can create a Mass Transfer Transaction with one or even zero recipients. In addition, restrictions that apply to Transfers apply here as well, such as you cannot send a negative amount and cannot send more than you have on your account.

Other than that, we've decided not to put any restrictions on transactions that are harmless, even if they may seem against common sense. For example, transfers to self are allowed, as well as zero-valued transfers. In the recipient list, a recipient can occur several times, this is not considered an error.

Fees

The Mass Transfer fee is made up of two amounts: a fixed one plus a per-recipient one. The fees are calculated as:

1 + 0.1 * N

where N is the number of recipients in the transaction. The total is rounded up to the nearest 100_000.

Binary schema

The binary data structure of the unsigned transaction.

#
Field Name
Type
Length

1

Transaction type

Byte (constant, value=11)

1

2

Version

Byte (constant, value=3)

1

3

Network id

Byte

1

4

Timestamp

Long

8

5

Sender's key type

KeyType (Byte)

1

6

Sender's public key

PublicKey (Array[Byte])

32 | 33

7

Fee

Long

8

8

Number of transfers (T)

Short

2

9

Recipient 1

Address (Array[Byte])

26

10

Amount 1

Long

8

...

11

Attachment length (N)

Byte

2

12

Attachment

Array[Byte]

N

  • Recipient and Amount are repeated for each transfer.

  • Network id can be obtained by taking the 2nd byte from the sender address.

  • Each key type has a numeric id in addition to the reference from the JSON.

  • Integers (short, int, long) have a big endian byte order.

#
Field Name
Type
Length

1

Transaction type

Byte (constant, value=11)

1

2

Version

Byte (constant, value=1)

1

3

Sender's public key

PublicKey (Array[Byte])

32

4

Number of transfers (T)

Short

2

5

Recipient 1

Address (Array[Byte])

26

6

Amount 1

Long

8

...

7

Fee

Long

8

8

Timestamp

Long

8

9

Attachment length (N)

Short

2

10

Attachment

Array[Byte]

N

  • Recipient and Amount are repeated for each transfer.

  • Integers (short, int, long) have a big endian byte order.

PreviousCancel LeaseNextSet Script

Last updated 1 year ago