Skip to content

Orderless Transactions

As outlined in AIP-123 (FAQ), orderless transactions execute without a sequence number. This is useful when multiple machines submit from a single sending account and the order of submission does not matter.

Replay is protected by a nonce. The blockchain stores (sender, nonce) pairs for committed orderless transactions from the last 60 seconds. A transaction executes only if that pair is unused, and orderless transactions expire after at most 60 seconds — shorter than sequence-number transactions.

Both accounts with an on-chain 0x1::account::Account resource and stateless accounts can send orderless transactions.

Orderless transactions use the extra payload fields specified in AIP-129.

  1. Build a transaction with a unique replayProtectionNonce (a random u64) and the Move entry function you want to call.
  2. Sign and submit the transaction as usual. The nonce replaces the sequence number for replay protection.

The nonce does not order transactions. It only ensures a transaction cannot execute twice with the same nonce before it expires.

Pass replayProtectionNonce in the transaction options:

const transaction = await aptos.transaction.build.simple({
sender: sender.accountAddress,
data: {
function: "0x1::aptos_account::transfer",
functionArguments: [destination.accountAddress, 100],
},
options: {
replayProtectionNonce: 12345n,
},
});

You can combine orderless replay protection with sponsored transactions and encrypted pending transactions.

Each official SDK documents orderless transactions and ships a tested example: