
Recursive Inscriptions: The Foundation of BTC Lego Combinations and Complex Logic Products
TechFlow Selected TechFlow Selected

Recursive Inscriptions: The Foundation of BTC Lego Combinations and Complex Logic Products
This article will explore the principles of recursive inscriptions and their impact on Ordinals, while combining existing cases to further展望 potential innovative applications of recursive inscriptions.
Author: @JellyZhouishere, @GryphsisAcademy
TL;DR
-
Recursive inscriptions, a recent major update to Ordinals, have opened vast imaginative possibilities for composability within the Ordinals protocol.
-
Recursive inscription is an inscription parsing standard. For creating PFP collections, users can upload corresponding trait elements that can be combined and assembled without uploading or downloading actual images. Recursive inscriptions feature enhanced interoperability, cost reduction, and breaking the 4MB size limit.
-
Potential creative directions based on recursive inscriptions include: inscription decomposition and recombination, Bitcoin-based music, on-chain gaming, generative art, and decentralized websites. This article details several representative cases demonstrating the powerful potential of recursive inscriptions.
-
Recursive inscriptions also face certain challenges: whether off-chain renderers and parsers can efficiently handle increasing recursion depths or large numbers of referenced inscriptions. Theoretically, games or NFTs built with recursive inscriptions could become infinitely complex and detailed. However, due to inherent limitations of the BTC network, indirect technical solutions are required.
-
Recursive inscriptions enable inscriptions to interact with each other, enabling new use cases. Generative art, on-chain displays, and efficient storage are now realities. We can look forward to deeper adoption in fields such as generative art, blockchain gaming, and metaverse projects, believing that future killer applications are brewing.
I. Introduction
The emergence of the Ordinals protocol has provided Bitcoin with the ability to number and inscribe data, expanding the scope of Bitcoin's ecosystem and bringing immense application potential to its ecosystem.
In just a few short months, we've witnessed the Ordinals sector grow from obscurity into a full-fledged ecosystem, undergoing significant upgrades and spawning a series of derivative protocols:

In our June series on Ordinals, we provided an in-depth overview of Ordinals and various BRC20 derivatives. Among these developments, one particularly noteworthy advancement stands out—the introduction of recursive inscriptions, a major recent upgrade to Ordinals. Recursive inscriptions were announced by Raph, the new chief maintainer of the Bitcoin Ordinals protocol, on GitHub on June 12th. This incorporated Casey Rodarmor’s proposed Ordinal Improvement Proposal #2167 into the core Ordinals codebase, unlocking expansive possibilities for composability within the Ordinals protocol.
This article will explore the principles behind recursive inscriptions, their impact on Ordinals, and examine existing case studies to project potential innovative applications enabled by this technology.
II. Fundamental Principles and Technology of the Ordinals Protocol
Since late December 2022, Casey Rodarmor has released the Ordinals protocol, introducing NFTs to the Bitcoin network through "Ordinals" and "Inscriptions." This protocol enables arbitrary content—such as text, images, videos, or even entire applications—to be attached to individual satoshis (the smallest unit of Bitcoin) in sequence, creating unique digital artifacts that can be transferred via the Bitcoin network. Below, we outline the key technical principles underlying the Ordinals protocol:
(1) UTXO
Bitcoin uses a payment model known as "Unspent Transaction Output" (UTXO). All balances are stored within a list of UTXOs. Each UTXO contains a certain amount of Bitcoin, owner information, and indicates whether it is spendable.
In Bitcoin transactions, every transaction has inputs and outputs. Inputs reference existing UTXOs, while outputs specify new addresses and amounts. When initiating a transaction, the inputs lock the associated UTXOs to prevent double-spending until the transaction is confirmed. Upon confirmation, the input UTXOs are removed, and new UTXOs are created from the outputs.
The total input value usually exceeds the total output value; the difference constitutes the network fee, which rewards miners who package the transaction. Network fees scale with transaction complexity—transactions involving multiple inputs and outputs typically incur higher fees.
(2) Satoshi Numbering and Tracking
There are a total of 21 million × 10^8 satoshis on the Bitcoin network. How does the Ordinals protocol assign a unique number to each satoshi and track its location across accounts?
According to the Ordinals protocol, sats are numbered based on the order in which they are mined. Ordinal metadata isn't stored in a fixed location but is embedded into the witness data of transactions—essentially "etched" onto specific parts of Bitcoin transactions, where they attach directly to individual sats.
This process leverages Segregated Witness (SegWit) and Pay-to-Taproot (P2TR), allowing any form of content—text, images, or video—to be inscribed onto designated sats.
(3) SegWit and Taproot Upgrades
SegWit is a critical protocol upgrade for Bitcoin that separates transaction signature data (witness data) from the main transaction data, reducing the amount of data stored in Bitcoin blocks. This expands block capacity, enabling more transactions per block, improving transaction throughput, and lowering fees.
The SegWit upgrade introduced a new witness field in transaction outputs to enhance privacy and performance. Although witness data wasn’t originally intended for storing arbitrary data, it effectively provides space for storing inscription metadata.
The Taproot upgrade, introduced in 2021, allows different spending conditions to be stored more privately on-chain. Through Taproot script paths, inscription content can be stored in spending scripts with almost no restrictions. Additionally, thanks to Taproot’s fee discount mechanism, storing inscription content becomes significantly cheaper, saving substantial resources.
The Ordinals protocol cleverly exploits SegWit’s relaxation of content size limits, storing inscription data within witness fields—up to 4MB of metadata. Taproot makes storing arbitrary witness data in Bitcoin transactions easier, allowing Ordinals developer Casey Rodarmor to reuse old opcodes (OP_FALSE, OP_IF, OP_PUSH) to encapsulate inscription content, thereby storing arbitrary data.
(4) Inscription Minting Process
-
Commit: The first step involves creating an output in a commit transaction that points to a Taproot script containing the inscription content. This output uses the Taproot storage format. At this stage, the inscription data is already linked to the UTXO of the transaction output but remains unpublished.
-
Reveal: In this phase, a new transaction spends the UTXO associated with the inscription, thereby disclosing the inscription content to the entire network.
Through these two steps, the inscription content becomes permanently bound to its corresponding UTXO. As previously mentioned, inscription occurs on the first satoshi of the input UTXO. The inscription content resides within the input of the reveal transaction. This specially inscribed satoshi can then be transferred, bought, sold, lost, or recovered like any other asset.
III. Principles and Implementation of Bitcoin Recursive Inscriptions
Having reviewed the fundamentals of Ordinals, let us now turn to recursive inscriptions:
The Ordinals protocol introduced the capability to fully inscribe files directly on-chain. Before recursive inscriptions emerged, ordinals resembled isolated and limited islands. While you could inscribe text, images, and code, they couldn’t interact with one another.
However, with the advent of recursive inscriptions, this is about to change. Now, inscriptions can use a special syntax "/-/content/:inscription_id" to request content from other inscriptions. This enables users to create inscriptions on Bitcoin with reduced data capacity requirements and lower transaction fees.
Recursive inscription is an inscription parsing standard. Its syntax resembles using code to fetch images. For creating PFP collection inscriptions, users upload elemental traits such as patterns, colors, and actions corresponding to images. Then, existing on-chain elements can be referenced and composed together without uploading or downloading actual image files.

Recursive inscriptions have the following characteristics:
-
Thanks to the unique self-referential property of recursive inscriptions, we now have the opportunity to break free from previous inscription methods, overcoming the awkward isolation between individual inscriptions and opening up possibilities for creative combinations.
-
By maintaining a compact textual code format, recursive inscriptions reduce costs and allow inscription sizes to surpass the 4MB block limit imposed by Bitcoin.
-
This advancement enhances interoperability, programmability, and scalability, injecting greater possibility and creative imagination into the Bitcoin chain.
-
From a protocol perspective, the future prospects are vast, with rich narratives awaiting developers and users to build upon and utilize.
Nevertheless, some challenges remain—for instance, whether platforms can index and display collections properly will determine the speed of development and degree of widespread acceptance.
IV. Innovative Applications of Bitcoin Recursive Inscriptions
The emergence of recursive inscriptions unlocks numerous powerful innovations. With high flexibility, composability, and cost advantages, recursive inscriptions bring infinite new possibilities to inscriptions. Below, we introduce several concrete examples showcasing the potential innovation and application directions enabled by recursive inscriptions.
Through recursion, inscriptions can easily reference code from other inscriptions. The content of one inscription can now be reused by many others. This new level of composability opens uncharted territories of possibility—we can now inscribe complex content such as videos, 3D games, and more directly on-chain. Recursive inscriptions make building an internal internet possible. Other possibilities include secondary creation of inscriptions, decentralized GitHub alternatives, fragmented NFT compositions, etc. Using recursive inscriptions, we can realize the following creative ideas:

Below, we detail several representative cases that illustrate the strong potential of recursive inscriptions:
(1) On-Chain Generative Art: 1Mask
By further combining the earlier basic approaches, various collections and secondary creations of inscriptions become feasible—such as combining a1 and a2 within collection A, or merging collection A with collection B. Based on this foundation, truly community-driven, native interactive generative art may emerge natively on the BTC chain.
Let’s begin with our first example: 1Mask.
This is a fully on-chain generative art project on the BTC chain centered around masks. The 1Mask project skillfully integrates recursive technology from Ordinals, consisting of three interwoven components: templates, algorithms, and inscription generation.

