hhanh00 / zwallet

Zcash and Ycash light shielded wallet
https://ywallet.app
MIT License
42 stars 20 forks source link

Ability to send T to T, because why not? #112

Closed skironDotNet closed 1 year ago

skironDotNet commented 1 year ago

Let say a user want to send funds to an exchange that does not respect deposits from shield pool, the only way to do it, would be to send to own T address and then from here send to exchange T address.

Also ZEC is claiming to be compatible with FATF travel rule, but if you force users to always shield funds and be able to spend only from shield it feels the rules is broken, and I don't care about that rule, but it makes no sense to force users to always use privacy. Sure can use viewing key, but it still makes no sense to me to force people to use ZEC certain way, unless this is the goal of the ZCash developers.

I tried to spend from T to T by excluding all shield notes in Notest tab, but the app is crashing after "preparing transaction".

Does lighwalletd itself, the API does not have a way to spent T to T?

hhanh00 commented 1 year ago

Indeed, it would make no sense to disallow t2t. But ywallet allows it. https://github.com/hhanh00/zwallet/assets/222239/35b622f0-2f0e-4c44-9f52-9dc12d4f171d

As a short cut, if you start a tx from the transparent address qr code, it will not use any shielded notes.

skironDotNet commented 1 year ago

Great video I'm using desktop on Linux mint, and the app is crashing after hit send thus I thought it's not possible to send t2t.

Your wallet is extremely well designed from the usability standpoint but has tricks and that makes sense on mobile as well, but without documentation it's hard to discover like long tap/hold on QR to enter derivation path, so don't be surprised if users will keep pining about "impossible" things :)

I love fact that each T address can be turned into shield individually unlike in Zingo that forces to shield all at once and by that it's mixing addresses into single tx and decreases privacy, so yours is way better to protect privacy T by T received funds. Maybe you could help me understand why the walled is not using BIP approach to scan T addresses, meaning that it would scan next 20 address from last address that received funds to make sure it self discovers (if address 0 has no funds, scan only from 0 to 20)

So here is the usability problem, no exchange will let you send to S address so you can provide T only, I used to use full node, where I used new T address per withdrawal. With your app it is also possible by using keytool, but the problem is, after I restored the account using the seed, the wallet looks at 1st BIP44 derived address only (index 0), and while I know I have funds on 3 addresses I can used key tool to get priv key, or set derivation, but from the long term perspective I need to remember how many addresses have funds and in which order, and your wallet won't show me total T balance because it simple does not scan all (first 20) addresses from 0. It feels like disconnect in features, from one side amazing, the key tool, and T QR long tap to quickly import priv key from other wallet or view other address from own seed pool, but then only ability to switch between them, and as soon as you switch the wallet doesn't keep track of balances from other T addresses. I don't desire to send from many addresses at once, or shield mix multiple at once, just to see T "notes" in some form of a list, or at minimum a total balance from all T while being switch to a specific address via derivation path

Any chance to improve? I know programming takes time, so not asking you to code it "just for me" and anytime soon, but I think if you look at Coinomi wallet, it has "Previous Addresses" under the current receiving address QR, so every time it detect a payment to address N, next time you hit "Receive" it will generate address N+1, and all addresses that previously received something, are visible as a new screen list after tapping "Previous Addresses".

Would it be possible to do something like that in YWallet?

here are the screenshot to explain what I mean by "Previous Addresses" receive screen

my prev addr

hhanh00 commented 1 year ago

I would send it to the same t-address and then immediately shield it. Shielding it makes it unlinkable to your real wallet.

skironDotNet commented 1 year ago

But this brakes the basic of privacy. If you are user A on exchange A, and user B on exchange B, and anything in between, if you send from all to same T even if you shield, the assumption is easy all those users are same person. To give you better context, if you are KYCd user on exchange A, and non KYCd user on exchange B, then by sending to same addr you are automatically linked to same identity. This is the reason Monero did develop multi addresses to brake the link created from senders perspective. And I agree non of us has anything to hide, but simply per intelligence vs keeping privacy in mind, re-using addresses kills all the privacy, sure, once you shield then nobody knows what you do with your asset, but "they" can calculate how much you have by sending to same T.

