MyHush / hush-ng

Hush Next-generation
GNU General Public License v3.0
7 stars 16 forks source link

Top Up (move some taddr value to funding zaddr) #7

Open leto opened 6 years ago

leto commented 6 years ago

one important UI screen is our "Top Up" screen

discord dump

it's when our user moves some TADDR value to ZADDR value, almost every user will need to do this initially
Bitpay calls it "topping up" to add fiat to your account by selling BTC, so I am using that terminology
we don't want to make the amount a fixed value, that people can search on the explorer/blockchain and say "oh gosh, there has been 42 top ups today"
so we want a random value, between some reasonable limits, say 1 and 10 Hush
and then we generate a random number between that, and then they "top up 3.43453 HUSH into their HushList zaddr"
this is a t->z transaction, it leaks the amount metadata, just like z->t
the user should of course be able to over-ride this
it's just a "randomized default", and we need to tell them the reason why everybody doesn't top up 5HUSH/etc
we actually need to do it whenever we get close to 0HUSH in our funding zaddr
the funding zaddr is the just-for-HustList zaddr in this wallet that receives Top Up amounts from taddrs
that zaddr funds all the individual zaddrs that each HushList gets