Private Cross-Chain Payments with Zashi CrossPay

Ah. We aren’t parsing payment URIs. It’s on us. We need to fix it.

3 Likes

Four days!

1 Like

Very nice to see. It’s nice to see conviction paying off. I wonder if this gets us to a step closer to “wrapped Zcash” or “deploying ZEC into DeFi”…

A curiosity that I had since I heard we were working on it.

What are the security trade-offs of a swap? Have we investigated the NEAR Intents protocol in-depth? What are the vulnerabilities or worst-case scenarios?

6 Likes

Hi there!

I tried out CrossPay and of course I really love to see this feature :slight_smile: . But also I noticed one issue - it seems like I get a return amount after payment? Is this part of the implementation, that I first overpay and then get a return?

This made me think about the following privacy issue. Imagine a user tops up Zashi from a KYC exchange, shields the amount. Now they use CrossPay a few times and accumulate the transparent returns. I guess each return would be traceable to the actual payment on the transparent chain (e.g. USDT on Tron), correct? Next, let’s assume the user again tops up Zashi. Here, Zashi shields the transparent return amounts together with the new KYC’ed exchange output. Doesn’t that now associate the user’s prior payments with the KYC’ed output from the exchange, effectively de-anonymizing their payments?

5 Likes

Great questions.

Yes, linkages are possible today depending on usage patterns. Two things are in the works:

In the near term, we will be introducing the use of ephemeral transparent addresses for these types of transactions.

The NEAR team is also working on support for sending to a shielded address. I expect that to be out late this year / very early next year.

11 Likes

Thank you! I think though this should be communicated more clearly before it leaves beta. Something like:

Note that if your t address is currently linked to your identity from prior transactions, using CrossPay will link your payment destination to your identity.

Because I think that’s a massive “gotcha” that people don’t expect prior to making a payment, and most even don’t understand when they see the incoming return.

3 Likes

Actually, I would even go a step further: Given how the t address is used, it is likely linked to the user’s identity. Hence, it should be treated with utmost care, i.e. the user should explicitly consent before Zashi gives the t address to any service at all. The fact that this happens silently here is the core of the issue.

3 Likes

Sorry to ping @joshs - for the skeptical and paranoids around, are there any information or analysis done on this by the ECC team? Crypto has had its fair share of “illusion shows” in regards to DeFi’s that were neither decentralised nor resistant.

I think a good way to improve privacy, especially for novice users, is to gamify the wallet experience in someway such that the user is encouraged not to carry out transactions where likability risks are significant. The privacy tech is one thing, but user behaviour is another and we can’t expect the average user to be thinking about the subject of linkability when they’re making their transactions.

An example of this might be; user withdraws from a kyc exchange to their t-address in zashi, shields it and then a very short time later makes a spend using crosspay. This sequence of actions leaves a fingerprint that can temporally correlate the crosspay transaction with the withdrawal from the kyc exchange. A random idea might be the use of traffic light colours dispay within the zashi wallet to give the user an indication of when these linkabiltiy risks have dampened sufficiently, or some other effective way. Staking and delegating is another area that may require gentle guidance within the zashi app to enhance the privacy of everyone in the network.

No worries. Happy to provide or get answers to specific questions.The current Intents implementation does have a multisig but the trust assumptions are minimal given the time from deposit to withdrawal. The existing implementation will soon use a new Omnibridge for swaps instead.

4 Likes

I just want to give some further feedback on crosspay. Yesterday I was showing my mom how to use it and we did 2 voucher purchases. First we did one with ZEC-BTC on the bitcoin network; then we did one with ZEC-ETH on the ETH network. The first one to complete was the ZEC-ETH crosspay, even though we initiated this crosspay transaction second. Of course the reason for this is obvious; Bitcoin blocktimes are 10 minutes and ethereum just seconds.

Upon initiating the crosspay transaction there are three time delays to consider from the UX point of view:

  1. The ZEC is sent pretty much instantly.
  2. There is then what seems like an arbitrary amount of time to wait before the quote asset (in this case BTC and ETH) is dispatched to the payment address.
  3. Finally there is the quote network time delay before a transaction is accepted into a block.

This isn’t suitable for physical point of sale transactions where you would have to wait up to 10 minutes for the full cycle of the transactions to complete. Perhaps you could sort by both network confirmation times and network fees from the zashi app when selecting the coin to pay with? There could also be situations where fees on the BTC network are quite high so choosing a different network would result in a cheaper crosspay transaction. But for most cases, users just want the transaction to complete asap and be somewhat consistent for regular use. Users would likely pay a bit extra for an instant transaction if that was possible.

It could be worth the time to consult with Near if there is a way to drastically reduce wait times for 2 to trigger? I noted it took between 3-5 minutes for both BTC and ETH transactions. Perhaps wait times can be less for microtransactions? It may just be that cross chain dex tech considerably lags native DEX tech where the wait time for 2 is just the same as what 3 is (i.e. uniswap on ethereum 2 and 3 are the same).

5 Likes

It would be good to allow the user to specify a time limit. I tried CrossPay now in a few situations, and I noticed that sometimes businesses set a tight limit for deposits (in the case I’ve seen it was 30 minutes). I never “lost” a payment because of this, but there was some anxiety.

Another thing I noticed: If I’m not overseeing something we’re currently lacking the ability to set a “memo” on chains that support it. As a result I wasn’t able to pay bills on Solana, for example.

6 Likes

Just got into crypto two weeks ago, found Zcash and Zashi for the first time 6 days ago. I gotta say, the community is amazing with the funny, inspirational, and weird messages that has been sent to me in the last few days. I love the app, it’s very user friendly for someone like me new to crypto.

14 Likes

NEAR conducts the swap after 1 confirmation (75s). I’m not sure about the lag for the swap itself. They are changing the swap engine to a new omnibridge this quarter and will watch performance.

4 Likes

Just had the following bug: Zashi says payment failed, but the money arrived anyway; however, it was actually more than the amount to be paid (~25 USDT instead of 23). So instead of a CrossPay payment, a swap happened somehow. Any idea what happened here?

Hi @kranzj, Can you please email us at support@electriccoin.co?

Related post with video:

I don’t know if this is the correct place for a feature request, sorry if it’s not. but I think it would be cool if Zashi had a simple toggle when sending shielded txs:

Like an enhance privacy button. (randomize amount ±0.0001 zec)

basically just fuzz the send amount a little (and maybe delay broadcast a few secs) so chain analysis can’t match identical in/out amounts so easily.

A lot of people still send the exact same values in/out of the shielded pool, which makes linking trivial. this would break those simple heuristics.

super small change, off by default for people who need exact accounting, but easy win for privacy maxis.

Are there any other edge cases I’m not considering or any reason why Zashi doesn’t have this as an option?

This just wouldn’t work. Even if the amount is not exactly the same, the fact that it is very close can already help remove a substantial amount of privacy. This feature would add clutter in an app that for now, remains quite clean and enjoyable to use.

2 Likes

Good points.