-
Notifications
You must be signed in to change notification settings - Fork 26
Design proper multi-asset proof specs #87
Comments
Background: each asset is issued by some contract. It may be reissued multiple times, but the original issuing contract remains always the same, we will simply name it "issuing contract". An issuing contract may issue one or more assets. This means that in order to uniqually define assets we need to use information from both issuing contract and some index of the issued asset within that contract (it will also require to add some asset indexing capabilities into the issuing contracts of future blueprint types, like proof-of-burn issuing). Thus, for
Explicit sheme provides more readability, implicit – more privacy, while the mixed one makes a tradeoff between them. Since the proofs are already private pieces of data, I would prefer an explicit scheme. Other thoughts? |
I don't think readability is valuable in this situation. |
From the planned Spectrum DEX functionality, required for an efficient asset routing, it follows that RGB-enabled LN nodes would have to announce the list of assets (i.e. asset ids) they can buy/sell – with corresponding bid and ask prices. Since we'd like to increase the privacy, we need these asset ids to be "obscured", i.e. not easily tracked down to the specific asset/contract – unless for those who has the source of the asset issuing contract. This leaves us with just a single option:
Why we could not just rely on |
Second thought: if we just use hash of an arbitrary public key as an assetId, there will be cases of creation of assets with the same id by different contracts – as an attack vector. So probably this scheme can be upgraded with the following:
I.e. we use the actual hash of the serialized contract + UTXO to which the contract is committed to + asset number within that contract (fin order to support multi-asset issuing contracts) to deterministically generate EC private key; than we take a hash of the corresponding public key and use id as an asset_id. This protects from issuing multiple assets under the same id and allows anybody to verify the correspondence of the given asset_id to the given contract_id. |
In order to optimize the size of the proofs, I propose the following algorithm for referencing different assets within the proof:
|
This, in fact, can be further reduced to
also giving smaller size for the asset_id, and making it indistinguishable from Bitcoin addresses |
…iasset proofs, separation of asset issuing tx from contract committment
After discussion with @giacomozucco it was decided to stick to scheme from the last comment for the version 0.5.0 |
Each proof can cover multiple asset transfers issued by a multiple contract. We need to ensure that this part is covered through spec. We also need to design how
asset_id
is defined: it needs to contain hash of the contract + some id of the asset within that contract.The text was updated successfully, but these errors were encountered: