Blockchain Agnostic Asset Protocols

While PeerAssets (PA) is part of a broad class of cryptocurrency asset-creation protocols, it has many advantages over other implementations. Asset protocols can be complex, even so far as to be a full turing-complete scripting language in which asset creation is just one of many possible functions. Other protocols are very simple, using a minimal set of basic functions such as “issue”, “transfer”, and “vote”. PA is as minimalist as possible, seeking to find the most efficient and affordable method for a blockchain to support tokenization. Other systems that can satisfy the goal of tokenization include colored coins, counterparty and omni protocols, Ethereum contracts, and other solutions like protocol level assets on NXT.



Blockchain agnosticism is a powerful feature of some protocols that allow the system to operate on virtually any blockchain by using common data fields in a transaction such as output addresses. Protocol-aware clients read messages encoded into these transactions and will present them to the user as tokens which the user can interact with. Because most blockchains share these same data fields, these protocols can be ported to nearly any cryptocurrency if a different blockchain is more suitable for any reason, such as security or governance. This is distinctly opposed to core protocols such as Ethereum smart contracts and the NXT asset system, as they are intrinsically tied to data fields not present in other cryptocurrency transactions.

Protocol Specifications

So far, blockchain agnostic asset protocols have been coded in two flavors. The first uses a 1-of-n multisignature address to encode relevant data into (n-1) private keys. When a small amount is sent to these special addresses clients can record the transaction as an asset event like a transfer or a vote. The use of multisig is done so that the output can be claimed by the sender to avoid bloating the UTXO table. The second method uses the OP_RETURN field of a transaction to post the encrypted asset function. The OP_RETURN field is a section of a cryptocurrency transaction that is open to contain any data desired without affecting the core outcome of the transaction. Essentially, core clients will ignore this field, making it perfect for protocol-aware clients. These fields are typically ~80 bytes and the protocol will use a marker string at the start of the message to tag transactions as protocol-relevant, such as the ‘CNTRPRTY’ string at the beginning of a counterparty function.

All previous blockchain agnostic asset protocols require a resource intensive asset node that will sift through the entire blockchain looking for messages encoded in the transactions. These heavy nodes greatly limit the applications of asset protocols, especially for larger blockchains like Bitcoin. A client is required to not only download the whole chain, but also search every transaction looking for relevant markers or addresses. The alternative is to rely on centralized API providers such that the client is no longer using a decentralized consensus process. Therefore, there is demand for a solution that not only avoids parsing the entire chain, but one that can also pick out just the relevant asset transactions without having to read through every other asset on the network.

PeerAssets uses a new flavor of protocol that utilizes both address and OP_RETURN to greatly reduce the required node resources. It uses a Pay-to-Tag-Hash (P2TH) system by which an output address with a publicly known public/private key pair is sent a small amount to mark the transaction as part of a ‘deck’. Any token function can tag the host transaction as a specific deck transaction using an output to the known P2TH address, though the token data is contained within OP_RETURN. The publicly known private key allows a light wallet to directly import the tagged address so the client can simply concern itself with the response to a ‘listoutputs’ RPC call tailored to the relevant assets. This method avoids searching through multitudes of hashes and transactions for the correct marker code or multisig address, allowing for very light asset wallets and efficient use of blockchain space.