# Dotordinals

[Dot Ordinals](https://dotordinals.io/) is a Dapp designed to create inscriptions tokens DRC-20 or NFTs on polkadot based blockchains.

This is just a fun experimental standard demonstrating that you can create off-chain balance states with inscriptions. It by no means should be considered THE standard for fungibility on polkadot with ordinals, as I believe there are almost certainly better design choices and optimization improvements to be made. Consequently, this is an extremely dynamic experiment, and I strongly discourage any financial decisions to be made on the basis of it's design. I do, however, encourage the polkadot community to tinker with standard designs and optimizations until a general consensus on best practices is met (or to decide that this is a bad idea altogether!).

## Idea

Experiment to see if ordinal theory can facilitate fungibility on polkadot.

* Create a drc-20 with the deploy function
* Mint an amount of drc-20's with the mint function
* Transfer an amount of drc-20's with the transfer function.&#x20;

drc-20 balance state can be found by aggregating all of these function's activity together.

* Deployments initialize the brc-20. Do not affect state
* Mints provide a balance to <mark style="color:red;">**only the first owner**</mark> of the mint function inscription
* Transfers deduct from the senders balance and add to the receivers balance, <mark style="color:red;">**only upon the first transfer**</mark> of the transfer function.&#x20;
  * Inscribe transfer function to senders address&#x20;
  * <mark style="color:red;">**Sender**</mark> <mark style="color:red;">**transfer's transfer function**</mark>

## How to

### Getting a balance

You can either deploy your own or mint from existing deployments

1. <mark style="color:red;">(</mark><mark style="color:red;">**Optional: Only do if you want to create your own drc-20. If not go to step 2**</mark><mark style="color:red;">)</mark> Inscribe the deploy function to you ordinal compatible wallet with the desired drc-20 parameters set.
2. Inscribe the mint function to your ordinal compatible wallet. Make sure the ticker matches either a) the drc-20 you deployed in step 1, or b) any brc-20 that has yet to reach its fully diluted supply. Also if the drc-20 has a mint limit, make sure not to surpass this.

### Transferring a balance

1. Inscribe the transfer function to your ordinal compatible wallet. Make sure the transfer function inscription information is valid before inscribing .&#x20;
2. Once received, (and if valid) send the inscription to the desired destination to transfer the balance.&#x20;

#### What is valid?

A valid transfer function is required to transfer a balance. Validity can be determined by the following:

* Valid transfer functions are ones where the amount stated in the inscription does not exceed <mark style="color:red;">**Available balance**</mark> when inscribed.
* <mark style="color:red;">**Available balance**</mark> defined as: \[<mark style="color:red;">**Overall balance**</mark>] - \[valid/active transfer function inscriptions in wallet (<mark style="color:red;">**Transferable balance**</mark>)]. If there are no valid/active transfer functions held by an address <mark style="color:red;">**Available balance**</mark> and <mark style="color:red;">**Overall balance**</mark> are equivalent.
* Example: A wallet holds an <mark style="color:red;">**Overall balance**</mark> of 1000 "drc", and . The holder then inscribes a transfer function of 700 "drc". Once the inscription is confirmed, the following is true: <mark style="color:red;">**Overall balance**</mark> = 1000, <mark style="color:red;">**Available balance**</mark> = 300, <mark style="color:red;">**Transferable balance**</mark> = 700. If in the next block, the user tried to inscribe a transfer function of 500 "drc", this would not be valid as the maximum amount that can be inscribed is 300 (<mark style="color:red;">**Available balance**</mark>).&#x20;
* If multiple transfer functions are inscribed in the same block, validity is determined by the order the were confirmed in the block.&#x20;

#### Redundancies

* If a user changes their mind and no longer wishes to transfer their transfer function, and wants to restore their <mark style="color:red;">**Available balance**</mark> to the <mark style="color:red;">**Overall balance**</mark> (invalidate <mark style="color:red;">**Transferable balance**</mark>), the user must simply transfer the transfer function inscription to themselves.


---

# 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://docs.dotordinals.io/dotordinals.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.
