The birth of the Ordinals protocol provides Bitcoin with the functions of numbering and inscription, thus broadening the product range of the Bitcoin ecosystem and bringing huge application potential to the Bitcoin ecosystem.
In the past few short months, we have seen the Ordinals track gradually grow from obscurity into an ecosystem. During this period, the Ordinals protocol has also undergone important upgrades and spawned a series of derivative protocols:
In our Ordinals series of articles in June, we also updated the detailed introduction to Ordinals and various BRC20 derivative protocols (link: @gryphsisacademy/diving-into-ordinals-how-to-bet"">https://medium.com/@gryphsisacademy/diving-into-ordinals-how-to-bet -on-bitcoin-ecosystem-as-halving-approaches-3486db8cbf12)
Among them, I have to mention a recent major update of Ordinals - the emergence of recursive inscriptions.
Recursive inscriptions were announced by Raph, the new chief maintainer of the Bitcoin protocol Ordinals, on June 12 on Github. It further merged recursive inscription update 2167 proposed by Casey Rodarmor, the creator of the Bitcoin protocol Ordinals, into the Ordinals code, opening up vast imaginative space for the composability development of the Ordinals protocol.
This article will explore the principles of recursive inscriptions and their impact on Ordinals, and combine existing cases to further explore possible innovative application directions for recursive inscriptions.
At the end of December 2022, Casey Rodarmor released the Ordinals protocol, introducing NFTs to the Bitcoin network through Ordinals and Inscriptions.
The protocol can add arbitrary content, such as text, images, videos, and even applications, to sequentially numbered sats (the smallest units in Bitcoin) to create unique digital artefacts that can be transmitted over the Bitcoin network. Below we sort out the important technical principles involved in the Ordinals protocol:
Bitcoin adopts a payment model called “Unspent Transaction Output” (UTXO), and all balances are stored in a list of UTXO. Each UTXO contains a certain number of Bitcoins and owners’ information, and indicates whether it is available.
In Bitcoin transactions, each transaction has inputs and outputs. The input is a reference to an existing UTXO, and the output specifies the new address and amount. After initiating a transaction, enter the relevant UTXO to lock it to prevent reuse until the transaction is confirmed. After confirmation, the input UTXO of the transaction is removed and the output generates a new UTXO.
The total input amount of a transaction usually exceeds the total output, and the difference is called a network fee, which rewards miners who package the transaction. Network fees are proportional to transaction complexity, and multi-input-output transactions generally require higher network fees.
There are a total of 21 million * 10^8 satoshis on the Bitcoin network. How does the Ordinals protocol uniquely number each satoshi and track the account it belongs to?
According to the Ordinals protocol, the numbering of satoshis is determined by the order in which they are mined. The metadata of Ordinals is not stored in a specific location but is embedded into the witness data of transactions, which are “inscribed” onto specific parts of Bitcoin transactions, and these data are attached to specific satoshis.
This process is achieved through Segregated Witness (SegWit) and Pay-to-Taproot (P2TR), enabling any form of content such as text, images, or videos to be inscribed onto designated satoshis.
SegWit is a significant protocol upgrade for Bitcoin, which separates some transaction signature data (witness data) from the transactions themselves, reducing the size of data stored in Bitcoin blocks. This measure increases the block capacity, allowing for more transactions to be accommodated, enhances the network’s transaction processing capability, and lowers transaction fees.
The SegWit protocol upgrade introduces a new witness field in transaction outputs to enhance privacy and performance. While the witness data was not originally designed for data storage, it effectively provides us with an opportunity to store metadata such as inscriptions.
The Taproot protocol upgrade introduced in 2021 enables different transaction conditions to be stored more privately on the blockchain. Through Taproot script paths, we can store inscription content in spending scripts, with almost no limitations on the content. Moreover, due to Taproot’s discount mechanism, storing inscription content becomes more economical, saving significant resources.
The Ordinals protocol cleverly utilizes SegWit to relax the restrictions on the size of content written to the Bitcoin network, storing inscription content in witness data, with a maximum capacity of 4MB of metadata. Taproot makes it easier to store arbitrary witness data in Bitcoin transactions, allowing Ordinals developer Casey Rodarmor to reuse old opcodes (OP_FALSE, OP_IF, OP_PUSH) to describe the encapsulated content as inscriptions, thus storing any data.
Through the above two steps, the inscription content is bound to the UTXO it memorializes. Then, as described earlier regarding satoshis, the inscription is realized on the first satoshi corresponding to the input UTXO. The inscription content is included in the input of the transaction displaying it. This memorialized special satoshi can be transferred, bought, sold, lost, and recovered.
After understanding the basic principles of Ordinals, let’s look at recursive inscriptions.
The Ordinals protocol introduces the ability to completely inscribe files on the chain in Bitcoin. Before the advent of recursive inscription, ordinals were like isolated and limited islands. Although you can inscribe text, images, and code, they cannot interact with each other.
However, with the introduction of recursive inscriptions, things are about to change. Inscriptions can now request the content of other inscriptions using the special “/-/content/:inscription_id” syntax. This allows users to use less capacity and lower fees when creating inscriptions on the Bitcoin chain.
Recursive inscriptions are a standard for inscription parsing. Its syntax is essentially similar to using code to find images. Creating PFP (Profile Picture) collection inscriptions involves uploading elements such as patterns, colors, actions, etc., corresponding to the uploaded images. Then, existing elements on the chain can be combined and spliced together, without the need to upload or download actual images.
Recursive inscriptions have the following characteristics:
However, there are still some challenges, such as whether inscriptions can be collected and indexed on the platform, which will determine the speed of its development and the degree to which it is widely recognized.
The emergence of recursive inscriptions unlocks many powerful innovative applications. Recursive inscriptions offer high flexibility in invocation, composition, and low-cost advantages, opening up infinite new possibilities for inscriptions. Below, this article will introduce the potential innovations and application directions of recursive inscriptions through some specific examples.
Through recursion, inscriptions can easily reference the code of other inscriptions. The content of one inscription can now be used by many other inscriptions. This new composability opens up possibilities in fields we have hardly explored, such as inscribing complex images, videos, 3D games, and other forms of content on the blockchain. Recursive inscriptions make it possible to establish an internal internet. More possibilities include inscription remixing, decentralized GitHub, NFT fragment composition, and more. Leveraging recursive inscriptions, we can achieve the following creative ideas:
Below we introduce in detail some typical cases that demonstrate the powerful potential of recursive inscriptions.
By further combining and arranging various primary solutions mentioned earlier, various collections can be further combined, and inscriptions can be re-created. For example, combining elements within collection A, such as A1 and A2, or combining collections A and B. Based on this, there is the potential for the emergence of truly community-driven native interactive generative art on the Bitcoin blockchain.
Let’s take a look at the first case: 1Mask.
This is a fully on-chain generative art project on the Bitcoin blockchain with masks as its theme. The 1Mask project cleverly integrates Ordinals’ recursive technology, consisting of templates, algorithms, and inscription generation as its three intertwined elements.
Source: https://1mask.io/
The template part contains a total of seven inscriptions, corresponding to seven unique types of templates, and their format follows image/svg+xml.
The basic principle of the algorithm part is to use the user wallet address as a seed and use random functions to create a variety of different color combinations to color the mask model.
The inscription generation mechanism uses recursive technology to reference algorithmic inscriptions. Each mask inscription is embedded with the HTML code needed to build the final colorful mask image. This is achieved by using a random seed to execute the code embedded in the algorithm inscription, while filling the random seed with user-specific on-chain data (such as a wallet address), making it random but relevant to the user.
Therefore, when the same wallet address uses the same template, the generated results will always be consistent.
Each time a new mask inscription is created, it incorporates user-specific on-chain details and references the algorithmic inscription. With the power of recursive inscription technology, once a newly created mask inscription enters the market or is indexed by a wallet, it will autonomously activate the reference code contained in the algorithmic inscription. These codes run with user-specific on-chain data as input, ultimately displaying a unique, personalized mask image.
In the Bitcoin network environment, the data contained in the inscription is immutable, thus ensuring its integrity. This characteristic determines that the real-time images presented based on this immutable inscription data are also immutable. As long as the random seeds and algorithms involved in the mask inscription are correct, users can verify the authenticity and accuracy of the creation process at any time.
Behind this project, 1Mask further launched a standard called BRC721Auto, proposing that fully on-chain generated art consists of at least two kinds of inscriptions: one is the inscription of the code, and the other is the inscription of the personalized parameters.
In Code Inscription, we need to code an algorithm that can automatically generate HTML DOM based on the content of parameters. The DOM can be a canvas, SVG, or other content that can be recognized by the browser and rendered as a graphic accordingly.
Of course, code inscriptions can also reference the contents of other inscriptions to complete their algorithms.
In the parameter inscription, we need to define an HTML and define a global parameter p in it to reference a Code Inscription. When ordinary browsers try to display this Parameter Inscription, they will recognize the global parameter p and automatically execute the start () function in the Code Inscription to add or modify the DOM of the current HTML, and finally render the content of this HTML. Therefore, parameter inscriptions can be regarded as the ultimate NFT (Non-Fungible Token).
With the help of Recursive Inscription technology, the code required to generate graphics, the code execution process, and the verification process are all protected by the Bitcoin blockchain consensus. Unless someone can launch a 51% attack on Bitcoin, no one can control the generation process of the ERC721Auto NFT, which will be performed autonomously by the Bitcoin ecosystem.
1Mask further proposed three major standards for generating art projects on the entire chain. The three major standards are:
Based on the above criteria, it is not difficult to find that on-chain art based on recursive inscriptions has the following characteristics:
Compared with other on-chain generative art projects such as Ethereum, the generative art based on BTC recursive inscriptions is a completely on-chain generative art. It is an independent, decentralized generative art that does not rely on any off-chain resources.
Due to the flexibility of recursive inscriptions, this provides a stage for geeks to display their talents, and projects rich in geek spirit further explore the boundaries of possibilities of Ordinals technology.
“Orbinals” is a typical representative of this. It is a geek project with no Twitter and no official website. All the content of the project is based on Uncommon sat. According to the latest price of f2pool, as of August 20, Uncommon sat The unit price reached more than 366 US dollars.
Source: https://www.ord.io/?satributes=uncommon&contentType=html&sortBy=newest
If you directly open the Orbinals collection series website, you will find that some of the referenced content of each picture in its celestial motion series is the same after opening, but there will be some differences in the parameters. Take a deep look at the referenced content in its recursive inscription. Finally, we can find the real secret about the project hidden in this reference link (https://ordin-delta.vercel.app/content/b5091b76f78d73677ad6b81e4785b0dfebc62b1079a0bf78b8366859a1ffacbci0). The full name of Orbinals is “Orbinals: Three Body Orbit Artifacts on Ordinals”. It utilizes HTML and JavaScript to program the motion of three celestial bodies, built upon the foundation of binary simulation code.
Source: https://evgenii.com/blog/three-body-problem-simulator/
With the support of mathematical and physical equations, the beauty of celestial motion is presented on the Bitcoin chain in a concise way.
And since there is no social media such as Twitter, Discord, or official website, the project will most likely use a very geeky approach, and future information will be presented on sats held by the team itself.
In addition to the four channels disclosed by the project, there is also a hidden Easter egg: within the referenced inscription content of the project (https://ordin-delta.vercel.app/content/4f59fc257a7c78d4074dcd7a4a55360d56986f474700adc7dc37ac231901fc40i0), there is a hidden string of instructions: “future Communication channels on /sats/ acknowledge,” and “acknowledge” happens to be one of the team’s sats.
Source: https://www.ord.io/sat/1940129935364125
BRC69 is a new standard for building recursive collections released by Luminex (https://github.com/luminexord/brc69). This standard uses recursive inscription to optimize the cost of inscribing on Bitcoin using ordinal protocols, which helps to introduce recursive collections. Additionally, BRC69 offers a high degree of flexibility and opens the door to more enhancements and capabilities, paving the way for more interesting on-chain features such as pre-show functionality and more.
With BRC69, the cost of inscriptions for the Ordinals collection can be reduced by over 90%. This reduction is achieved through a 4-step process:
All of these processes can occur without the need for external indexers, as long as collection creators publish official inscription lists for their collections in accordance with current requirements. Additionally, images will be automatically rendered on all front-end interfaces that have implemented recursive inscription, with no additional steps required.
Orditroops is a recursive NFT based on BRC69. It implements the content of the BRC69 protocol, increases the composability of features, and reduces the space occupied by pictures. The pictures are quite high-definition. The flexible combination of soldiers, weapons, and costumes all adds lots of features and fun to this NFT collection.
Source: https://twitter.com/OrdiTroops
Source: https://www.ord.io/3563188a3db53850bba48747293def7bd6b7395e4241b29ec7d49892945cf927i0
OCM is the first 3D NFT project to apply the recursive inscription standard. OnChainMonkey was originally an NFT project created on Ethereum in September 2021. Earlier this year, the OnChainMonkey series emerged as the first 10k series to be inscribed on Bitcoin.
As a high-resolution 3D animated inscription, OCM quickly stands out for its detail and quality. Remember, most inscriptions before it were still small text files or low-resolution images. OCM delivers good clarity even on 4K or 8K displays. This quality is achieved with files that are no more than 1 KB in size each, something that OCM’s previous projects have struggled to achieve.
OCM is able to achieve these feats primarily because it employs the powerful Recursive Inscription. The first 300 of OCM’s continuous 300 inscriptions on Bitcoin are inscribed on consecutive coins, sorted on-chain by their coin number starting from Block 78 in 2009. OCM builders have utilized compressed code and referenced the P5.JS and Three.JS libraries for future creators to use. Users can view and access the libraries in their browsers, with automatic decompression in the Ordinals protocol when rendering Dimensions Interactive Art.
Through Recursive Inscription, OCM efficiently utilizes block space (each less than 1 KB) and achieves random on-chain revelations, combining features such as high-definition quality, 3D, animation, and interactive art.
Source: https://ordinals.com/content/6fd06768414dfc2bd68b55869eea6844864fbf71ee72ec26568520e313c2bda2i0
By entering any word or phrase, you can generate unique on-chain music. This music engine is a companion product to the MUD RPG game “Descent Into Darkness,” allowing users to generate music by inputting keywords.
Founder Ratoshi emphasized the crucial role played by ChatGPT in utilizing music for this project’s development, while the use of Recursive Inscription helps significantly reduce costs. This unique blend of blockchain technology and artificial intelligence pays homage to classic music from retro electronic games.
A game requires multiple component materials such as pictures, front-end, and business logic. If the total size of the materials is less than 4M, it can be completed by inscribing a Sat without using recursive inscriptions.
There are two situations where recursive inscription technology is suitable:
The HTML (front-end) and JS (business logic) of the game are both inscribed on the “Satoshi” of BTC and reference each other to generate a single-player H5 mini-game.
Here are 3 examples of such single-player HTML5 mini-games:
a. Snake Game
Source: ord.io/431507
Bitcoin Snake Game is a typical HTML5 single-player mini-game, and it’s also a well-known game: Snake. The frontend and execution logic of this game are entirely written on this Sat, without using recursive inscription technology. The total number of NFTs in this series is 100.
Actually, a better approach would be to inscribe a JS file (business logic) on one Sat, and then use 100 different Sat inscriptions of HTML to reference (or call recursively) the Sat where the JS file is located to generate inscriptions. This would be more concise.
b. Concentration (card game)
Source: ord.io/18201467
As shown in the image, the game consists of a 3x4 digit grid (this is the easy mode, while the complex mode is a 6x6 digit grid). Two grid squares can be clicked open at a time. When the images on the two squares match, they stay displayed; if they don’t match, they are immediately covered by a question mark. The objective is to match all the images within a certain number of clicks to win. Limiting the number of clicks tests the player’s short-term memory.
This game is similar to the well-known Concentration card game. The JS and HTML of this game are all inscribed in this Sat, but it references a “background image” (background image as shown below), making it a simple application of recursive inscription.
Source: ord.io/18201467
c. MUD games
Source: https://ordinals.com/content/1915ae7d46502199a7d03256efd7f6e2f6aabb8ed7176b34f70b7b8fd778b36ci0
“Descent into Darkness” is a text-based role-playing game that combines classic MUD game elements with Ordinals technology to provide players with a unique gaming experience.
In “Descent into Darkness,” players take on the role of an adventurer seeking a way out in the darkness. The game features monsters, quests, and boss battles. Players must fight monsters to complete quests, unlock new tasks, earn coins to upgrade equipment, and buy items.
The three single-player H5 mini-games mentioned above are very simple applications. As games, they are incomplete. Processes such as game start, progress, and end are not recorded on the blockchain, and game progress cannot be saved. After the game ends, there are no changes to the inscription of the Sat. Only the game logic is defined, and the game state is not preserved. This is just a preliminary attempt at BTC chain gaming.
Source: https://twitter.com/btcpixelwar
BTC PixelWar is a BTC fully on-chain multiplayer game, claiming to be the first omnichain multiplayer game on the BTC network. Participants create on a canvas of 256*256 pixels. They can directly click on pixels or upload images to generate pixels on the canvas.
Each submission generates an inscription representing the latest state of the entire canvas. Each generated inscription references the previously produced inscription state, recursively layering the inscriptions. This may be the project with the highest recursion depth on the market, making it a landmark application in the field of recursive inscriptions.
The project introduces a new standard, “BRC721Cofound,” which utilizes recursive inscriptions to allow all Bitcoin users to collaborate on the same canvas and record their process. Each moment is represented by an inscription, depicting the state of the canvas at that moment. These inscriptions, known as “moment inscriptions,” contain newly added or updated pixels at that moment, as well as references to previous “moment inscriptions” and “code inscriptions” handling image changes between two moments.
Considering that many people may participate in drawing together, rendering the latest canvas state may require deep recursion to load every pixel drawn by each person. However, this process may lead to longer loading times. To address this issue, “code inscriptions” are designed to take a snapshot of the latest canvas state after rendering the current “moment inscription.” This snapshot is then stored in the DOM tree of the current “moment inscription.” As a result, modern browsers can simplify the rendering process by caching the DOM tree of each rendered moment inscription, reducing the recursion depth.
In summary, BTC PixelWar is an innovative and landmark BTC multiplayer fully on-chain game. It enables collaborative creation while optimizing the rendering process. The introduction of the “BRC721Cofound” standard opens up new possibilities for multiplayer game applications on the Bitcoin network and demonstrates the potential of recursive inscriptions in gaming and social domains.
Recursive inscriptions have ushered in the era of On-Chain Inscriptions 2.0, enriching the gameplay of BTC NFTs and paving the way for BTC NFTs to differentiate themselves from NFTs on other chains like Ethereum. The future narrative and imaginative space are vast.
Recursive inscriptions establish connections between previously independent inscriptions, allowing them to reference each other and form a diverse database structure. In previous articles, we discussed various derivative protocols based on Ordinals. In practice, when recursive inscriptions are combined with these derivative protocols, they can read other inscriptions and update their own state based on their smart instructions. This creates a coherent set of actions similar to smart contract effects, where protocols’ states can be directly manipulated through indexing.
At the same time, the vast recursive inscription database provides more operating and imaginative space for inscriptions, including metadata in various fields such as basic data, knowledge base, code library, function library, etc. They can directly reference each other to implement complex logic in product applications. Therefore, we can expect recursive inscriptions to be deeply adopted in generative art, chain games, metaverse, and other fields, and believe that future killer applications are brewing.
However, recursive inscriptions also face some challenges:
If these two points can be achieved, theoretically, the games or NFTs generated by recursive inscriptions can be infinitely complex and refined. These two problems are difficult to solve fundamentally due to the limitations of the BTC network itself, but they can be addressed through indirect technical solutions.
The recursive upgrade in the Ordinals protocol allows inscriptions to interact with each other, enabling new and exciting use cases. With this feature, generative art, on-chain displays, and efficient storage have become a reality. We can see that developers within the BTC ecosystem continue to create and develop various projects in directions such as chain games and generative art, and works based on recursive inscriptions are emerging one after another. Various components of a large project are slowly coming together, and in the future, we can further expect the emergence of projects with complex product logic, such as on-chain games, metaverse, and interactive generative art.
This article originally titled “深入解读递归铭文:BTC乐高组合与复杂逻辑产品的基石” is reproduced from [Gryphsis Academy]. All copyrights belong to the original author [@JellyZhouishere]. If you have any objection to the reprint, please contact Gate Learn team, the team will handle it as soon as possible.
Disclaimer: The views and opinions expressed in this article represent only the author’s personal views and do not constitute any investment advice.
Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.
The birth of the Ordinals protocol provides Bitcoin with the functions of numbering and inscription, thus broadening the product range of the Bitcoin ecosystem and bringing huge application potential to the Bitcoin ecosystem.
In the past few short months, we have seen the Ordinals track gradually grow from obscurity into an ecosystem. During this period, the Ordinals protocol has also undergone important upgrades and spawned a series of derivative protocols:
In our Ordinals series of articles in June, we also updated the detailed introduction to Ordinals and various BRC20 derivative protocols (link: @gryphsisacademy/diving-into-ordinals-how-to-bet"">https://medium.com/@gryphsisacademy/diving-into-ordinals-how-to-bet -on-bitcoin-ecosystem-as-halving-approaches-3486db8cbf12)
Among them, I have to mention a recent major update of Ordinals - the emergence of recursive inscriptions.
Recursive inscriptions were announced by Raph, the new chief maintainer of the Bitcoin protocol Ordinals, on June 12 on Github. It further merged recursive inscription update 2167 proposed by Casey Rodarmor, the creator of the Bitcoin protocol Ordinals, into the Ordinals code, opening up vast imaginative space for the composability development of the Ordinals protocol.
This article will explore the principles of recursive inscriptions and their impact on Ordinals, and combine existing cases to further explore possible innovative application directions for recursive inscriptions.
At the end of December 2022, Casey Rodarmor released the Ordinals protocol, introducing NFTs to the Bitcoin network through Ordinals and Inscriptions.
The protocol can add arbitrary content, such as text, images, videos, and even applications, to sequentially numbered sats (the smallest units in Bitcoin) to create unique digital artefacts that can be transmitted over the Bitcoin network. Below we sort out the important technical principles involved in the Ordinals protocol:
Bitcoin adopts a payment model called “Unspent Transaction Output” (UTXO), and all balances are stored in a list of UTXO. Each UTXO contains a certain number of Bitcoins and owners’ information, and indicates whether it is available.
In Bitcoin transactions, each transaction has inputs and outputs. The input is a reference to an existing UTXO, and the output specifies the new address and amount. After initiating a transaction, enter the relevant UTXO to lock it to prevent reuse until the transaction is confirmed. After confirmation, the input UTXO of the transaction is removed and the output generates a new UTXO.
The total input amount of a transaction usually exceeds the total output, and the difference is called a network fee, which rewards miners who package the transaction. Network fees are proportional to transaction complexity, and multi-input-output transactions generally require higher network fees.
There are a total of 21 million * 10^8 satoshis on the Bitcoin network. How does the Ordinals protocol uniquely number each satoshi and track the account it belongs to?
According to the Ordinals protocol, the numbering of satoshis is determined by the order in which they are mined. The metadata of Ordinals is not stored in a specific location but is embedded into the witness data of transactions, which are “inscribed” onto specific parts of Bitcoin transactions, and these data are attached to specific satoshis.
This process is achieved through Segregated Witness (SegWit) and Pay-to-Taproot (P2TR), enabling any form of content such as text, images, or videos to be inscribed onto designated satoshis.
SegWit is a significant protocol upgrade for Bitcoin, which separates some transaction signature data (witness data) from the transactions themselves, reducing the size of data stored in Bitcoin blocks. This measure increases the block capacity, allowing for more transactions to be accommodated, enhances the network’s transaction processing capability, and lowers transaction fees.
The SegWit protocol upgrade introduces a new witness field in transaction outputs to enhance privacy and performance. While the witness data was not originally designed for data storage, it effectively provides us with an opportunity to store metadata such as inscriptions.
The Taproot protocol upgrade introduced in 2021 enables different transaction conditions to be stored more privately on the blockchain. Through Taproot script paths, we can store inscription content in spending scripts, with almost no limitations on the content. Moreover, due to Taproot’s discount mechanism, storing inscription content becomes more economical, saving significant resources.
The Ordinals protocol cleverly utilizes SegWit to relax the restrictions on the size of content written to the Bitcoin network, storing inscription content in witness data, with a maximum capacity of 4MB of metadata. Taproot makes it easier to store arbitrary witness data in Bitcoin transactions, allowing Ordinals developer Casey Rodarmor to reuse old opcodes (OP_FALSE, OP_IF, OP_PUSH) to describe the encapsulated content as inscriptions, thus storing any data.
Through the above two steps, the inscription content is bound to the UTXO it memorializes. Then, as described earlier regarding satoshis, the inscription is realized on the first satoshi corresponding to the input UTXO. The inscription content is included in the input of the transaction displaying it. This memorialized special satoshi can be transferred, bought, sold, lost, and recovered.
After understanding the basic principles of Ordinals, let’s look at recursive inscriptions.
The Ordinals protocol introduces the ability to completely inscribe files on the chain in Bitcoin. Before the advent of recursive inscription, ordinals were like isolated and limited islands. Although you can inscribe text, images, and code, they cannot interact with each other.
However, with the introduction of recursive inscriptions, things are about to change. Inscriptions can now request the content of other inscriptions using the special “/-/content/:inscription_id” syntax. This allows users to use less capacity and lower fees when creating inscriptions on the Bitcoin chain.
Recursive inscriptions are a standard for inscription parsing. Its syntax is essentially similar to using code to find images. Creating PFP (Profile Picture) collection inscriptions involves uploading elements such as patterns, colors, actions, etc., corresponding to the uploaded images. Then, existing elements on the chain can be combined and spliced together, without the need to upload or download actual images.
Recursive inscriptions have the following characteristics:
However, there are still some challenges, such as whether inscriptions can be collected and indexed on the platform, which will determine the speed of its development and the degree to which it is widely recognized.
The emergence of recursive inscriptions unlocks many powerful innovative applications. Recursive inscriptions offer high flexibility in invocation, composition, and low-cost advantages, opening up infinite new possibilities for inscriptions. Below, this article will introduce the potential innovations and application directions of recursive inscriptions through some specific examples.
Through recursion, inscriptions can easily reference the code of other inscriptions. The content of one inscription can now be used by many other inscriptions. This new composability opens up possibilities in fields we have hardly explored, such as inscribing complex images, videos, 3D games, and other forms of content on the blockchain. Recursive inscriptions make it possible to establish an internal internet. More possibilities include inscription remixing, decentralized GitHub, NFT fragment composition, and more. Leveraging recursive inscriptions, we can achieve the following creative ideas:
Below we introduce in detail some typical cases that demonstrate the powerful potential of recursive inscriptions.
By further combining and arranging various primary solutions mentioned earlier, various collections can be further combined, and inscriptions can be re-created. For example, combining elements within collection A, such as A1 and A2, or combining collections A and B. Based on this, there is the potential for the emergence of truly community-driven native interactive generative art on the Bitcoin blockchain.
Let’s take a look at the first case: 1Mask.
This is a fully on-chain generative art project on the Bitcoin blockchain with masks as its theme. The 1Mask project cleverly integrates Ordinals’ recursive technology, consisting of templates, algorithms, and inscription generation as its three intertwined elements.
Source: https://1mask.io/
The template part contains a total of seven inscriptions, corresponding to seven unique types of templates, and their format follows image/svg+xml.
The basic principle of the algorithm part is to use the user wallet address as a seed and use random functions to create a variety of different color combinations to color the mask model.
The inscription generation mechanism uses recursive technology to reference algorithmic inscriptions. Each mask inscription is embedded with the HTML code needed to build the final colorful mask image. This is achieved by using a random seed to execute the code embedded in the algorithm inscription, while filling the random seed with user-specific on-chain data (such as a wallet address), making it random but relevant to the user.
Therefore, when the same wallet address uses the same template, the generated results will always be consistent.
Each time a new mask inscription is created, it incorporates user-specific on-chain details and references the algorithmic inscription. With the power of recursive inscription technology, once a newly created mask inscription enters the market or is indexed by a wallet, it will autonomously activate the reference code contained in the algorithmic inscription. These codes run with user-specific on-chain data as input, ultimately displaying a unique, personalized mask image.
In the Bitcoin network environment, the data contained in the inscription is immutable, thus ensuring its integrity. This characteristic determines that the real-time images presented based on this immutable inscription data are also immutable. As long as the random seeds and algorithms involved in the mask inscription are correct, users can verify the authenticity and accuracy of the creation process at any time.
Behind this project, 1Mask further launched a standard called BRC721Auto, proposing that fully on-chain generated art consists of at least two kinds of inscriptions: one is the inscription of the code, and the other is the inscription of the personalized parameters.
In Code Inscription, we need to code an algorithm that can automatically generate HTML DOM based on the content of parameters. The DOM can be a canvas, SVG, or other content that can be recognized by the browser and rendered as a graphic accordingly.
Of course, code inscriptions can also reference the contents of other inscriptions to complete their algorithms.
In the parameter inscription, we need to define an HTML and define a global parameter p in it to reference a Code Inscription. When ordinary browsers try to display this Parameter Inscription, they will recognize the global parameter p and automatically execute the start () function in the Code Inscription to add or modify the DOM of the current HTML, and finally render the content of this HTML. Therefore, parameter inscriptions can be regarded as the ultimate NFT (Non-Fungible Token).
With the help of Recursive Inscription technology, the code required to generate graphics, the code execution process, and the verification process are all protected by the Bitcoin blockchain consensus. Unless someone can launch a 51% attack on Bitcoin, no one can control the generation process of the ERC721Auto NFT, which will be performed autonomously by the Bitcoin ecosystem.
1Mask further proposed three major standards for generating art projects on the entire chain. The three major standards are:
Based on the above criteria, it is not difficult to find that on-chain art based on recursive inscriptions has the following characteristics:
Compared with other on-chain generative art projects such as Ethereum, the generative art based on BTC recursive inscriptions is a completely on-chain generative art. It is an independent, decentralized generative art that does not rely on any off-chain resources.
Due to the flexibility of recursive inscriptions, this provides a stage for geeks to display their talents, and projects rich in geek spirit further explore the boundaries of possibilities of Ordinals technology.
“Orbinals” is a typical representative of this. It is a geek project with no Twitter and no official website. All the content of the project is based on Uncommon sat. According to the latest price of f2pool, as of August 20, Uncommon sat The unit price reached more than 366 US dollars.
Source: https://www.ord.io/?satributes=uncommon&contentType=html&sortBy=newest
If you directly open the Orbinals collection series website, you will find that some of the referenced content of each picture in its celestial motion series is the same after opening, but there will be some differences in the parameters. Take a deep look at the referenced content in its recursive inscription. Finally, we can find the real secret about the project hidden in this reference link (https://ordin-delta.vercel.app/content/b5091b76f78d73677ad6b81e4785b0dfebc62b1079a0bf78b8366859a1ffacbci0). The full name of Orbinals is “Orbinals: Three Body Orbit Artifacts on Ordinals”. It utilizes HTML and JavaScript to program the motion of three celestial bodies, built upon the foundation of binary simulation code.
Source: https://evgenii.com/blog/three-body-problem-simulator/
With the support of mathematical and physical equations, the beauty of celestial motion is presented on the Bitcoin chain in a concise way.
And since there is no social media such as Twitter, Discord, or official website, the project will most likely use a very geeky approach, and future information will be presented on sats held by the team itself.
In addition to the four channels disclosed by the project, there is also a hidden Easter egg: within the referenced inscription content of the project (https://ordin-delta.vercel.app/content/4f59fc257a7c78d4074dcd7a4a55360d56986f474700adc7dc37ac231901fc40i0), there is a hidden string of instructions: “future Communication channels on /sats/ acknowledge,” and “acknowledge” happens to be one of the team’s sats.
Source: https://www.ord.io/sat/1940129935364125
BRC69 is a new standard for building recursive collections released by Luminex (https://github.com/luminexord/brc69). This standard uses recursive inscription to optimize the cost of inscribing on Bitcoin using ordinal protocols, which helps to introduce recursive collections. Additionally, BRC69 offers a high degree of flexibility and opens the door to more enhancements and capabilities, paving the way for more interesting on-chain features such as pre-show functionality and more.
With BRC69, the cost of inscriptions for the Ordinals collection can be reduced by over 90%. This reduction is achieved through a 4-step process:
All of these processes can occur without the need for external indexers, as long as collection creators publish official inscription lists for their collections in accordance with current requirements. Additionally, images will be automatically rendered on all front-end interfaces that have implemented recursive inscription, with no additional steps required.
Orditroops is a recursive NFT based on BRC69. It implements the content of the BRC69 protocol, increases the composability of features, and reduces the space occupied by pictures. The pictures are quite high-definition. The flexible combination of soldiers, weapons, and costumes all adds lots of features and fun to this NFT collection.
Source: https://twitter.com/OrdiTroops
Source: https://www.ord.io/3563188a3db53850bba48747293def7bd6b7395e4241b29ec7d49892945cf927i0
OCM is the first 3D NFT project to apply the recursive inscription standard. OnChainMonkey was originally an NFT project created on Ethereum in September 2021. Earlier this year, the OnChainMonkey series emerged as the first 10k series to be inscribed on Bitcoin.
As a high-resolution 3D animated inscription, OCM quickly stands out for its detail and quality. Remember, most inscriptions before it were still small text files or low-resolution images. OCM delivers good clarity even on 4K or 8K displays. This quality is achieved with files that are no more than 1 KB in size each, something that OCM’s previous projects have struggled to achieve.
OCM is able to achieve these feats primarily because it employs the powerful Recursive Inscription. The first 300 of OCM’s continuous 300 inscriptions on Bitcoin are inscribed on consecutive coins, sorted on-chain by their coin number starting from Block 78 in 2009. OCM builders have utilized compressed code and referenced the P5.JS and Three.JS libraries for future creators to use. Users can view and access the libraries in their browsers, with automatic decompression in the Ordinals protocol when rendering Dimensions Interactive Art.
Through Recursive Inscription, OCM efficiently utilizes block space (each less than 1 KB) and achieves random on-chain revelations, combining features such as high-definition quality, 3D, animation, and interactive art.
Source: https://ordinals.com/content/6fd06768414dfc2bd68b55869eea6844864fbf71ee72ec26568520e313c2bda2i0
By entering any word or phrase, you can generate unique on-chain music. This music engine is a companion product to the MUD RPG game “Descent Into Darkness,” allowing users to generate music by inputting keywords.
Founder Ratoshi emphasized the crucial role played by ChatGPT in utilizing music for this project’s development, while the use of Recursive Inscription helps significantly reduce costs. This unique blend of blockchain technology and artificial intelligence pays homage to classic music from retro electronic games.
A game requires multiple component materials such as pictures, front-end, and business logic. If the total size of the materials is less than 4M, it can be completed by inscribing a Sat without using recursive inscriptions.
There are two situations where recursive inscription technology is suitable:
The HTML (front-end) and JS (business logic) of the game are both inscribed on the “Satoshi” of BTC and reference each other to generate a single-player H5 mini-game.
Here are 3 examples of such single-player HTML5 mini-games:
a. Snake Game
Source: ord.io/431507
Bitcoin Snake Game is a typical HTML5 single-player mini-game, and it’s also a well-known game: Snake. The frontend and execution logic of this game are entirely written on this Sat, without using recursive inscription technology. The total number of NFTs in this series is 100.
Actually, a better approach would be to inscribe a JS file (business logic) on one Sat, and then use 100 different Sat inscriptions of HTML to reference (or call recursively) the Sat where the JS file is located to generate inscriptions. This would be more concise.
b. Concentration (card game)
Source: ord.io/18201467
As shown in the image, the game consists of a 3x4 digit grid (this is the easy mode, while the complex mode is a 6x6 digit grid). Two grid squares can be clicked open at a time. When the images on the two squares match, they stay displayed; if they don’t match, they are immediately covered by a question mark. The objective is to match all the images within a certain number of clicks to win. Limiting the number of clicks tests the player’s short-term memory.
This game is similar to the well-known Concentration card game. The JS and HTML of this game are all inscribed in this Sat, but it references a “background image” (background image as shown below), making it a simple application of recursive inscription.
Source: ord.io/18201467
c. MUD games
Source: https://ordinals.com/content/1915ae7d46502199a7d03256efd7f6e2f6aabb8ed7176b34f70b7b8fd778b36ci0
“Descent into Darkness” is a text-based role-playing game that combines classic MUD game elements with Ordinals technology to provide players with a unique gaming experience.
In “Descent into Darkness,” players take on the role of an adventurer seeking a way out in the darkness. The game features monsters, quests, and boss battles. Players must fight monsters to complete quests, unlock new tasks, earn coins to upgrade equipment, and buy items.
The three single-player H5 mini-games mentioned above are very simple applications. As games, they are incomplete. Processes such as game start, progress, and end are not recorded on the blockchain, and game progress cannot be saved. After the game ends, there are no changes to the inscription of the Sat. Only the game logic is defined, and the game state is not preserved. This is just a preliminary attempt at BTC chain gaming.
Source: https://twitter.com/btcpixelwar
BTC PixelWar is a BTC fully on-chain multiplayer game, claiming to be the first omnichain multiplayer game on the BTC network. Participants create on a canvas of 256*256 pixels. They can directly click on pixels or upload images to generate pixels on the canvas.
Each submission generates an inscription representing the latest state of the entire canvas. Each generated inscription references the previously produced inscription state, recursively layering the inscriptions. This may be the project with the highest recursion depth on the market, making it a landmark application in the field of recursive inscriptions.
The project introduces a new standard, “BRC721Cofound,” which utilizes recursive inscriptions to allow all Bitcoin users to collaborate on the same canvas and record their process. Each moment is represented by an inscription, depicting the state of the canvas at that moment. These inscriptions, known as “moment inscriptions,” contain newly added or updated pixels at that moment, as well as references to previous “moment inscriptions” and “code inscriptions” handling image changes between two moments.
Considering that many people may participate in drawing together, rendering the latest canvas state may require deep recursion to load every pixel drawn by each person. However, this process may lead to longer loading times. To address this issue, “code inscriptions” are designed to take a snapshot of the latest canvas state after rendering the current “moment inscription.” This snapshot is then stored in the DOM tree of the current “moment inscription.” As a result, modern browsers can simplify the rendering process by caching the DOM tree of each rendered moment inscription, reducing the recursion depth.
In summary, BTC PixelWar is an innovative and landmark BTC multiplayer fully on-chain game. It enables collaborative creation while optimizing the rendering process. The introduction of the “BRC721Cofound” standard opens up new possibilities for multiplayer game applications on the Bitcoin network and demonstrates the potential of recursive inscriptions in gaming and social domains.
Recursive inscriptions have ushered in the era of On-Chain Inscriptions 2.0, enriching the gameplay of BTC NFTs and paving the way for BTC NFTs to differentiate themselves from NFTs on other chains like Ethereum. The future narrative and imaginative space are vast.
Recursive inscriptions establish connections between previously independent inscriptions, allowing them to reference each other and form a diverse database structure. In previous articles, we discussed various derivative protocols based on Ordinals. In practice, when recursive inscriptions are combined with these derivative protocols, they can read other inscriptions and update their own state based on their smart instructions. This creates a coherent set of actions similar to smart contract effects, where protocols’ states can be directly manipulated through indexing.
At the same time, the vast recursive inscription database provides more operating and imaginative space for inscriptions, including metadata in various fields such as basic data, knowledge base, code library, function library, etc. They can directly reference each other to implement complex logic in product applications. Therefore, we can expect recursive inscriptions to be deeply adopted in generative art, chain games, metaverse, and other fields, and believe that future killer applications are brewing.
However, recursive inscriptions also face some challenges:
If these two points can be achieved, theoretically, the games or NFTs generated by recursive inscriptions can be infinitely complex and refined. These two problems are difficult to solve fundamentally due to the limitations of the BTC network itself, but they can be addressed through indirect technical solutions.
The recursive upgrade in the Ordinals protocol allows inscriptions to interact with each other, enabling new and exciting use cases. With this feature, generative art, on-chain displays, and efficient storage have become a reality. We can see that developers within the BTC ecosystem continue to create and develop various projects in directions such as chain games and generative art, and works based on recursive inscriptions are emerging one after another. Various components of a large project are slowly coming together, and in the future, we can further expect the emergence of projects with complex product logic, such as on-chain games, metaverse, and interactive generative art.
This article originally titled “深入解读递归铭文:BTC乐高组合与复杂逻辑产品的基石” is reproduced from [Gryphsis Academy]. All copyrights belong to the original author [@JellyZhouishere]. If you have any objection to the reprint, please contact Gate Learn team, the team will handle it as soon as possible.
Disclaimer: The views and opinions expressed in this article represent only the author’s personal views and do not constitute any investment advice.
Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.