menu
search

Blogs & Articles: Native Confidential Assets on the Liquid Network đź”— 3 years ago

grubles on Medium

How to issue your own digital asset in less than a minute on Liquid

tl;dr: Liquid makes it exceptionally easy to issue new assets. Scroll down to skip the tech details to learn how to start issuing assets.

Modern Native Assets

Legacy platforms today rely on smart contract developers handwriting or customizing already written code in order to issue tokens or assets. This has unfortunately resulted in some bugs being uncovered that could allow theft — with one in particular so it nasty it could be used to drain exchanges into insolvency. This sort of bolted-on approach has some apparent flaws since it allows unintentional token contract inconsistencies and incompatibilities.

A different more modern approach is natively supported asset issuance. The Liquid Network is a Bitcoin sidechain built from the Bitcoin Core codebase and includes additional features such as 1-minute deterministic block times, Confidential Transactions which include encrypted transaction amounts, and Confidential Assets which is the technology that enables the issuance of assets in Liquid transactions.

How Native Issuance Works

An overview of how asset issuance and transfers occur on Liquid requires a short refresher on how Bitcoin transactions in general work since Liquid transactions are essentially the same as Bitcoin transactions except with a few additional data fields.

Bitcoin Transactions

All Bitcoin transactions (with the exception of newly mined coins) require inputs and outputs. Inputs are references to other older outputs, and the outputs are a list of addresses and amounts. A fee is also required but handled differently between Bitcoin and Liquid. Bitcoin transaction fees are also implied while they are explicit on Liquid.

Liquid Transactions

Liquid transactions operate in a similar manner with the requirement of having inputs and outputs. However, Liquid transactions by default do not have any amounts in any of the inputs or outputs. Instead of amounts, a cryptographic primitive called a Pedersen commitment is used in their place.

These Pedersen commitments are the encrypted version of the amount data and reveal no information about the underlying amounts. Transaction validators (people running full Liquid nodes) can add up both the input commitments and the output commitments to make sure no inflation or destruction of funds has occurred.

An example of an encrypted value commitment:

084c1b92258476dca8a41aa2e25be0ffb0491d005441bbc0cb9e59bc7f5cb5c43c

Additional Assets

Liquid, being a Bitcoin sidechain, supports BTC by way of a proxy asset named L-BTC (for Liquid BTC). This asset is pegged 1:1 to mainchain BTC sent to the Liquid Federation multisig wallet. L-BTC is created and destroyed based on the amount of mainchain BTC stored in the Federation wallet.

Liquid also supports the creation of additional assets. Examples of other assets issued on Liquid are stablecoins USDt, L-CAD, or the security token EXO. Single-unit non-fungible tokens can also be issued to represent digital art, collectibles, or even deeds.

As we learned earlier, Liquid by default encrypts transaction amounts by substituting the plaintext amount values with Pedersen commitments. To support native assets, an asset tag is included in the transaction data and contains the asset’s identifier. All assets on Liquid (including L-BTC) have their own unique asset IDs, meaning all of the L-BTC on Liquid has the same asset ID, USDt on Liquid has its own asset ID, etc.

L-BTC’s unique asset ID is:

6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d

Blinding Liquid asset types

To encrypt the asset types on Liquid, the plaintext asset tags are similarly encrypted and replaced with Pedersen commitments. Here is an example Liquid transaction. As you can see, the outputs contain both Asset Commitment and Value Commitment .

With the cryptography involved, it’s impossible for us outside observers to compute the underlying asset types and amounts, so a level of privacy unseen (pun intended!) on other platforms is achieved.

Issuing a new asset

Now that we’ve covered how assets are native to Liquid and how they are cryptographically made private, it’s time to issue our own new asset! Using a Liquid full node, all it takes is a little bit of L-BTC for the transaction fee, and a single command. Download the Liquid full node software here.

https://github.com/ElementsProject/elements/releases/

Fire up the GUI and sync the Liquid sidechain data. Once synced, open up the GUI console and issue the following command.

issueasset 0.00000021 0

This command will issue a new Liquid asset for you with 21 individual units and zero re-issuance tokens. The units are Bitcoin-like in that they are divisible by eight decimal places, so if you were to issue an asset with 1.00000000 then that means you’ve created essentially 100 million units, which may be desirable if you want unit divisibility.

As you can see from the console output, the newly created asset has the asset ID of:

9cf01812ccb45a297c1bc5549ce5dd104ded5537b911852f8b57f42c2c0e7aed

That’s literally it! That’s all you need to issue a new asset on Liquid! No solidity or other smart contract code required. No room for accidental contract errors or bugs.

You can send your new asset to anyone with a Liquid address, and the recipients don’t need to worry about complying with various token standards like on other platforms. Just make sure you have enough L-BTC to pay for transaction fees!

Anyone with a Liquid full node client, Green wallet, or AQUA wallet can receive and send your new asset.

To learn more about how Liquid works at a higher level, visit the Blockstream Help Center and the Blockstream Docs technical overview.

To dive deep into the inner workings of Confidential Assets on Liquid, read the Confidential Assets whitepaper.

Native Confidential Assets on the Liquid Network was originally published in Blockstream Engineering Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.

More from this author

15th April 2022 03:40

17th March 2022 09:17

3rd February 2022 01:44

21st September 2021 03:04

29th April 2021 07:09

22nd March 2021 11:36

24th February 2021 06:18

9th February 2021 05:05

11th August 2020 02:45

30th October 2019 04:05

Feel free to send a tip using tippin.me

Or alternatively you can send a few sats directly:

btc logo BTC ln logo BTC (Lightning)

btc tip qr

33ELQ1ye29gB6YVQY6zRLFVCNYkJez9jMh

lightning tip qr

lnurl1dp68gurn8ghj7cm0d9hxxmmjdejhytnfduhkcmn4wfkz7urp0yhn2vryv5ukvdm995ckydph956rvv3h94sk2dny95mkgv34xdsnvvrpv4jxz6whyrn