hhanh00 commented 1 year ago

Keep one account per exchange. That's why ywallet allows you to create multiple accounts.

On Wed, Oct 11, 2023 at 1:18 PM Pawel Cioch @.***> wrote:

But this brakes the basic of privacy. If you are user A on exchange A, and user B on exchange B, and anything in between, if you send from all to same T even if you shield, the assumption is easy all those users are same person. To give you better context, if you are KYCd user on exchange A, and non KYCd user on exchange B, then by sending to same addr you are automatically linked to same identity. This is the reason Monero did develop multi addresses to brake the link created from senders perspective. And I agree non of us has anything to hide, but simply per intelligence vs keeping privacy in mind, re-using addresses kills all the privacy, sure, once you shield then nobody knows what you do with your asset, but "they" can calculate how much you have by sending to same T.

— Reply to this email directly, view it on GitHub https://github.com/hhanh00/zwallet/issues/112#issuecomment-1756702474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABWIH7G2THZVMZ56CLTL23X6YFYXAVCNFSM6AAAAAA52Y2PZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJWG4YDENBXGQ . You are receiving this because you commented.Message ID: @.***>

skironDotNet commented 1 year ago

That's not scalable, why not to just keep generating T addresses? At the end of your video https://github.com/hhanh00/zwallet/issues/108#issuecomment-1756708926 you mention exactly my reasoning about linking you via same address but in the video it's about sapling addresses that are less common to use.

Having account (call it wallet) to me account per BIP44 is same 24 words different account index (you call it subaccount). So having wallet per exchange is almost ok, until the point where you would like to let say send 90% of funds a once to X destination. Well I guess doing more work of sending form multiple wallets to single address in Z wallet, you can then spent all funds at once to X.

Very hard philosophy. I need to promote PIVX in here, where it gives unlimited T and S addresses and can spent from many S addresses at once, or from many T addresses at once, or you can pick some T address and shield to self first. Of course PIVX GUI wallet is full node type wallet, and YWallet is SPV type of a wallet so more challenges for scanning.

Great debate tho. Maybe I'll go multiple wallets strategy, YET, there is something else against it. If you are 1 exchange and you send multiple times to each time different T address, you obfuscate the history way better. From the exchange point of view if you sent to many T addresses it could be like, oh maybe he send to a firend, to self, maybe he paid for some service, lot's of guessing. But if you pay to same T each time, it's 99% you, or maybe your mom, but the point is same person, so losing obfuscation and guessing argument.

hhanh00 commented 1 year ago

That's not scalable, why not to just keep generating T addresses?

If you use so many exchanges that it becomes untrackable, then use another wallet. By design, Ywallet will not support transparent derivation addresses. This is a weak privacy mechanism.

If you send from an exchange, they already know who you are. It doesn't matter whether you create 1 or 1000 addresses. They can link them all to you. Having multiple t-addr per account makes the implementation harder and more confusing when zcash has already a much stronger privacy feature than using multiple t-addr.

If you are 1 exchange and you send multiple times to each time different T address, you obfuscate the history way better. From the exchange point of view if you sent to many T addresses it could be like, oh maybe he send to a firend, to self, maybe he paid for some service, lot's of guessing. But if you pay to same T each time, it's 99% you, or maybe your mom, but the point is same person, so losing obfuscation and guessing argument.

Or it could be that all these t-addrs are yours. I don't see how this obfuscate more.

skironDotNet commented 1 year ago

You already provide a way to use multiple T addresses it's just manual process. It's all good no need to implement the address list or auto new address. What you have makes sense, and fits 90% of users. Like I said it's on me to remember how many addresses were used, but this can be solved by sending memo to self shield with last address index + total balance of all T addresses if needed. The problem is probably more about how full node operates vs how light operates. Thanks!