Recently, the introduction of the Arc-20 protocol has once again sparked a frenzy in the inscription market. This article will delve into the details and advantages and disadvantages of the two protocols from a technical perspective.
Bitcoin was originally designed to be a secure, stable, and reliable decentralized digital currency. However, due to its technical architecture and relatively less flexible scripting language compared to Ethereum, Bitcoin is not suitable for directly executing smart contracts.
Despite this, developers’ innovative ideas and bold attempts have brought prosperity to the Bitcoin ecosystem. One typical example is the Brc-20 protocol. The core idea of the protocol is an experimental token form, centered on memes. Anyone can mint these tokens directly on the Bitcoin chain on a first-come, first-served basis without relying on smart contracts. The key feature of the Brc-20 token is its decentralized nature, which eliminates mechanisms such as private sales, pre-sales, and unlocking or staking. This ensures truly decentralized engagement.
In this context, the Arc-20 protocol has once again sparked a strong interest in inscriptions.
Brc-20 and Arc-20 protocols are both based on the Btc chain, so before we formally introduce the Arc-20 protocol and Brc-20 protocol, let’s briefly understand UTXO (unspent transaction output).
When we talk about Bitcoin, the UTXO (unspent transaction output) model is an important design concept. It is a type of account model used by Bitcoin, which is different from traditional balance models like bank accounts.
In the UTXO model, every Bitcoin transaction creates a series of unspent outputs, with each output representing a certain amount of Bitcoin. These unspent outputs are essentially unused units of digital currency, similar to paper bills or coins. When you receive Bitcoin, someone has actually created a new unspent output that is associated with your Bitcoin address. This output is the UTXO.
Let’s explain the UTXO model with a simple example:
If you have two transactions, one receiving 0.7 BTC and the other receiving 0.5 BTC, you will have two UTXOs, one worth 0.7 BTC and one worth 0.5 BTC. When you want to pay 1 BTC, you cannot simply use one UTXO, but you need to merge the two UTXOs into a new UTXO (with a total of 1.2 BTC), and then send 1 BTC to the recipient, with the remaining 0.2 BTC returned to yourself as change. However, the actual change may be less than 0.2 BTC because users need to pay a transaction fee to miners to ensure the smooth operation of the transaction.
BRC-20 is an experimental standard that demonstrates the possibility of creating fungible tokens on layer 1 of Bitcoin by leveraging ordinal theory and inscriptions. The Ordinals protocol (the first token minted to the protocol’s standards) allows content, including text, images or videos, to be imprinted on Bitcoin’s smallest unit, Satoshi, thereby creating unique digital assets.
Ordinal theory is the key to implementing inscriptions on the BTC network.
Each Satoshi is essentially the same, and Ordinals have developed a Satoshi ordering protocol through narrative theory. This ordering is based on the mining of Satoshis and the order of their transaction inputs and outputs.
There are several different ways to represent ordinal numbers:
The degree expression contains four parts: A°B′C″D‴, and A, B, C, and D represent different meanings:
Narrative theory determines the order of a Satoshi through degree expression, and defines different rarity levels for each Satoshi through the order, thereby achieving the uniqueness of each Satoshi
for example, for example, an existing degree is expressed as 1°1′0″0‴, where
With the rarity definition above, this Satoshi is defined as rare stoshi.
The general process is as follows:
py# Calculate the narrative (reward) of a block given a height
def subsidy(height):
return 50*100_000_000 >> height // 210_000
This function is used to calculate the reward for a Bitcoin block of a given height, where 50*100_000_000 is the starting reward of Bitcoin, >> is the right shift operator, equivalent to dividing by 2 integer divisions. This function returns an integer representing the reward amount for a block at a given height.
def first_ordinal(height):
start = 0
for h in range (height):
start += subsidy(h)
return start
This function calculates the ordinal number of the first reward for a block at a given height. Calculate the total number of rewards from the first block to a given height by iterating through the heights and accumulating the rewards for each block, resulting in the ordinal number of the first reward.
def assign_ordinals(block):
first = first_ordinal(block.height)
last = first + subsidy(block.height)
coinbase_ordinals =list(range(first, last))
def assign_ordinals(block):
first = first_ordinal(block.height)
last = first + subsidy(block.height)
coinbase_ordinals =list(range(first, last))
for transaction in block.transactions[1:]:
ordinals = []
for input in transaction.inputs:
ordinals.extend(input.ordinals)
for output in transaction.outputs:
output.ordinals = ordinals[:output.value]
of the ordinals[:output.value]
coinbase_ordinals.extend(ordinals)
for output in block.transactions[0].outputs:
output.ordinals = coinbase_ordinals[:output.value]
of the coinbase_ordinals[:output.value]
This function is used to assign an ordinal number to a given Bitcoin block. It first calculates the ordinal range of the first and last rewards of the block. Next, it iterates over each transaction in the block, assigning an ordinal number to each output. Finally, the outputs of the transaction are assigned ordinal numbers to ensure that all satoshis in the entire block have unique ordinal numbers.
In short, through ordinal theory, originals make each essentially the same Satoshi unique through processing, and define rare familiarity for each Satoshi through rules, realizing collection attributes or formulating rules to suit gameplay.
The Atomicals protocol is a simple and flexible protocol for minting, transferring, and updating digital objects (traditionally known as non-fungible tokens) on a blockchain with unspent transaction outputs (UTXOs) such as Bitcoin. An Atomical (or “atom”) is a way of managing the creation, transfer, and updating of digital objects - essentially a digital ownership chain defined by some simple rules.
Arc-20 adopts the colored coin model, which means that an Arc-20 token must have a satoshi support, unlike Brc-20 tokens that are differentiated by ordering. Since Arc-20 tokens are entirely based on satoshis, they can be split and merged (similar to UTXOs mentioned at the beginning of the article) and can be directly transferred over the Bitcoin network.
For example, using the Atomicals protocol, we can define 100 satoshis as 100 “movie tickets”, and users can use one of these 100 satoshis to pay at a movie theater that supports the Atomicals protocol, acting as a movie ticket.
However, miners and the Bitcoin network cannot know which UTXOs have been “Atomicalized”, which may mistakenly consider Arc-20 tokens as miner fees. To solve this issue, Atomicals instructs that each Arc-20 token should be the first output of a transaction to avoid accidental token destruction.
Next, we will analyze and compare the similarities and differences between the two protocols.
The agreement is roughly divided into three steps
{
“p”: “brc-20”,
“on”: “deploy”,
“tick”: “ordi”,
“max”: “21000000”,
“lim”: “1000”
}
Since the token information itself cannot be recognized by BTC when the deployer deploys the token, an indexer is needed to obtain relevant data on the chain and use this data to create a ledger off the chain to record relevant history and process related Operate and perform data updates.
The off-chain indexer needs to accurately capture and update the offline ledger for each token operation. However, similar to the blockchain, as the number of transactions increases, the data stored by nodes will become larger and larger. Ensuring the integrity of the ledger and finding the information that needs to be modified within the vast amount of data will become a challenge for BRC-20.
Similarly, the Arc-20 protocol also needs to record relevant information according to the format on the BTC chain when deploying tokens.
program.command(‘init-dft’)
.description(‘Initialize fungible token (FT) atomical in decentralized issuance mode’)
.argument(‘<ticker>’, ‘string’)
.argument(‘<mint_amount>’, ‘number’)
.argument(‘<max_mints>’, ‘number’)
.argument(‘<mint_height>’, ‘number’)
.argument(‘<file>’, ‘string’)
.option(‘—rbf’, ‘Whether to enable RBF for transactions.’)
.option(‘—funding <string>’, ‘Use wallet alias wif key to be used for funding and change’)
.option(‘—satsbyte <number>’, ‘Satoshis per byte in fees’, ‘15’)
.option(‘—mintbitworkc <string>’, ‘Whether to require any bitwork proof of work to mint. Applies to the commit transaction.’)
.option(‘—mintbitworkr <string>’, ‘Whether to require any bitwork proof of work to mint. Applies to the reveal transaction.’)
.option(‘—bitworkc <string>’, ‘Whether to put any bitwork proof of work into the token mint. Applies to the commit transaction.’)
.option(‘—bitworkr <string>’, ‘Whether to put any bitwork proof of work into the token mint. Applies to the reveal transaction.’)
.option(‘—parent <string>’, ‘Whether to require a parent atomical to be spent along with the mint.’)
.option(‘—parentowner <string>’, ‘Wallet owner of the parent to spend along with the mint.’)
.option(‘—disablechalk’, ‘Whether to disable the real-time chalked logging of each hash for Bitwork mining. Improvements mining performance to set this flag’)
.action(async (ticker, mintAmount, maxMints, mintHeight, file, options) => {
…..
}
In the atomicals-js cli source code, you can find the instructions for initializing a token. The parameters that need to be recorded on the chain are:
ticker: token name
mint_amount: total amount of mint
max_mints: the number of mints in a single time
mint_height: specifies the height of the block to start mint
file: related metadata
But unlike Brc20, Arc20 adopts a colored currency model. After the token-related information is entered into the BTC chain, the protocol will anchor the token with Sats:1 token = 1 sat。
At the same time, the use of the colored currency model allows users to conduct transactions directly through the BTC network instead of off-chain ledgers. Because the token balance is consistent with the satoshis in UTXO, the related changes in the token can be intuitively reflected on the chain. . The indexer in Arc-20 is only used to read the relevant deployment information of tokens on the chain and verify which tokens are compliant with the Arc-20 protocol.
The design structure of Brc-20 relies more on off-chain ledgers, while Arc-20 is more in line with the characteristics of Btc and is more decentralized compared to Brc-20. However, the colored coin model prevents Arc-20 from completing the issuance of meme coins, as meme coins often have a high total token supply, and the feature of 1 token = 1 sat requires a large amount of Btc to be consumed when issuing meme coins.
author:@YanAemons
Recently, the introduction of the Arc-20 protocol has once again sparked a frenzy in the inscription market. This article will delve into the details and advantages and disadvantages of the two protocols from a technical perspective.
Bitcoin was originally designed to be a secure, stable, and reliable decentralized digital currency. However, due to its technical architecture and relatively less flexible scripting language compared to Ethereum, Bitcoin is not suitable for directly executing smart contracts.
Despite this, developers’ innovative ideas and bold attempts have brought prosperity to the Bitcoin ecosystem. One typical example is the Brc-20 protocol. The core idea of the protocol is an experimental token form, centered on memes. Anyone can mint these tokens directly on the Bitcoin chain on a first-come, first-served basis without relying on smart contracts. The key feature of the Brc-20 token is its decentralized nature, which eliminates mechanisms such as private sales, pre-sales, and unlocking or staking. This ensures truly decentralized engagement.
In this context, the Arc-20 protocol has once again sparked a strong interest in inscriptions.
Brc-20 and Arc-20 protocols are both based on the Btc chain, so before we formally introduce the Arc-20 protocol and Brc-20 protocol, let’s briefly understand UTXO (unspent transaction output).
When we talk about Bitcoin, the UTXO (unspent transaction output) model is an important design concept. It is a type of account model used by Bitcoin, which is different from traditional balance models like bank accounts.
In the UTXO model, every Bitcoin transaction creates a series of unspent outputs, with each output representing a certain amount of Bitcoin. These unspent outputs are essentially unused units of digital currency, similar to paper bills or coins. When you receive Bitcoin, someone has actually created a new unspent output that is associated with your Bitcoin address. This output is the UTXO.
Let’s explain the UTXO model with a simple example:
If you have two transactions, one receiving 0.7 BTC and the other receiving 0.5 BTC, you will have two UTXOs, one worth 0.7 BTC and one worth 0.5 BTC. When you want to pay 1 BTC, you cannot simply use one UTXO, but you need to merge the two UTXOs into a new UTXO (with a total of 1.2 BTC), and then send 1 BTC to the recipient, with the remaining 0.2 BTC returned to yourself as change. However, the actual change may be less than 0.2 BTC because users need to pay a transaction fee to miners to ensure the smooth operation of the transaction.
BRC-20 is an experimental standard that demonstrates the possibility of creating fungible tokens on layer 1 of Bitcoin by leveraging ordinal theory and inscriptions. The Ordinals protocol (the first token minted to the protocol’s standards) allows content, including text, images or videos, to be imprinted on Bitcoin’s smallest unit, Satoshi, thereby creating unique digital assets.
Ordinal theory is the key to implementing inscriptions on the BTC network.
Each Satoshi is essentially the same, and Ordinals have developed a Satoshi ordering protocol through narrative theory. This ordering is based on the mining of Satoshis and the order of their transaction inputs and outputs.
There are several different ways to represent ordinal numbers:
The degree expression contains four parts: A°B′C″D‴, and A, B, C, and D represent different meanings:
Narrative theory determines the order of a Satoshi through degree expression, and defines different rarity levels for each Satoshi through the order, thereby achieving the uniqueness of each Satoshi
for example, for example, an existing degree is expressed as 1°1′0″0‴, where
With the rarity definition above, this Satoshi is defined as rare stoshi.
The general process is as follows:
py# Calculate the narrative (reward) of a block given a height
def subsidy(height):
return 50*100_000_000 >> height // 210_000
This function is used to calculate the reward for a Bitcoin block of a given height, where 50*100_000_000 is the starting reward of Bitcoin, >> is the right shift operator, equivalent to dividing by 2 integer divisions. This function returns an integer representing the reward amount for a block at a given height.
def first_ordinal(height):
start = 0
for h in range (height):
start += subsidy(h)
return start
This function calculates the ordinal number of the first reward for a block at a given height. Calculate the total number of rewards from the first block to a given height by iterating through the heights and accumulating the rewards for each block, resulting in the ordinal number of the first reward.
def assign_ordinals(block):
first = first_ordinal(block.height)
last = first + subsidy(block.height)
coinbase_ordinals =list(range(first, last))
def assign_ordinals(block):
first = first_ordinal(block.height)
last = first + subsidy(block.height)
coinbase_ordinals =list(range(first, last))
for transaction in block.transactions[1:]:
ordinals = []
for input in transaction.inputs:
ordinals.extend(input.ordinals)
for output in transaction.outputs:
output.ordinals = ordinals[:output.value]
of the ordinals[:output.value]
coinbase_ordinals.extend(ordinals)
for output in block.transactions[0].outputs:
output.ordinals = coinbase_ordinals[:output.value]
of the coinbase_ordinals[:output.value]
This function is used to assign an ordinal number to a given Bitcoin block. It first calculates the ordinal range of the first and last rewards of the block. Next, it iterates over each transaction in the block, assigning an ordinal number to each output. Finally, the outputs of the transaction are assigned ordinal numbers to ensure that all satoshis in the entire block have unique ordinal numbers.
In short, through ordinal theory, originals make each essentially the same Satoshi unique through processing, and define rare familiarity for each Satoshi through rules, realizing collection attributes or formulating rules to suit gameplay.
The Atomicals protocol is a simple and flexible protocol for minting, transferring, and updating digital objects (traditionally known as non-fungible tokens) on a blockchain with unspent transaction outputs (UTXOs) such as Bitcoin. An Atomical (or “atom”) is a way of managing the creation, transfer, and updating of digital objects - essentially a digital ownership chain defined by some simple rules.
Arc-20 adopts the colored coin model, which means that an Arc-20 token must have a satoshi support, unlike Brc-20 tokens that are differentiated by ordering. Since Arc-20 tokens are entirely based on satoshis, they can be split and merged (similar to UTXOs mentioned at the beginning of the article) and can be directly transferred over the Bitcoin network.
For example, using the Atomicals protocol, we can define 100 satoshis as 100 “movie tickets”, and users can use one of these 100 satoshis to pay at a movie theater that supports the Atomicals protocol, acting as a movie ticket.
However, miners and the Bitcoin network cannot know which UTXOs have been “Atomicalized”, which may mistakenly consider Arc-20 tokens as miner fees. To solve this issue, Atomicals instructs that each Arc-20 token should be the first output of a transaction to avoid accidental token destruction.
Next, we will analyze and compare the similarities and differences between the two protocols.
The agreement is roughly divided into three steps
{
“p”: “brc-20”,
“on”: “deploy”,
“tick”: “ordi”,
“max”: “21000000”,
“lim”: “1000”
}
Since the token information itself cannot be recognized by BTC when the deployer deploys the token, an indexer is needed to obtain relevant data on the chain and use this data to create a ledger off the chain to record relevant history and process related Operate and perform data updates.
The off-chain indexer needs to accurately capture and update the offline ledger for each token operation. However, similar to the blockchain, as the number of transactions increases, the data stored by nodes will become larger and larger. Ensuring the integrity of the ledger and finding the information that needs to be modified within the vast amount of data will become a challenge for BRC-20.
Similarly, the Arc-20 protocol also needs to record relevant information according to the format on the BTC chain when deploying tokens.
program.command(‘init-dft’)
.description(‘Initialize fungible token (FT) atomical in decentralized issuance mode’)
.argument(‘<ticker>’, ‘string’)
.argument(‘<mint_amount>’, ‘number’)
.argument(‘<max_mints>’, ‘number’)
.argument(‘<mint_height>’, ‘number’)
.argument(‘<file>’, ‘string’)
.option(‘—rbf’, ‘Whether to enable RBF for transactions.’)
.option(‘—funding <string>’, ‘Use wallet alias wif key to be used for funding and change’)
.option(‘—satsbyte <number>’, ‘Satoshis per byte in fees’, ‘15’)
.option(‘—mintbitworkc <string>’, ‘Whether to require any bitwork proof of work to mint. Applies to the commit transaction.’)
.option(‘—mintbitworkr <string>’, ‘Whether to require any bitwork proof of work to mint. Applies to the reveal transaction.’)
.option(‘—bitworkc <string>’, ‘Whether to put any bitwork proof of work into the token mint. Applies to the commit transaction.’)
.option(‘—bitworkr <string>’, ‘Whether to put any bitwork proof of work into the token mint. Applies to the reveal transaction.’)
.option(‘—parent <string>’, ‘Whether to require a parent atomical to be spent along with the mint.’)
.option(‘—parentowner <string>’, ‘Wallet owner of the parent to spend along with the mint.’)
.option(‘—disablechalk’, ‘Whether to disable the real-time chalked logging of each hash for Bitwork mining. Improvements mining performance to set this flag’)
.action(async (ticker, mintAmount, maxMints, mintHeight, file, options) => {
…..
}
In the atomicals-js cli source code, you can find the instructions for initializing a token. The parameters that need to be recorded on the chain are:
ticker: token name
mint_amount: total amount of mint
max_mints: the number of mints in a single time
mint_height: specifies the height of the block to start mint
file: related metadata
But unlike Brc20, Arc20 adopts a colored currency model. After the token-related information is entered into the BTC chain, the protocol will anchor the token with Sats:1 token = 1 sat。
At the same time, the use of the colored currency model allows users to conduct transactions directly through the BTC network instead of off-chain ledgers. Because the token balance is consistent with the satoshis in UTXO, the related changes in the token can be intuitively reflected on the chain. . The indexer in Arc-20 is only used to read the relevant deployment information of tokens on the chain and verify which tokens are compliant with the Arc-20 protocol.
The design structure of Brc-20 relies more on off-chain ledgers, while Arc-20 is more in line with the characteristics of Btc and is more decentralized compared to Brc-20. However, the colored coin model prevents Arc-20 from completing the issuance of meme coins, as meme coins often have a high total token supply, and the feature of 1 token = 1 sat requires a large amount of Btc to be consumed when issuing meme coins.
author:@YanAemons