laitimes

Coming soon, what should you know about the Runes protocol?

author:MarsBit

原文作者:Trustless Labs

原文来源:foresightnews

We are less than a week away from the 840,000 block of the BTC halving, which also means that the long-awaited Runes of the entire BTC ecosystem is about to be launched.

Although platforms such as OKX Wallet and Unisat already provide public etching platforms, it will be advantageous to run your own Bitcoin full node and index to run your own Bitcoin full node and index, and understand how Runes works, so as to optimize them in a targeted manner.

In this article, we will try to introduce Runes in terms of technical implementation, distribution rules, estimated costs, and so on.

Runes protocol is an asset protocol deployed by Casey, the founder of Ordinals, to issue fungible tokens on the Bitcoin network, and the fundamentals of Runes are also the legitimacy and fair distribution window of its Ordinals protocol.

It can be expected that the Runes protocol will bring very active on-chain interactions after the halving, and the hot spots that can be followed will include but are not limited to

  • Casey's creation runes hard-coded in the Runes protocol
  • Airdrop of Runes tokens corresponding to NFTs such as Rsic, Runestone, etc
  • Community-led deployment and fomo of the Runes token

principle

The way BRC20 is known as an inscription, i.e. the token data is written into the signature of the SegWit and the data is bound to a specific satoshim. In order to ensure the legitimacy of the transaction, the Brc20 transfer must first become transferable through the inscription, and then transfer the corresponding engraved UTXO through the second transaction to complete the transfer.

The method of Atomicals is called dyeing, and the balance of Arc20 relies on the number of satoshis under a UTXO, which strictly follows the correspondence of 1 token = 1 sats, so Arc20 transfers can be completely processed by the BTC network as a general transaction, the index is relatively simple, and the native characteristics of BTC can be used.

The way of Runes is called etching, the balance of a Runes is bound under a UTXO, and the data on the number of this balance, token symbol and other information is recorded under the OP-RETURN of the transaction, which can be regarded as a note of the transaction (up to 80 bytes), and the data contains json that indicates the number of Runes tokens represented by the utxo under the BTC transaction, and the indexer of Runes is required to identify these tokens.

In summary, Runes binds BTC UTXO, or treats BTC UTXO as a pointer to Runes tokens, and OP-RETURN is the pointer's assignment statement.

When the Runes token is transferred, the UTXO representing the Runes token needs to be used as input, the amount of the transfer is written in OP-RETURN, and the specified utxo is used as the first output, the set amount of Runes tokens will be transferred to the destination address of utxo1, and the remaining Runes tokens will be automatically bound to other utxos such as utxo2 in order. utxo1 can be output to someone else's address, and utxo2 can be exported to oneself as change, thus completing a runes transfer. At the same time, Runes also comes with a burn function, which can declare the burning of tokens.

Unlike Brc20, which only uses BTC to store transfer records, Runes tokens are strictly UTXO binding, allowing them to apply the various benefits that come with BTC UTXOs, which is similar to Arc20, but differs in that Runes' utxo can represent any number of tokens, while the amount of Arc20 is strictly related to the number of sats contained under the bonded UTXO (which is difficult to split), but at the same time, Arc20 is less dependent on the indexer, Runes The legitimacy of token transfers still requires the records of the ORD index ledger.

JSON

struct Runestone {

edicts: Vec

etching: Option

mint: Option

pointer: Option

}

struct Edict {

id: RuneId

amount: u128,

output: u32,

}

The flexibility of json data under OP-RETURN allows it to operate batch transfers of Runes tokens at one time, including the transfer of different types of Rune assets such as RuneA and RuneB in the same Bitcoin transaction.

Distribution rules

Under the initial distribution process of Runes tokens, you first need to etch the token information and distribution rules.

Token information includes the minimum split unit, asset name, name symbol splitter, symbol, etc., it should be noted that the name of the Runes asset is not limited in length, and includes • This kind of divider, which may be more complicated, must be recognized when minting new assets.

JSON

struct Etching {

divisibility: Option

Lover: Option

rune: Option

spacers: Option

symbol: Option

terms: Option

}

In the distribution rules section, Runes allows deployers to pre-allocate tokens to themselves, so it is important to identify whether it is a fair launch, and this feature can be used for the distribution of assets such as Runestone and Rsic.

Under the Terms data of the distribution rule, the limit on the number of mint tokens at a time, the total number of mint sheets, and the start and end blocks of mint are included. Here you can set the total number of mints to be unlimited and unlimited for a limited time, as is the case with the rune UNCOMMON•GOODS deployed by casey 0.

