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 ERC20 tokens), and bring us more traffic and privacy. Imagine how useful a privacy wrapped version of tether would be? 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 TXs: you pay a public zec fee per tx. Remember, Zcash fees right now aren’t even much of a thing, we have affectively fixed fees for shielded TXs and no fee market But can we do better in a 3 years fees in zcash matter?
I want to stop here and make something explicit: UDAs don’t need extra fees to ship version 1 of UDAs, we can use Zcash’s existing fee mechanism. 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. There is no fee market in Zcash which has let people build cool things like zec pages that brought new members to the community. UDAs can do the same)
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, UDA fees violate privacy because fees are public (and need to be since when we make a TX, wee don’t know which miner to pay the fee too). 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 simply: 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 els (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 determinaition.)
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 wrappepd 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.