Zcash should build user defined assets (UDAs). UDAs let us offer private stable coins, let other developers build on zcash and become engaged (e.g offering say privacy wrapped ERC20s), and bring us more users, cover traffic, and privacy. Imagine how useful a privacy wrapped version of tether would be? But a question keeps coming up about UDAs: how do we charge fees for UDAs? The basic answer, which is more than good enough for V1, is just like we do for shielded zec: you pay a public zec denominated fee per transaction. Remember, we have effectively fixed fees for shielded transactions and no real fee market. But can we do better. Not now, not when we ship UDAs version 1, but in the future?
I want to stop here and make something explicit: UDAs donât need extra fees to ship a first version 1 of UDAs. Weâve seen a number of blatantly flawed arguments against UDAs. Many tangentially touching on fees and making false emotional appeals to âfairnessâ. You can read more here. Lets not unintentionally carry out the CIAâs simple sabotage manualâs tactic of ârefer[ing] all matters to committees for âfurther study and considerationâ" and killl UDAs or delay their launch. A long discussion about fees needing âfurther studyâ would do exactly that.
Itâs important that the UDA fees discussion doesnât hinder rolling out a basic version of UDAs. Iâve been thinking about UDA fees and discussing it since shorty after I realized UDAs were important nearly 2 years ago. The discussions has been on a back burner because UDAs should ship first and then we can iterate on UDAs just like we are still iterating on zecâs normal fees. (remember, shielded transactions now pay a default and largely symbolic tiny fee.)
Ok, back to fees:
The problem with UDA fees itâs a trivial tweak to Zcashâs snarks to make any UDA TX pay out a higher fee, even one thats a function of the asset type and amount. But, paying out different fees based on asset type or value is a privacy violation. If all UDAs have the same fee, this may be acceptable. But if we want more complex fees that depend on asset type or value , this is a major problem.
The solution is to this problem is instead of paying fees, burn them. burn the UDA specific portion of the fee, this preserves privacy since nothing is revealed. And by burning ZEC for a UDA, we increase the value of ZEC for anyone who holds it. Now we can burn an arbitrary fee as function of the amount of the UDA transferred even.
But things get more complicated when we want fees to depend on the amount of an asset transferred. Sure, we can make you burn 0.001 ZEC for each unit of a UDA you transact, but this will just cause someone to make, e.g., wrapped btc (zbttc) where 1 BTC = .000000000001 zbtc. So you end up burning almost nothing because all UDA transactions are notionally tiny. We could make you burn the asset itself as a percentage fee, which avoids this, but that wouldnât pay miners or anyone else (unlike burning zec), so it doesnât do anything.
This leaves us with a few options for fees by burning that meaningfully relate the burned amount to the value transferred:
-
Build price oracles that can be referenced on chain and in snarks to set fees. (seems complicated and probably requires trusted parties built into the core protocol for fee determination.)
-
only allow UDAs to be issued from AMMs . Zcash would need to build the AMM to ensure 1 to 1 correspondence between the asset and the UDA. And that still wouldnât cause fees to very as the price fluctuates. But at least it would help
-
we could burn a fixed percentage of the asset value itself in a transaction, this would leave some of the asset sitting in the reserve pool Maybe for AAMs or other wrapped setups, its possible to capture this leftover money and pay it out to miners/ the chain. But I see a number of incentive problems, like making people cash out frequently and costing them privacy.
-
maybe we can have some gas mechanic. Possibly with typed gas per asset which you must burn to transact the asset. To buy gas you swap the wrapped asset for gas and then miners get to take a blended mix of assets out of the gas pool based on how many blocks they mined . This seems both complicated, has major incentive issues, and a usability pain (now you have to have different kinds of gas).
Maybe theres a better way to use burning for fees. Or maybe we can do solve the problems with the above ideas.