JSON

struct Terms {

amount: Option

cap: Option

height: (Option

offset: (Option

}

At the same time, the user's spontaneous mint process needs to write the data type of Runestone under OP-RETURN (which has nothing to do with the rune NFT Runestone), and a transaction can only be mint once, so if you want to get more chips, you need to divide it into multiple UTXOs under one address.

Runes will start at block 840,000, and the ord index has been updated to the latest version 0.18.1, which now fully supports runes token query, etch (equivalent to Brc20 deploy), mint and other functions. These assets are distributed completely fairly and are free to mint, and the names that Casey has mentioned are COMMUNISTRUNE, ANARCHISTRUNE, CYPERPUNKRUNE. NOW YOU CAN ALREADY SEE IN THE INDEX THE NAME UNCOMMOM. GOODS' GENESIS RUNE.

The deployment of Runes asset names is limited by the ORD index, and 13-26 character names can be freely deployed after 840,000 blocks, and 12-character names are gradually unlocked. After every 17,500 blocks (about 120 days) the deployment of a name with a shorter one digit is unlocked, so to mint to 4 character tokens, you need to wait 3 years.

Although the early super-long names are not conducive to hype, the good thing is that you can design a special symbol to represent the asset, which conforms to the Unicode standard, so you can write a lot of emojis, and choosing a good emoji is also something you need to pay attention to when deploying memes.

Estimated costs

The protocol code for the current Runes is basically finalized and has been running on the testnet for a while, so some cost predictions can be made. We can already see that there are up to 497 runes of test tokens deployed on the Signet testnet and 963 runes on the Testnet by running the ORD index on Signet. At the same time, we also conducted some experiments and tests on signet to measure the cost and schedule of MINT.

Signet 测试网 0~9 号 Runes 代币:

Plain Text

THESE•WILL•BE•WORTHLESS

GREG•GREG•GREG

CUBS•FIRST•RUNES•TOKEN

AMAZING•KODA•FART

SORA•PARTY•STARTS•FIVE•DOLLARS

WAKE•N•BAKE

RECURSIONS•ROBOTS•RUNES•QUIZ

FRENCH•WON

SATOSEA•XYZ

We did a number of mint,ord commands for multiple runes tokens on the signet testnet:

Bash

$ ord --index-runes --bitcoin-rpc-password xxx --bitcoin-rpc-username xxx -s wallet mint --fee-rate 1 --rune HARRY•POTTER•OBAMA•SONIC•IO•INU

{

"runes": "HARRY•POTTER•OBAMA•Sonic•IO•INU",

"pile": {

"amount": 1000,

"divisibility": 0,

"symbol": "🧹"

},

"MINT": "645829BDAF105CCECC012629A3BBB6E9DFCfe92FA09499EA54B87092C9100946"

}

The transaction is as follows: https://mempool.space/zh/signet/tx/645829bdaf105ccecc012629a3bbb6e9dfcfe92fa09499ea54b87092c9100946

Coming soon, what should you know about the Runes protocol?

指定 destination 作为接收 Runes 代币的地址:

Bash

$ ord --index-runes --bitcoin-rpc-password xxx --bitcoin-rpc-username xxx -s wallet mint --fee-rate 1 --rune MAOBY•THE•CUTEST•CAT --postage 1000sat --destination tb1p43k8gxevpc0x3hthv9dm33589gecn8mr4rkl303js3gtvmpehltqg2mmc4

{

"rune": "MAOBY•THE•CUTEST•CAT",

"pile": {

"amount": 100,

"divisibility": 0,

"symbol": "🐈"

},

"mint": "32125d247a282ebf53b893a17f3c2c99a7747749233dc010bd9ae2934540c981"

}

The transaction is as follows: https://mempool.space/zh/signet/tx/32125d247a282ebf53b893a17f3c2c99a7747749233dc010bd9ae2934540c981

Coming soon, what should you know about the Runes protocol?

If the feerate is 300-1000 sats/vB in extreme cases, the cost of a mint is about 0.0023-0.00069 BTC (150u-50u), and the ord supports specifying the destination address, so you can mint to the destination address in batches after splitting the utxo.

If the FOMO sentiment is high after the halving, and there are 3000 transactions for Runes mint in each block in the early stage, the mint of Runes tokens consumes about 198.72 BTC of gas cost in one day, which will provide some reference for calculating the market value of FOMO chips in the early stage.