آر جی بی میجک: کلائنٹ سائیڈ کنٹریکٹس آن Bitcoin

By Bitcoin میگزین - 1 سال پہلے - پڑھنے کا وقت: 9 منٹ

آر جی بی میجک: کلائنٹ سائیڈ کنٹریکٹس آن Bitcoin

RGB is a method of ownership verification built on Bitcoin that allows for the continuation of Bitcoin’s properties.

This is an opinion editorial by Federico Tenga, a long time contributor to Bitcoin projects with experience as start-up founder, consultant and educator.

تصویری ماخذ

The term "smart contracts" predates the invention of the blockchain and Bitcoin itself. Its first mention is in a نک سازبو کا 1994 کا مضمون, who defined smart contracts as a "computerized transaction protocol that executes the terms of a contract." While by this definition Bitcoin, thanks to its scripting language, supported smart contracts from the very first block, the term was popularized only later by Ethereum promoters, who twisted the original definition as "code that is redundantly executed by all nodes in a global consensus network"

اگرچہ عالمی اتفاق رائے کے نیٹ ورک کو کوڈ پر عمل درآمد کے حوالے کرنے کے فوائد ہیں (مثال کے طور پر غیر منظور شدہ معاہدوں کو تعینات کرنا آسان ہے، جیسے کہ مقبول خودکار مارکیٹ ساز)، اس ڈیزائن میں ایک بڑی خامی ہے: اسکیل ایبلٹی کی کمی (اور رازداری)۔ اگر نیٹ ورک میں ہر نوڈ کو بے کار طور پر ایک ہی کوڈ کو چلانا ضروری ہے، تو کوڈ کی مقدار جو حقیقت میں کسی نوڈ کو چلانے کی لاگت میں ضرورت سے زیادہ اضافہ کیے بغیر عمل میں لائی جا سکتی ہے (اور اس طرح وکندریقرت کو بچانا) نایاب رہتا ہے، مطلب یہ ہے کہ صرف بہت کم معاہدے ہو سکتے ہیں۔ پھانسی دی گئی

لیکن کیا ہوگا اگر ہم ایک ایسا نظام ڈیزائن کر سکتے ہیں جہاں معاہدے کی شرائط کو نیٹ ورک کے تمام ممبران کے بجائے صرف اس میں شامل فریقین کے ذریعہ عمل میں لایا جائے اور اس کی توثیق کی جائے؟ آئیے ایک ایسی کمپنی کی مثال کا تصور کریں جو حصص جاری کرنا چاہتی ہے۔ جاری کرنے کے معاہدے کو عالمی لیجر پر عوامی طور پر شائع کرنے اور ملکیت کی مستقبل کی تمام منتقلیوں کو ٹریک کرنے کے لیے اس لیجر کا استعمال کرنے کے بجائے، یہ حصص کو نجی طور پر جاری کر سکتا ہے اور خریداروں کو ان کی مزید منتقلی کا حق دے سکتا ہے۔ اس کے بعد، ملکیت کی منتقلی کا حق ہر نئے مالک کو اس طرح دیا جا سکتا ہے جیسے یہ اصل اجراء کے معاہدے میں ترمیم ہو۔ اس طرح، ہر مالک آزادانہ طور پر تصدیق کر سکتا ہے کہ اسے موصول ہونے والے حصص اصل معاہدے کو پڑھ کر اور اس بات کی توثیق کر سکتے ہیں کہ حصص کو منتقل کرنے والی تمام ترامیم کی تاریخ اصل معاہدے میں بیان کردہ قواعد کے مطابق ہے۔

یہ حقیقت میں کوئی نئی بات نہیں ہے، یہ واقعی وہی طریقہ کار ہے جو عوامی رجسٹروں کے مقبول ہونے سے پہلے جائیداد کی منتقلی کے لیے استعمال کیا جاتا تھا۔ برطانیہ میں, for example, it was not compulsory to register a property when its ownership was transferred until the ‘90s. This means that still today over 15% of land in England and Wales is unregistered. If you are buying an unregistered property, instead of checking on a registry if the seller is the true owner, you would have to verify an unbroken chain of ownership going back at least 15 years (a period considered long enough to assume that the seller has sufficient title to the property). In doing so, you must ensure that any transfer of ownership has been carried out correctly and that any mortgages used for previous transactions have been paid off in full. This model has the advantage of improved privacy over ownership, and you do not have to rely on the maintainer of the public land register. On the other hand, it makes the verification of the seller's ownership much more complicated for the buyer.

