# Account Model

In AIA Chain, the state consists of objects known as "accounts," each with a unique 20-byte address. State transitions refer to the direct transfer of value and information between accounts. An AIA Chain account contains four fields:

* **Nonce**: A counter ensuring each transaction is processed only once.
* **Current AIA Balance**: The account’s current balance of AIA.
* **Contract Code** (if present): The code associated with the account.
* **Storage**: Defaulted to empty if unused.

AIA functions as the primary crypto-fuel within AIA Chain, primarily used for paying transaction fees. Generally, there are two types of accounts: externally owned accounts controlled by private keys and contract accounts controlled by their contract code. Externally owned accounts lack code, allowing holders to send messages by creating and signing transactions. In contrast, a contract account's code activates whenever it receives a message, enabling it to read and write to internal storage, send additional messages, or create contracts.

Notably, contracts within AIA Chain should not be perceived as something to be "fulfilled" or "obeyed." Instead, contracts act more like "autonomous agents" existing within the AIA Chain execution environment. Triggered by transactions or messages, contracts always execute specific code segments, directly managing their own AIA balance and key/value storage to track persistent variables.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aia-chain-1.gitbook.io/aialabs/technical-framework/core-architecture/account-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
