> For the complete documentation index, see [llms.txt](https://polytrade.gitbook.io/rwa-marketplace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://polytrade.gitbook.io/rwa-marketplace/features/dlt-token-standard-erc-6960/structure-and-subid-types.md).

# Structure & SubId Types

## DLT Structure

* **mainId:** Represents the primary asset type (e.g., property, invoice, or vehicle).
* **subId:** Represents the unique attributes or variations of the asset (e.g., percentage share, due date, or color).

<figure><img src="/files/dK3oCis8LWjMKKccEfki" alt="DLT Standard Structure" width="375"><figcaption><p>DLT Standard Structure</p></figcaption></figure>

### Examples

#### 1. Real Estate Platform with Fractional Ownership:

* ERC20: 🏠🏠🏠 (All houses are the same and interchangeable)
  * Problem: ERC20 cannot represent unique houses with different values or attributes.
* ERC721: 🏠🏡🏚 (Each house is unique and non-interchangeable)
  * Problem: ERC721 cannot represent fractional ownership of a house.
* ERC1155: 🏠🏡🏚 (Both unique houses and interchangeable parts)
  * Problem: While ERC1155 can represent both unique houses and fractional ownership, it lacks the efficient, built-in management of these two types of assets within the same contract.
* DLT: 🏠(1)🏡(2)🏚(3) 🔑(A)🔑(B)🔑©
  * Solution: DLT can represent unique houses (`mainId`) and fractional ownership (subId) efficiently within the same contract, allowing for a more versatile real estate platform.

#### 2. Invoice Factoring for SMEs:

* ERC20: 💼💼💼 (All invoices are the same and interchangeable)
  * Problem: ERC20 cannot represent unique invoices with different values or due dates.
* ERC721: 💼📁🗂 (Each invoice is unique and non-interchangeable)
  * Problem: ERC721 cannot represent fractional ownership of an invoice or its individual components.
* ERC1155: 💼📁🗂 (Both unique invoices and interchangeable parts)
  * Problem: While ERC1155 can represent both unique invoices and fractional ownership, it lacks the efficient, built-in management of these two types of assets within the same contract.
* DLT: 💼(1)📁(2)🗂(3) 💵(A)💵(B)💵©
  * Solution: DLT can represent unique invoices (mainId) and individual invoice components or fractional ownership (subId) efficiently within the same contract, allowing for a more versatile invoice factoring platform for SMEs

## SubId Types

DLT (DualLayerToken) is a flexible token standard that manages different types of digital assets (`mainIds`) and their attributes or variations (`subIds`). **SubIds can be used in two ways, with each subId having a specific quantity:**

## Shared SubIds

All `mainIds` share the same set of subIds.

**Example:** ![:iphone:](https://a.slack-edge.com/production-standard-emoji-assets/14.0/apple-medium/1f4f1.png) Smartphone Models and Storage Capacities

* **MainIds (Models):**
  * iPhone
  * Samsung
  * Google Pixel
* **SubIds (Storage Capacities):**
  * A: 64GB
  * B: 128GB
  * C: 256GB

Here, all smartphone models (`mainIds`) have the same storage capacities (subIds A, B, C).

## Mixed SubIds

MainIds have unique sets of subIds.

**Example:** ![:books:](https://a.slack-edge.com/production-standard-emoji-assets/14.0/apple-medium/1f4da.png) Courses and Instructors with Class Quotas

* **MainIds (Courses):**
  * Math
  * Science
  * History
* **SubIds (Instructors and Class Quotas):**
  * A: Alice (20 students)
  * B: Bob (15 students)
  * C: Carol (30 students)
  * D: Dave (25 students)

Here, each course (`mainId`) has a different set of instructors (`subIds`) with specific class quotas:

* Math (1): Alice (20 students), Bob (15 students)
* Science (2): Alice (20 students), Carol (30 students)
* History (3): Dave (25 students)

In summary, DLT’s flexible structure allows for both shared and mixed subIds, making it suitable for managing diverse assets and their attributes with associated quantities in various applications. The use of emojis and bullet points helps to visualize these relationships and make the examples more relatable and engaging.


---

# 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 dynamically by asking a question.

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

```
GET https://polytrade.gitbook.io/rwa-marketplace/features/dlt-token-standard-erc-6960/structure-and-subid-types.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