ماخذ: غیر رجسٹرڈ رئیل اسٹیٹ کی ملکیت کا ٹائٹل ڈیڈ

غیر رجسٹرڈ جائیدادوں کی منتقلی کو کیسے بہتر بنایا جا سکتا ہے؟ سب سے پہلے، اسے ایک ڈیجیٹائزڈ عمل بنا کر۔ اگر کوئی ایسا کوڈ ہے جسے کمپیوٹر کے ذریعے اس بات کی تصدیق کرنے کے لیے چلایا جا سکتا ہے کہ ملکیت کی منتقلی کی تمام تاریخ اصل معاہدے کے قواعد کے مطابق ہے، تو خرید و فروخت بہت تیز اور سستی ہو جاتی ہے۔

دوم، بیچنے والے کے اپنے اثاثے کو دوگنا خرچ کرنے کے خطرے سے بچنے کے لیے، اشاعت کے ثبوت کا ایک نظام لاگو کیا جانا چاہیے۔ مثال کے طور پر، ہم ایک اصول نافذ کر سکتے ہیں کہ ملکیت کی ہر منتقلی کا ارتکاب کسی معروف اخبار کے پہلے سے طے شدہ جگہ پر ہونا چاہیے (مثلاً ملکیت کی منتقلی کا ہیش نیویارک کے پہلے صفحہ کے اوپری دائیں کونے میں رکھیں۔ اوقات)۔ چونکہ آپ ٹرانسفر کی ہیش کو ایک ہی جگہ دو بار نہیں رکھ سکتے، اس لیے یہ دو بار خرچ کرنے کی کوششوں کو روکتا ہے۔ تاہم اس مقصد کے لیے مشہور اخبار کے استعمال کے کچھ نقصانات ہیں:

You have to buy a lot of newspapers for the verification process. Not very practical.Each contract needs its own space in the newspaper. Not very scalable.The newspaper editor can easily censor or, even worse, simulate double-spending by putting a random hash in your slot, making any potential buyer of your asset think it has been sold before, and discouraging them from buying it. Not very trustless.

For these reasons, a better place to post proof of ownership transfers needs to be found. And what better option than the Bitcoin blockchain, an already established trusted public ledger with strong incentives to keep it censorship-resistant and decentralized?

اگر ہم استعمال کریں Bitcoin, we should not specify a fixed place in the block where the commitment to transfer ownership must occur (e.g. in the first transaction) because, just like with the editor of the New York Times, the miner could mess with it. A better approach is to place the commitment in a predefined Bitcoin transaction, more specifically in a transaction that originates from an unspent transaction output (UTXO) to which the ownership of the asset to be issued is linked. The link between an asset and a bitcoin UTXO can occur either in the contract that issues the asset or in a subsequent transfer of ownership, each time making the target UTXO the controller of the transferred asset. In this way, we have clearly defined where the obligation to transfer ownership should be (i.e in the Bitcoin transaction originating from a particular UTXO). Anyone running a Bitcoin node can independently verify the commitments and neither the miners nor any other entity are able to censor or interfere with the asset transfer in any way.

Since on the Bitcoin blockchain we only publish a commitment of an ownership transfer, not the content of the transfer itself, the seller needs a dedicated communication channel to provide the buyer with all the proofs that the ownership transfer is valid. This could be done in a number of ways, potentially even by printing out the proofs and shipping them with a carrier pigeon, which, while a bit impractical, would still do the job. But the best option to avoid the censorship and privacy violations is establish a direct peer-to-peer encrypted communication, which compared to the pigeons also has the advantage of being easy to integrate with a software to verify the proofs received from the counterparty.

This model just described for client-side validated contracts and ownership transfers is exactly what has been implemented with the RGB protocol. With RGB, it is possible to create a contract that defines rights, assigns them to one or more existing bitcoin UTXO and specifies how their ownership can be transferred. The contract can be created starting from a template, called a "schema," in which the creator of the contract only adjusts the parameters and ownership rights, as is done with traditional legal contracts. Currently, there are two types of schemas in RGB: one for issuing fungible tokens (آرجیبی 20) اور جمع کرنے کے لیے ایک سیکنڈ (آرجیبی 21)، لیکن مستقبل میں، پروٹوکول کی سطح پر تبدیلیوں کی ضرورت کے بغیر کوئی بھی شخص بغیر اجازت کے مزید اسکیمے تیار کر سکتا ہے۔

