Casey Rodarmor, the founder of the Bitcoin NFT protocol Ordinals, has introduced a new Bitcoin NFT protocol design concept known as "Rune." This protocol is also referred to as the "Runes" protocol.
Rune balances are held in UTXOs (Unspent Transaction Outputs), and each UTXO can contain any number of runes.
If a transaction includes an output with a pubkey script containing OP_RETURN followed by a data push of uppercase ASCII letter 'R,' then the transaction contains a protocol message. The protocol message is the first data pushed after this condition is met.
Runes involved in transactions with invalid protocol messages will be destroyed. This allows for future upgrades to change the allocation or creation of runes, preventing old clients from incorrectly allocating rune balances.
Integers are encoded as prefix varints, with the leading number in the varint determining its length in bytes.
Transfer of Rune Tokens
The first data output in the protocol message is decoded as an integer sequence containing three types of information: "ID," "OUTPUT," and "AMOUNT." If the decoded integer count is not a multiple of 3, the protocol message is considered invalid.
- ID: Specifies which Rune Token is being transferred. Each Rune Token is assigned an ID starting from 1, with lower ID values assigned to tokens created earlier.
- OUTPUT: Determines the allocation to which the Rune Token is assigned.
- AMOUNT: Represents the quantity of Rune Tokens being transferred. If the AMOUNT is 0, it signifies the entire remaining balance of the account.
After processing all operations contained in the integer sequence, any remaining Rune Tokens not involved in operations are allocated to the first non-OP_RETURN output. Additionally, if Rune Tokens are allocated to the OP_RETURN output containing the protocol message, they may be burned.
Creation of Rune Tokens
If there is a second data output following the protocol message, the transaction is considered a Rune Token creation transaction. This portion of the data output is decoded into two integers: "SYMBOL" and "DECIMALS." If there are additional integers, they are considered invalid.
- SYMBOL: Equivalent to the ticker of a BRC-20 token (i.e., the token's name), with a maximum length of 26 characters and only using uppercase letters A to Z.
- DECIMALS: Represents precision, determining how many decimal places the Rune Token can support.
If the "SYMBOL" has not been used before, the Rune Token will be assigned an ID value, with the first Rune Token created having an ID of 1. Names such as BITCOIN, BTC, and XBT are prohibited. The creation will be invalid if the "SYMBOL" has already been used. In other words, the Rune protocol does not support the creation of tokens with the same name.
Display of Bitcoin Balances in UTXOs
In a UTXO, Bitcoin balances will be displayed as BITCOIN, BTC, or XBT, or alternatively, as an ID value of 0. To keep the protocol simple, Runes does not implement a mechanism to prevent symbol squatting. A practical and straightforward approach to avoiding symbol squatting is to allow the allocation of symbols exceeding a certain length, which decreases over time and eventually reaches zero, allowing all symbols. This prevents the early allocation of short, desirable symbols in the protocol and encourages competition for ideal symbols among latecomers if such competition is meaningful.
For more analysis, please follow Aibit's media account for real-time updates! This article is for reference only, does not represent any position, and is not intended as investment advice. Investment is risky, caution should be exercised.
Website:www.aibit.com
Twitter:https://twitter.com/Aibitcom
Telegram ENG:https://t.me/Aibitcom
Telegram News:https://t.me/Aibitcom_news
Telegram CN:https://t.me/Aibitcom_cn
Discord:https://discord.gg/Aibitcom
Medium:https://medium.com/@Aibitcom