Atomic Transfers
Atomic Transfers offer a Layer-1 secure way to simultaneously transfer a number of assets among a number of parties. Specifically, many transactions are grouped together and either all transactions are executed or none of them are. This feature can be used for use cases such as matching funding, debt settlement, decentralized exchanges, and complex trades.
Reply to this thread with questions and feedback related to this new functionality!
The individual transactions within the group each pay their respective fees (there is no gas in Algorand).
They will each have separate transaction IDs, but each transaction will contain a field that references the group hash.
Here is an example of a group transaction where one account is sending 100 of asset ID 249 to the other account, and the other account is sending 1 algo in exchange. Note several things below. One is the fact that each transaction has its own fee paid for by the sender. Also note that each transaction has a grp field which indicates that it belongs to a group transaction (and would be invalid if sent alone).
These transactions are already signed so I can submit them to the network with goal rawsend. You will notice two different transaction IDs are committed.
liz@mac> goal clerk rawsend -f group.sig
Raw transaction ID JYUSFPWTVJECXZQV4JYVFOO6GATQ5CB467LLNNW5LFRW5X7AY2WQ issued
Raw transaction ID EMBPXE2KWDJUZVJV66USOQ6OJU7LA3CVDDSAFZTPTZCGZEEJAESQ issued
Transaction JYUSFPWTVJECXZQV4JYVFOO6GATQ5CB467LLNNW5LFRW5X7AY2WQ still pending as of round 268172
Transaction JYUSFPWTVJECXZQV4JYVFOO6GATQ5CB467LLNNW5LFRW5X7AY2WQ committed in round 268174
Transaction EMBPXE2KWDJUZVJV66USOQ6OJU7LA3CVDDSAFZTPTZCGZEEJAESQ committed in round 268174
If we take a look at the block they were committed in, you will see those two separate transactions with a shared group ID.
See screenshot below:
Hi Liz, Thanks for the explanation. It is very clear now. I think ./goal clerk inspect was the command I was looking for to read the file.
Is the web transaction explorer available for BetaNet transactions? I was able to successfully run the node and send transactions. Wanted to know how I can see the block transactions.
I know this is an ancient thread but I have a question related to transaction groups and this seems like an appropriate place to ask:
Is there any reason to not submit transactions as a group by default? ie. If there’s only a single transaction to submit, is there a disadvantage to assigning a group ID to it before submitting?