To use a more practical example, an issuer of fungible assets (e.g. company shares, stablecoins, etc.) can use the RGB20 schema template and create a contract defining how many tokens it will issue, the name of the asset and some additional metadata associated with it. It can then define which bitcoin UTXO has the right to transfer ownership of the created tokens and assign other rights to other UTXOs, such as the right to make a secondary issuance or to renominate the asset. Each client receiving tokens created by this contract will be able to verify the content of the Genesis contract and validate that any transfer of ownership in the history of the token received has complied with the rules set out therein.

So what can we do with RGB in practice today? First and foremost, it enables the issuance and the transfer of tokenized assets with better scalability and privacy compared to any existing alternative. On the privacy side, RGB benefits from the fact that all transfer-related data is kept client-side, so a blockchain observer cannot extract any information about the user's financial activities (it is not even possible to distinguish a bitcoin transaction containing an RGB commitment from a regular one), moreover, the receiver shares with the sender only blinded UTXO (i. e. the hash of the concatenation between the UTXO in which she wish to receive the assets and a random number) instead of the UTXO itself, so it is not possible for the payer to monitor future activities of the receiver. To further increase the privacy of users, RGB also adopts the bulletproof cryptographic mechanism to hide the amounts in the history of asset transfers, so that even future owners of assets have an obfuscated view of the financial behavior of previous holders.

In terms of scalability, RGB offers some advantages as well. First of all, most of the data is kept off-chain, as the blockchain is only used as a commitment layer, reducing the fees that need to be paid and meaning that each client only validates the transfers it is interested in instead of all the activity of a global network. Since an RGB transfer still requires a Bitcoin transaction, the fee saving may seem minimal, but when you start introducing transaction batching they can quickly become massive. Indeed, it is possible to transfer all the tokens (or, more generally, "rights") associated with a UTXO towards an arbitrary amount of recipients with a single commitment in a single bitcoin transaction. Let's assume you are a service provider making payouts to several users at once. With RGB, you can commit in a single Bitcoin transaction thousands of transfers to thousands of users requesting different types of assets, making the marginal cost of each single payout absolutely negligible.

Another fee-saving mechanism for issuers of low value assets is that in RGB the issuance of an asset does not require paying fees. This happens because the creation of an issuance contract does not need to be committed on the blockchain. A contract simply defines to which already existing UTXO the newly issued assets will be allocated to. So if you are an artist interested in creating collectible tokens, you can issue as many as you want for free and then only pay the bitcoin transaction fee when a buyer shows up and requests the token to be assigned to their UTXO.

Furthermore, because RGB is built on top of bitcoin transactions, it is also compatible with the Lightning Network. While it is not yet implemented at the time of writing, it will be possible to create asset-specific Lightning channels and route payments through them, similar to how it works with normal Lightning transactions.

نتیجہ

آر جی بی ایک اہم اختراع ہے جو مکمل طور پر نئے پیراڈائم کا استعمال کرتے ہوئے نئے استعمال کے معاملات کو کھولتی ہے، لیکن اسے استعمال کرنے کے لیے کون سے ٹولز دستیاب ہیں؟ اگر آپ ٹیکنالوجی کے بنیادی حصے کے ساتھ تجربہ کرنا چاہتے ہیں، تو آپ کو براہ راست آزمانا چاہیے۔ آر جی بی نوڈ. اگر آپ پروٹوکول کی پیچیدگی میں گہرا غوطہ لگائے بغیر آر جی بی کے اوپر ایپلی کیشنز بنانا چاہتے ہیں، تو آپ استعمال کر سکتے ہیں rgb-lib لائبریری، جو ڈویلپرز کے لیے ایک سادہ انٹرفیس فراہم کرتا ہے۔ اگر آپ صرف اثاثے جاری کرنے اور منتقل کرنے کی کوشش کرنا چاہتے ہیں تو آپ اس کے ساتھ کھیل سکتے ہیں۔ Android کے لیے Iris Wallet، جس کا کوڈ بھی اوپن سورس آن ہے۔ GitHub کے. اگر آپ صرف RGB کے بارے میں مزید جاننا چاہتے ہیں تو آپ چیک آؤٹ کر سکتے ہیں۔ وسائل کی یہ فہرست.

This is a guest post by Federico Tenga. Opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or Bitcoin میگزین.

اصل ذریعہ: Bitcoin میگزین