The template section includes seven inscriptions, each corresponding to a distinct type of mask template, formatted as image/svg+xml.
The algorithm works by using a user’s wallet address as a seed and applying a random function to generate various color combinations for coloring the mask models.
The inscription generation mechanism leverages recursive technology to reference algorithm inscriptions. Each mask inscription embeds HTML code required to construct the final colorful mask image. It executes the code embedded in the algorithm inscription using a random seed, filling this seed with user-specific on-chain data (such as the wallet address), ensuring randomness tied to the user. Thus, the same wallet address using the same template will always produce the same result.
Whenever a new mask inscription is created, it incorporates user-specific on-chain details and references the algorithm inscription. Leveraging the power of recursive inscriptions, once this newly created mask inscription enters the market or is indexed by wallets, it autonomously activates the referenced code from the algorithm inscription. During execution, the code takes user-specific on-chain data as input and renders a unique, personalized mask image.
Within the Bitcoin network environment, the data contained in inscriptions is immutable, ensuring integrity. This characteristic ensures that real-time images generated from this unchangeable inscription data are also immutable. As long as the random seed and algorithm within the mask inscription are correct, users can always verify the authenticity and accuracy of the creation process.
Behind this project, 1Mask has further introduced a standard called BRC721Auto, proposing that fully on-chain generative art must consist of at least two types of inscriptions: one being code inscriptions, the other being parameter inscriptions.
In the code inscription, an algorithm must be encoded to automatically generate HTML DOM based on parameter content. This DOM can be canvas, SVG, or any content recognizable and renderable by browsers into graphics.
Of course, the code inscription can also reference content from other inscriptions to complete its algorithm.
In the parameter inscription, we need to define an HTML file and include a global parameter 'p' referencing a Code Inscription. When a regular browser attempts to display this Parameter Inscription, it recognizes the global parameter 'p' and automatically executes the start() function in the Code Inscription to add or modify the current HTML’s DOM, ultimately rendering the HTML content. Therefore, the parameter inscription can be considered the final NFT (Non-Fungible Token).
Leveraging Recursive Inscription technology, the code required to generate graphics, the execution process, and verification process are all protected under Bitcoin blockchain consensus. Unless someone launches a 51% attack on Bitcoin, no one can control the ERC721Auto NFT generation process—the process will execute autonomously within the Bitcoin ecosystem.
1Mask further proposes three standards for fully on-chain generative art projects:
-
Decentralized storage of auto-generated graphic code;
-
Decentralized execution of code based on user-provided parameters for personalized graphic generation;
-
Decentralized verification of the correctness of generated results.
Based on these criteria, it is clear that on-chain art powered by recursive inscriptions exhibits the following features:
-
Uniqueness and randomness: artworks must be algorithmically generated via smart contracts, possessing non-fungibility, uniqueness, provably random on-chain reveals, and artistic/aesthetic value.
-
Interactivity: users can interact with and influence the artwork.
-
Decentralization: art is fully on-chain, preserved in a completely decentralized manner, with no centralized entity or individual controlling it.
-
Code reuse, and based on Ordinals.
Compared to generative art projects on other chains like Ethereum, BTC-based recursive inscription art represents fully on-chain generative art—standalone and independent of any off-chain resources.
(2) Hacker Project: Orbinals
Due to the flexibility of recursive inscriptions, hackers and enthusiasts now have a playground to showcase their talents, pushing the boundaries of what’s possible with Ordinals technology.
"Orbinals" is a prime example—a geeky project with neither Twitter nor official website. All project content is built upon Uncommon sats. According to the latest pricing from f2pool, as of August 20, the price of an Uncommon sat exceeded $366.

If you directly open the Orbinals collection URL, you’ll notice that each image in the celestial motion series references identical content, differing only in parameters. By digging deeper into the referenced content within its recursive inscriptions, we uncover the true secret hidden in this link: Orbinals stands for “Orbinals: Three Body Orbit Artifacts on Ordinals.” Underlying it is programming using HTML and JavaScript to simulate the movement of three bodies, built upon a two-body simulation codebase.

Supported by mathematical and physical equations, the beauty of celestial motion is elegantly presented on the Bitcoin chain.
And because it lacks Twitter, Discord, or any official website, the project may adopt a highly geek-oriented approach, where future communications will appear on sats controlled by the team.

