Intents
This page explains how intents and solving works within the Anoma protocol.
Last updated
This page explains how intents and solving works within the Anoma protocol.
Last updated
Intents, which are unbalanced transactions, can be become balanced transactions through composition with matching intents by other counterparties.
Anoma users submit their intents to an intent pool in the form of unbalanced transactions, which are received and processed by that output . These transactions are then ordered and finally sent to the executor node, which verifies and executes the transactions in the determined order, updating the state.
Below, we show examples of a balanced transaction that can directly be executed and two flavors of intents (unbalanced transactions) requiring counterparty discovery.
Alice and Bob own apple ๐ and banana ๐ resources. Both want to swap their fruits and know exactly what they want. Both don't need to know each other.
"I want to give 3๐ for 2๐."
3๐โAlice
2๐โAlice
"I want to give 2๐ for 3๐."
2๐โBob
3๐โBob
Anyone seeing the two transactions (including Alice and Bob themselves) can compose the unbalanced transactions to obtain a balanced transaction containing two actions.
3๐โAlice
2๐โAlice
2๐โBob
3๐โBob
After execution,
Alice has swapped her 3๐โAlice resource for a 2๐โAlice resource,
Bob has swapped his 2๐โBob for a 3๐โBob resource.
This outcome is equivalent to two balanced transactions (see the previous tab) where both, Alice and Bob, transfer resources to one another.
Sally took 1๐ and 1๐ for her services. If she is taking too much for herself, users might decide to not let her settle their intents anymore (see the ).