Recaps

Recursive Inscriptions


Contributors: dgtl_assets (Twitter) and Tharanga Gamage (LinkedIn)
Date: 27 July 2023

Recently, the developers of the Ordinals protocol released an upgrade called Recursions. This minor upgrade has the potential to increase composability and introduce a source of randomness to inscriptions.

After conversing with an NFT enthusiast, I became more interested in exploring the topic. The main goal was to determine whether recursions were responsible for the recent increase in inscriptions. Before discussing my findings, let me briefly explain Recursive Inscriptions and their applications.

What are Recursive Inscriptions?

Recursive inscriptions draw data from previous inscriptions or a chain of inscriptions.

By using recursion, it is possible to access Ordinal's content endpoints, allowing one inscription to load the content of other inscriptions. This is achieved through the /content/:inscription_id (or simply the URL of another inscription) endpoint. Other endpoints are also available, including /blockhash, /blockheight, and /blocktime. Notably, these endpoints can be used to obtain current, past, or future endpoint data, thereby serving as a source of randomness. Raph created an example inscription that utilizes current, past, or future endpoint data (i.e., /blockheight). You can access this inscription through the provided link here. It's worth noting that these recursions don't reference any prior inscriptions.

Notably, Recursives can facilitate rendering content previously impossible to inscribe due to Bitcoin's limited space (4MB). Now, it is possible to write high-capacity content piece by piece. In the final inscription, reference is made to all previous inscriptions (or the pieces) and render them in one place.

A simple example would make it easier to explain how it works. I will use the example from a tweet by Ordbit.

Note: This is not a promotion of any inscriptions referred to here but only for illustration purposes. The respective inscriptions belong to their rightful owners. Check the inscriptions on Ordinals.com in these links. Final Rendering, First Module, Second Module, Third Module.

To understand what happens behind the scenes, let's examine the source code for the HTML. The code is encoded as 'text/html;charset=utf-8' and refers to three previous inscriptions that are used to render the final image as an HTML output, as shown in the illustration below.


Source: ordiscan

What are the use cases for Recursions?

There are several known use cases for recursions: allows the remixing of existing inscriptions, Publishing snippets of code, images, audio, or stylesheets as shared public resources, creating generative art collections (an algorithm is inscribed as JavaScript, and instantiated from multiple inscriptions with unique seeds), producing generative PFPs collections (accessories and attributes are inscribed as individual images, or in a shared texture atlas, and then combined, collage-style, in unique combinations in multiple inscriptions).

Beyond the above, the community may develop various use cases for Recursions. With the ability to inscribe as JavaScript, people can test out complex and dynamic scenarios similar to Smart Contracts. JavaScript offers more versatility compared to Bitcoin scripts. For example, this inscription by Raph uses some JavaScript. Moreover, Some community members have shown examples of how to serve a basic website using recursions.

What does the data say?

As previously mentioned, Recursive Inscriptions have various use cases. However, it's important to note that Recursives are still in the early stages of development and adoption.

Based on our data exploration, we have discovered that recursions were technically feasible prior to the recent upgrade. Nevertheless, the upgrade has enabled the rendering of content-referenced inscriptions (i.e., recursions) on Ordinals explorers.

Total Recursive Inscriptions (overtime)


Source: dgtl_assets via Dune Analytics

As of this writing, there are 100,895 Recursive Inscriptions minted as per the data analyzed using Dune Analytics. The commonly used MIME Type for Recursions is 'text/html;charset=utf-8' since these inscriptions render content as HTML outputs. However, since these inscriptions draw from several previous inscriptions to produce an output, a recursive inscription results from different MIME Types. Referring to our previous example, the final output is of 'text/html;charset=utf-8' MIME Type, while the modules that make it happen are 'image/png' type. There are also examples of chained inscriptions where the output refers to a 'text/javascript' type which recurses from multiple different 'image/webp' type inscriptions.

Recursive Inscriptions by Type (overtime)


Source: dgtl_assets via Dune Analytics

Despite the relatively low numbers when compared to the current status of the Ordinals protocol, there is a real potential for Recursions to trigger another phase of substantial growth for inscriptions. This is owing to the exciting and intricate use cases that can be constructed using Recursions.

Feedback

We value your feedback and strive to enhance our content and offerings based on your suggestions. Let us know what you enjoyed about this report and if there is anything we may have overlooked. We're eager to receive feedback and encourage you to share your thoughts with us at research@sqrr.xyz.

Disclaimer

The document generated by SQRR is for informational purposes only and should not be considered financial, investment, or legal advice, or an offer or the solicitation of an offer to buy or sell securities or other assets. Users of this document should always do their independent research before making any decisions. Furthermore, SQRR is not responsible for any errors or omissions, nor for any loss or damage of any kind, including without limitation any direct, indirect or consequential loss or damage, arising out of or in connection with the use of this document. Any decisions based on information contained in this document are the sole responsibility of the reader.

No guarantee is made for the accuracy or completeness of any information provided in the document. Any opinions, estimates, or recommendations expressed herein are subject to change without notice and constitute judgment as of the date of publication.

In this report, any mention of a particular project, commercial product, process, brand, or service, or the use of any trade, firm, or corporation name is solely for the purpose of providing information and convenience to the readers. It should not be interpreted as an endorsement, recommendation, or preference by SQRR.

Contact Us

Join us in our pursuit for knowledge, innovation, and progress as we explore, understand, and embrace the exciting world of blockchain and crypto technologies. Together, let's forge a future that embraces the transformative power of technology, and leverage the potential of blockchain and cryptocurrency to create a world filled with innovation, collaboration, and endless opportunities.

Follow Us