Beyond the four channels disclosed by the project, there’s a hidden Easter egg: within the referenced inscription content, the code contains a note: “future Communication channels on /sats/ acknowledge,” and “acknowledge” happens to be a sat owned by the team.

(3) BRC69 Project: Orditroops
BRC69 is a new standard launched by Luminex for building recursive collections (https://github.com/luminexord/brc69). This standard leverages recursive inscriptions to optimize inscription costs on Bitcoin via the Ordinals protocol, facilitating the launch of recursive collections. Moreover, BRC69 offers high flexibility and opens doors to enhanced functionalities, paving the way for more interesting on-chain features such as preview capabilities.
With BRC69, inscription costs for Ordinals collections can be reduced by over 90%. This reduction is achieved through a four-step process:
-
Record traits
-
Deploy collection
-
Compile collection
-
Create assets
As long as the collection creator publishes the official list of inscriptions according to current requirements, all processes can proceed without external indexers. Furthermore, images will automatically render on all frontends that support recursive inscriptions, requiring no additional steps.
Orditroops is a recursive NFT based on BRC69, implementing the BRC69 protocol, enhancing trait composability, minimizing image footprint, delivering high-definition visuals, and offering flexible combinations of soldiers, weapons, and outfits—adding distinctive charm and fun to this NFT collection.

(4) 3D NFT Project: OCM (On-Chain Monkeys)

OCM is the first 3D NFT project utilizing the recursive inscription standard. OnChainMonkey was originally created as an NFT project on Ethereum in September 2021. Earlier this year, the OnChainMonkey series appeared as the first 10k collection inscribed on Bitcoin.
As a high-resolution 3D animated inscription, OCM quickly stood out for its detail and quality. Recall that prior to OCM, most inscriptions were still small text files or low-resolution images. Even on 4K or 8K displays, OCM maintains excellent clarity—an achievement realized through files each under 1 KB, something previously difficult to achieve.
OCM achieves this by pioneering the use of powerful recursive inscriptions. The first 300 OCMs are inscribed consecutively on 300 sats starting from block 78 of 2009, ordered by sat number on-chain. The builders used compressed code and referenced libraries like P5.JS and Three.JS for future creators. Users can view and access these libraries in-browser, automatically decompressing them within the Ordinals protocol when rendering Dimensions Interactive Art.
Through recursive inscriptions, OCM efficiently utilizes block space (each under 1 KB), achieving random on-chain reveals while combining high definition, 3D animation, and interactive art.
(5) On-Chain Music Engine: Descent into Darkness Music Engine

Enter any word or phrase to generate unique on-chain music. This music engine is a companion product to the MUD RPG game “Descent Into Darkness,” generating music from keywords. Founder Ratoshi emphasized ChatGPT’s crucial role in developing musical aspects, while recursive inscriptions helped significantly reduce costs. This unique fusion of blockchain and AI pays homage to classic chiptune music from retro video games.
(6) Single-Player On-Chain Games
A game requires multiple components such as images, frontend, and business logic. If the total asset size is less than 4MB, it can be inscribed onto a single sat without needing recursive inscriptions.
Recursive inscription technology is suitable in two scenarios:
1. Assets are inherently large (over 4MB); for example, a 5MB background image cannot be directly inscribed onto a single sat but can be split and referenced across different sats.
2. To implement better business logic—for instance, if 100 sat inscriptions belong to the same game series and share the same JavaScript (JS) file, recursive inscriptions are ideal since there’s no need to re-inscribe the JS file on every sat.
By inscribing both the game’s HTML (frontend) and JS (business logic) onto BTC “sats” and having them reference each other, a single-player H5 mini-game can be generated.
Below are three examples of such single-player H5 games:
a. Snake Game

Bitcoin Snake Game is a classic H5 single-player mini-game—Snake, widely recognized. Both the frontend and execution logic are written into this sat, without using recursive inscription technology. This NFT series has a total supply of 100. Actually, a better approach would be to inscribe the JS file (business logic) on one sat, then have 100 different sats inscribing HTML reference (or recursively call) this JS-containing sat to generate inscriptions. That would be much cleaner.
b. Match Game
As shown, the game consists of a 3×4 grid (simple mode; complex mode is 6×6). Players can flip two tiles at once. If the images match, they stay revealed; otherwise, they revert to question marks. Victory is achieved within a limited number of clicks, testing short-term memory. Similar to the well-known “Match” game. The game’s JS and HTML are fully inscribed in this sat, but it references a “background image” (shown below), making it a simple application of recursive inscriptions.

c. MUD Game

Descent into Darkness is a text-based role-playing game combining classic MUD game elements with Ordinals technology, offering players a unique gaming experience.
In Descent into Darkness, players take on adventurers seeking escape from darkness, encountering monsters, quests, and boss battles. They fight monsters to complete tasks, unlock new missions, earn gold, upgrade equipment, and purchase items.
These three single-player H5 mini-games represent very basic applications. As games, they’re incomplete—game initiation, progression, and conclusion aren’t recorded on-chain, gameplay cannot be saved, and after completion, the sat’s inscription remains unchanged. They define only game logic, not game state. These are merely preliminary experiments in BTC on-chain gaming.
(7) Multiplayer Full-On-Chain Game: BTC PixelWar

BTC PixelWar is a multiplayer on-chain game on BTC, claiming to be the first fully on-chain multiplayer game on the BTC chain. Participants collaborate on a 256×256 pixel canvas, either clicking pixels directly or uploading images to place pixels. Each Submit generates a new inscription reflecting the latest canvas state, with each inscription referencing the previous state. Inscriptions recursively layer upon one another—possibly the highest recursion count seen so far—making it a landmark application in the recursive inscription space.
The project introduces a novel standard: BRC721Cofound. This standard uses recursive inscriptions to allow all Bitcoin users to collaborate on the same canvas, recording the process. Each moment becomes an inscription—an “epoch inscription”—depicting the canvas at that instant, including newly added or updated pixels, referencing prior “epoch inscriptions,” and containing a “code inscription” handling transitions between states. Given potentially thousands of contributors, rendering the latest canvas state may require deep recursion, risking long load times. To solve this, the “code inscription” is designed to snapshot the latest canvas state after rendering the current “epoch inscription.” This snapshot is stored within the DOM tree of the current “epoch inscription.” Sequential browsers can thus simplify rendering by caching each rendered epoch inscription’s DOM tree, reducing recursion depth.
Overall, BTC PixelWar is an innovative and landmark BTC multiplayer on-chain game. It enables collaborative creation while optimizing rendering, and the introduced “BRC721Cofound” standard opens new possibilities for multiplayer applications on Bitcoin, showcasing the potential of recursive inscriptions in gaming and social domains.
V. Challenges and Future Development of Bitcoin Recursive Inscriptions
Recursive inscriptions mark the dawn of the Inscription 2.0 era, enriching BTC NFT mechanics and making it increasingly plausible for BTC NFTs to diverge entirely from those on Ethereum and other chains. The imaginative and narrative space ahead is vast.
Recursive inscriptions connect previously isolated inscriptions, enabling mutual referencing and forming diverse database-like structures. In previous articles, we discussed various derivative protocols based on Ordinals. In fact, combining recursive inscriptions with these earlier-mentioned derivatives enables reading other inscriptions and reacting according to internal smart instructions to update their own state. Through indexing, direct manipulation of protocol states becomes possible, forming a coherent sequence of actions resembling smart contract effects.
At the same time, massive recursive inscription databases provide greater operational and imaginative room, including foundational data, knowledge bases, code repositories, function libraries, and metadata across various domains—all capable of mutual referencing to enable complex logic and product applications. Thus, we can expect deeper adoption of recursive inscriptions in sectors like generative art, blockchain gaming, and metaverse projects, believing that future killer applications are brewing.
Meanwhile, recursive inscriptions face certain challenges:
1. If recursion depth increases—for example, reaching ten thousand layers—can off-chain renderers and parsers process them quickly?
2. If the number of referenced inscriptions grows—for instance, one sat referencing ten thousand inscriptions—can off-chain renderers and parsers handle them efficiently?
If these issues are resolved, theoretically, games or NFTs generated via recursive inscriptions could become infinitely complex and detailed. These problems stem from inherent limitations of the BTC network and are difficult to solve fundamentally, but indirect technical solutions may offer workarounds.
VI. Conclusion
The recursive upgrade in the Ordinals protocol allows inscriptions to interact with each other, enabling new and exciting use cases. With this functionality, generative art, on-chain displays, and efficient storage have become realities. We observe developers within the BTC ecosystem continuing to innovate along paths like blockchain gaming and generative art. Works based on recursive inscriptions continue to emerge, gradually assembling the components needed for grand engineering projects. Looking ahead, we can anticipate the arrival of on-chain games, metaverses, and interactive generative art projects featuring complex product logic.
Disclaimer: This report was authored by students of @JellyZhouishere and @GryphsisAcademy, under the guidance of @979_eth and @Erjiueth
Join TechFlow official community to stay tuned
Telegram:https://t.me/TechFlowDaily
X (Twitter):https://x.com/TechFlowPost
X (Twitter) EN:https://x.com/BlockFlow_News















