Transactions
This page introduces transactions transitioning the Anoma state upon execution.
Transactions transition the Anoma state by consuming and creating resources when they are executed.
Transaction Delta
Transactions with equal quantities of created and consumed resources of the same kind are called balanced. A balanced transaction has a delta value of 0. Furthermore, a transaction is valid if all resource logic and compliance proofs are valid (see the Anoma resource machine). Only transactions which are both balanced and valid can be executed.
Nodes send balanced transactions to a transaction mempool, where they can be picked up by a block producer that verifies and executes the transactions in the determined order, thus updating the state.
A transaction with a non-zero delta value is called unbalanced. Unbalanced transactions are intents and require counterparties to add consumed and created resources to the transaction to balance it.
Applications provide so-called transaction functions as part of their interface to create transaction objects.
Test your understanding about balanced transactions by completing the exercise below.
Is the transaction balanced? Answer for each row.
2🍏
2🍏
2🍏
1🍏 + 1🍏
1🍏
1🐚
2🍏 + 1🐚
1🍏 + 2🐚
2🍏 + 1🐚
1🍏 + 1🍎 + 1🐚
1🍏 + 2🍎 + 2🍎 + 3🐚
1🍏 + 4🍎 + 1🐚 + 2🐚
Next, we will look at the transaction object data structure in detail.
Last updated