> For the complete documentation index, see [llms.txt](https://docs.lazai.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lazai.network/data-anchoring-token-dat/concepts-and-architecture/dat-lifecycle-example.md). Agents can also search and read this documentation through its [MCP server](https://docs.lazai.network/~gitbook/mcp).

# DAT Lifecycle Example

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfSqf8H4pIdgfoD3qQdDZS6n4tsL0_exWI-cjdtUjDsG9xdvuLAk-rFN0e_H5W2-Uf70bQt7CdZ13v4zJAr6pl03tWAIlK1KhdTp25oOsAJcSY8AdDAj6UlYuv5pKUoRx5jS3r3?key=S_AVxe4Pa4t7GMdXHRa1L20C" alt=""><figcaption></figcaption></figure>

#### Step 1: Create Class (AI Asset Category)

`createClass(`

&#x20; `1,`

&#x20; `"Medical Dataset",`

&#x20; `"Open-source dataset for disease classification",`

&#x20; `"ipfs://metadata/med-dataset-class"`

`)`

#### Step 2: Mint DAT Token (Bind & Issue Asset)

`mintDAT(`

&#x20; `user1,`

&#x20; `1,`           // classId: Medical Dataset

&#x20; `1000 * 1e6,`        // value: 1000 (6 decimals)

&#x20; `500,`              // shareRatio: 5%

&#x20; `0`                // expireAt: never expires

`);`

💡 **Option:** Mint multiple DATs to simulate multi-user ownership

#### Step 3: Service Payment (Agent Invocation)

`transferValue(user1TokenId, agentTreasuryTokenId, 100 * 1e6);`

* `agentTreasuryTokenId` may be a treasury contract address
* Supports “pay-as-you-use” or delegated billing models

#### Step 4: Revenue Share Demonstration (Future Extension)

Assume an agent earns 10 USDC:

`agent.payToDATHolders(classId, 10 USDC);`

* Contract calculates each DAT’s shareRatio
* Distributes revenue proportionally

#### Step 5: Token Expiration (Optional)

`require(block.timestamp < dats[tokenId].expireAt, "Token expired");`

Used for subscription-based AI services or time-bound licenses


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lazai.network/data-anchoring-token-dat/concepts-and-architecture/dat-lifecycle-example.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
