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.
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:
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.
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.
Last updated