Atomic Transaction Groups
In traditional finance, trading assets generally requires a trusted intermediary, like a bank or an exchange, to make sure that both sides receive what they agreed to. On the Algorand blockchain, this type of trade is implemented within the protocol as an atomic transfer: every transaction in the group either succeeds or none of them do. Atomic transfers allow parties to exchange value without a trusted intermediary while still ensuring each side receives what was agreed.
On Algorand, atomic transfers are implemented as irreducible batch operations, where a group of transactions are submitted as a unit and the whole batch either passes or fails. This design can avoid more elaborate patterns—such as hashed timelock contracts (HTLCs) used on some other chains—for many coordination problems. An atomic transfer on Algorand is confirmed in the same time as any other transaction. A group may contain any mix of supported transaction types.
Use Cases
Section titled “Use Cases”Atomic transfers enable use cases such as:
-
Circular trades — Alice pays Bob if and only if Bob pays Claire if and only if Claire pays Alice.
-
Group payments — Everyone pays or no one pays.
-
Decentralized exchanges — Trade one asset for another without routing through a centralized exchange.
-
Distributed payments — Pay multiple recipients in one atomic unit.
-
Pooled transaction fees — One transaction covers fees for others in the group.
Process Overview
Section titled “Process Overview”To implement an atomic transfer, all participants first define the transactions that will move together. Those transactions are then grouped: each one receives the same group ID derived from the ordered set. Senders sign only their own transactions (possibly after the set is split for signing). Finally, a submitter broadcasts the full ordered group so the network can accept or reject it as a single unit.
The group ID is stored in the Group field on each transaction header. Anyone can rebuild the ordered set and recompute the ID to confirm the batch matches what signers approved. Order matters: the group ID depends on the exact sequence of transactions.
Try It in a Tutorial
Section titled “Try It in a Tutorial”This guide walk through building and submitting atomic groups step by step.
Additional Resources
Section titled “Additional Resources”- Hashed Timelock Contracts — overview of an HTLC pattern used on some other blockchains for atomic-style swaps across time and parties.