-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ZIP 220] Zcash Shielded Assets (previously UDA or UIT) #830
Comments
In recent months, we have using the term "user-defined assets" (UDA) to refer to this concept. To my mind, the goal should be to allow users to issue "native" assets - i.e. the new assets are effectively identical to ZEC in terms of functionality (including the ability to shield and unshield), they'll just have a different identifier. Note that this approach is very different to coloured coins, which effectively allows a user to "paint" a pre-existing, native coin instead of creating a new asset. This would allow anyone to create and transact new assets on the Zcash platform. Transaction fees would continue to be denominated in ZEC. Questions to be explored include:
Once support for UDA is in place, the logical next step is to add support for what I'm dubbing "intra-chain atomic trades" (ICAT) - i.e. the ability to atomically swap different assets on the same blockchain. I've created a separate issue for that feature: #2053 |
Here are some design constraints in the form of 'features we wish to avoid precluding':
|
BTW- we've renamed this feature from "User-Defined Assets" to "User Issued Tokens". |
Our paper has some ideas on how such an updated interface might look: https://eprint.iacr.org/2016/1033 It uses terminology from ZeroCash, but that shouldn't be too difficult to work around. |
^ more precisely, I marked #2424 as a duplicate of this. (Grr, Github.) |
There's a proposal for one way to do UIT at #2277 (comment) . |
To extend @jackgavigan's questions:
|
@gojomo Yes, our zkSNARK-based approach is flexible enough for supporting everything you described (with straightforward protocol extensions). We'll need to decide what to actually support, to keep complexity at bay, so can you suggest motivating use cases? |
I like Kickstarter-like projects as a model, but with added censorship-resistance & anonymity. So a blended use-case, here contrived but hopefully representative of possibilities, might be: A team wants to execute some bit of art with a controversial political edge. (Maybe it's a monumental sculpture, maybe it's a documentary, maybe it's a computer game.) It might eventually generate recurring revenue, or be salable as a unit, when completed. They need help covering initial costs of $X00,000, and would like to offer patron's tokens with downstream benefits to those who can help supply the funds. They'd want the system to help them irrevocably commit to some issuance plan (fixed or a range/schedule), then atomically exchange tokens for bona fide ZEC payments. The team will want to be able to prove the total number of tokens in existence, and perhaps reveal for some or all of the initial transfers how much ZEC were received. Some buyers will want to be able to prove their participation & at what cost, while others will want to remain anonymous. To make the tokens attractive, a number of Kickstarter-like rewards would be offered. Say there's an opportunity for the work to include some messaging (such as a plaque of 'dedications' or list of credits/patron's-statements), to be determined not at initial-offering but some later date just before launch, available to any patron with more than X tokens. There'll be a launch party or other showings to which patrons with more than Y tokens get a free ticket. Some limited-edition branded-memento of the full work will be available after completion to all patrons with more Z tokens. Collecting these off-chain benefits would require a token-holder to prove their unique holding proportion, as of certain varying deadlines, together with a signed-request-for-delivery-of-the-benefit. The completed work might generate recurring revenues, for example exhibition fees or licensed use in other commercial venues. The team may pledge that J% of such revenues are converted to ZEC and distributed to token-holders proportionately. Ideally receiving and then spending these ZEC would require no loss of privacy by token-holders. (That is, unlike claiming offline rewards above, there'd be no necessary interaction with other unshielded value-delivery systems.) Further, receiving such benefits should not consume the underlying tokens. The completed work might have some terminal liquidation value, for example upon sale to a collector/distributor/exhibitor, of which the team has pledged that K% of such value be proportionately distributed to token-holders. This could be effected like the other distribution above – non-consumptive of the tokens – even though the intent of the team is that there be no further value to the tokens. Or it could be offered in a fashion that consumes the tokens: claiming a proportionate amount of this terminal value, in other ZEC/token-balances, necessarily retires (or sells) the corresponding tokens. (Even short of liquidation, this sort of standing 'open tender' might have interesting uses, if it could live on the blockchain for either a fixed-period, indefinitely, or until-cancelled. Perhaps hard to do in a shielded non-interactive fashion, though.) In terms of priorities, a publicly-observable/enforced cap on issuance and ICAT #2053 seem foundational. An externalizable-proof-of-exclusive-holdings-as-of-date would enable allocating off-chain (and thus perhaps privacy-compromising) benefit-delivery. Proportionate on-chain airdrops of shielded value to holders would enable perpetual shielded revenue/profit-sharing. |
@jackgavigan wrote:
I had been assuming that UITs would be shielded-only. Assuming we have full selective disclosure and the performance improvements from Sapling, is there any compelling use case for unshielded UITs? |
If it's shielded-only, how would a publicly-observable/enforced cap on issuance work? Also, there may be use cases where transparency is desirable (e.g. public voting, distributing funds for aid or grants). |
will coloured coins be supported on sapling? will sapling support smart contracts? |
@archmaester: no and no. Sapling is already a very ambitious upgrade without either of those features. There is however a proposal for how to do UITs building on Sapling: #2277 (comment) |
While having conversations about Blossom and subsequent upgrades, one theme that has popped up is the potential value for "stablecoins". Stable coins need strong privacy and can ideally mitigate volatility concerns that MoE users would have with cryptocurrencies. I believe they are a specific use case for a "User Issued Tokens" feature, and we should revisit the product market fit for this feature with this use case in mind in 2019. |
c6b6b8f1b Merge zcash#830: Rip out non-endomorphism code + dependencies c582abade Consistency improvements to the comments 63c6b7161 Reorder comments/function around scalar_split_lambda 2edc514c9 WNAF of lambda_split output has max size 129 4232e5b7d Rip out non-endomorphism code ebad8414b Check correctness of lambda split without -DVERIFY fe7fc1fda Make lambda constant accessible 9d2f2b44d Add tests to exercise lambda split near bounds 9aca2f7f0 Add secp256k1_split_lambda_verify acab934d2 Detailed comments for secp256k1_scalar_split_lambda 76ed922a5 Increase precision of g1 and g2 6173839c9 Switch to our own memcmp function 63150ab4d Merge zcash#827: Rename testrand functions to have test in name c5257aed0 Merge zcash#821: travis: Explicitly set --with-valgrind bb1f54280 Merge zcash#818: Add static assertion that uint32_t is unsigned int or wider a45c1fa63 Rename testrand functions to have test in name 5006895bd Merge zcash#808: Exhaustive test improvements + exhaustive schnorrsig tests 4eecb4d6e travis: VALGRIND->RUN_VALGRIND to avoid confusion with WITH_VALGRIND 66a765c77 travis: Explicitly set --with-valgrind d7838ba6a Merge zcash#813: Enable configuring Valgrind support 7ceb0b761 Merge zcash#819: Enable -Wundef warning 8b7dcdd95 Add exhaustive test for extrakeys and schnorrsig 08d7d8929 Make pubkey parsing test whether points are in the correct subgroup 87af00b51 Abstract out challenge computation in schnorrsig 63e1b2aa7 Disable output buffering in tests_exhaustive.c 39f67dd07 Support splitting exhaustive tests across cores e99b26fcd Give exhaustive_tests count and seed cmdline inputs 49e6630bc refactor: move RNG seeding to testrand b110c106f Change exhaustive test groups so they have a point with X=1 cec7b18a3 Select exhaustive lambda in function of order 78f6cdfaa Make the curve B constant a secp256k1_fe d7f39ae4b Delete gej_is_valid_var: unused outside tests 8bcd78cd7 Make secp256k1_scalar_b32 detect overflow in scalar_low c498366e5 Move exhaustive tests for recovery to module be3179154 Make group order purely compile-time in exhaustive tests e73ff3092 Enable -Wundef warning c0041b5cf Add static assertion that uint32_t is unsigned int or wider 4ad408faf Merge zcash#782: Check if variable=yes instead of if var is set in travis.sh 412bf874d configure: Allow specifying --with[out]-valgrind explicitly 34debf7a6 Modify .travis.yml to explictly pass no in env vars instead of setting to nothing a0e99fc12 Merge zcash#814: tests: Initialize random group elements fully 5738e8622 tests: Initialize random group elements fully c9939ba55 Merge zcash#812: travis: run bench_schnorrsig a51f2af62 travis: run bench_schnorrsig ef37761fe Change travis.sh to check if variables are equal to yes instead of not-empty. Before this, setting `VALGRIND=wat` was considered as true, and to make it evaluate as false you had to unset the variable `VALGRIND=` but not it checks if `VALGRIND=yes` and if it's not `yes` then it's evaluated to false git-subtree-dir: src/secp256k1 git-subtree-split: c6b6b8f1bb044d7d1aa065ebb674adde98a36a8e
The earlier technical proposal that I came up with during the Sapling design process, has the disadvantage that each asset requires a different base, and therefore it's necessary to hash from the asset ID to an elliptic curve point in the circuit. This is possible but expensive, and complicated. I invented the following simplification during the design of Orchard, but hadn't written it up until now. Suppose that per transaction we have a limit L on the number of distinct non-ZEC assets that can be transacted (so L+1 including ZEC). I.e. we can have arbitrarily many assets, as long as only L of them (plus ZEC) are used in each transaction. Define A0 to be the asset ID for ZEC, and let A1..L be the asset IDs of assets 1..L in a given transaction. The idea is that we only need value commitments over L+1 fixed bases, in order to check that each asset balances. Call these bases B0..L where B0 is the existing \mathcal{V}Orchard base for ZEC. It does not matter whether or not the same base is used for the same asset across transactions, since the checking of value commitment balance is local to a transaction. It also does not matter whether A contains duplicate asset IDs. In more detail:
The additional circuit cost of this design is:
The resulting Orchard circuit should easily still fit within 211 rows, without any increase in advice columns. |
In this proposal, the action circuit has to check that the asset IDs |
I think the primary difference is that in the prior proposal, the hash-to-group must be a PRF, whereas opening the commitment only requires a CRF. |
@hdevalence there is no hash-to-group operation in the circuit (in the traditional PRF sense), because we don't need to ensure that we can derive independent bases from the asset IDs. The trick here is in recognising that you don't need to use a specific base for a specific asset; any base will do, as long as each asset type within the transaction uses an independent base. So what we actually have is the cost of opening a Sinsemilla commitment (which is just a Sinsemilla invocation, same as we already do for opening NoteCommit or the Merkle path), and then a deterministic map (based on the slot order) from asset types to fixed known-independent bases (for which we could reuse e.g. the 210 independent Sinsemilla bases, giving us an effectively unlimited number of asset types an individual transaction can operate on). |
We could, but note that opening |
There's an interesting side effect, where a prover now needs to know For example, to execute a 3 party swap where Alice swaps asset X for asset Y, Bob swaps asset Y for asset Z, and Charlie swaps asset Z for asset X, Alice must know that asset Z is present in the transaction even if she neither spends or receives any asset Z. In this case, building the transaction seems to require an extra round of interaction to agree on |
Several block chain platforms allow supporting multiple asset types in a single system — for example ERC 20 tokens in Ethereum. Each of these assets satisfy balance individually. For Zcash, they could all share the same note anonymity set. We rejected this from 1.0 on grounds of complexity, but it deserves an issue ticket to be able to refer to the idea.
[Edit: when I originally wrote this I thought that "Coloured coins" in Bitcoin were an example, but they actually do not represent separate assets.]
The text was updated successfully, but these errors were encountered: