description |
---|
This page compares Anoma's resource model with the account and UTXO model. |
The advantages of the resource model are best understood by comparison with other widely used state models: the account model and the UTXO model.
Resource Model | UTXO Model | Account Model | |
---|---|---|---|
State Representation | Implicit | Implicit | Explict |
State Scope | Local, fragmented among resources | Local, fragmented among UTXOs | Global, unified across all accounts |
State Updates | Consumption & creation of resources | Consumption & creation of UTXOs | Direct modification of global state |
State Lookup | Aggregation of resources (e.g., by kind or owner) | Aggregation of UTXOs (e.g., by owner) | Direct lookup in the account |
Logic Predicates | Arbitrary logic per resource | The same logic for each UTXO | Arbitrary logic per account |
Apps | General application & intents | Limited applications (e.g., payments) | General applications |
App Distribution | Consumption & creation of resources | Consumption & creation of UTXOs | Account deployment to an address to each chain |
Used by | Anoma | Bitcoin, Zcash | Ethereum, Solana, Cosmos, Polkadot |
A transaction consuming and creating different resources of different kind in the resource model. | resource-model.png | ||
A transaction consuming and creating UTXOs in the UTXO model. | utxo-model.png | ||
A transaction updating the state in a smart contract in the account model. | account-model.png |