[Ongoing] New shielding/unshielding flow for ETH/ERC20 in the extension

Objective: New shielding/unshielding flow

In the new web extension, we’ve changed the shielding and unshielding flow to a slightly more decentralized process. Now for ETH and ERC20, you can participate in each step, and retry failed transactions without needing anyone to intervene.

A new shielding/unshielding process for BTC will be added after releasing portal v4.

How it works

Shielding:

We’re removing temporary addresses. To shield tokens, you now enter your Incognito address, connect your Metamask wallet (more options coming soon), then initiate the transaction. After the external blockchain confirms the transaction, the Incognito network locks your original tokens, and you personally initiate the minting of privacy coins to your Incognito address.

Extension mockup - Shielding:

Shield ETH

Connect Wallet

Terms of use

Shield - connect wallet 2

You will see each step in your transaction history, so now you can identify exactly where it failed and retry directly from the history.

Extension mockup - History:
History detail

Unshielding:

For unshielding, you will initiate the burn of your privacy coins in the Incognito network, and then submit a proof to release locked coins. If a proof submission fails, you will be able to retry it on the history page.

Extension mockup - Unshielding:
Unshield 2

Key results:

Decrease the number of unsuccessful shielding/unshielding transactions, and give users control over the process.

Release timeline:

  1. Extension v1 (April)
  2. Audit (May)
  3. Official release (May-Jun)

Note: This flow is only for the web extension at this point. If you do not use Metamask, you will still be able to shield with the Incognito app and send your crypto to the web extension as an in-network transaction.

What do you think about the new flow? And what do you want to see next? Let me know below!

17 Likes

I like it. Although I was not aware of eth shielding and unshielding getting stuck that often. What would cause a burn proof to fail , causing a user to have to retry?

Also I am excited for the trustless style setup for portal v4

2 Likes

Thanks Matt! If you mean step “burn token” then it can be failed because of utxos issue, full node rejection or transaction issue, etc.

If you mean the “submit proof to chain” step then the cause can be a network issue, slow transaction (ETH call smart-contract submit proof to get ETH), etc.

4 Likes

I think we will have to pay an approval fee for each ERC-20 token once as Uniswap requires. I hate it, especially on these high fee days. I hope I’m wrong. Please don’t say this is true.

@abduraman right, it works mostly like when you trade on uniswap,
but we design you should approve max balance if you don’t deposit max, next time you don’t need to approve again if still in balance approved.

Sounds like minting will require contract approval for ERC20 (I hate this step but unless ethereum improves this somehow, this is how it’s done for every web3 application).

The next question is how many gas units are required for the shielding process since we’re interacting with the smart contract directly.

In general, this is a more normal user flow. Is unshielding still dependent on the price incognito chooses or can we interact directly with a the smart contract again somehow? Yes, ETH fees are high, but it’s exasperated when Incognito forces me to pay the highest fee. Almost all things I do are not critical for speed so I don’t mind waiting a few minutes to confirm a transaction (usually saving 50% on gas).

All in all I think incognito is on the right track here.

by using the new shield & unshield, ETH fees for transaction approve , deposit , submit proof to withdraw will control by the user. if gas is high users can wait or edit the gas fee by themself.

2 Likes

This is the best news I’ve heard thus far for incongito.

Does this also mean we have direct control over our assets on the ETH chain? As long as we can submit the eth transaction and pay the withdraw gas, we will get our assets back in one block, right?

**>> Can you please give us the proposed number of GAS UNITS for your proposed shielding and unshielding processed? We can use something like this to see if it makes economic sense also: https://ethgasstation.info/calculatorTxV.php

Does this also mean we have direct control over our assets on the ETH chain? As long as we can submit the eth transaction and pay the withdraw gas, we will get our assets back in one block, right?

-> this right.

default, we will get GAS Estimate from ethgasstation, and user can edit why exec transaction on METAMASK.

1 Like

Right, but how efficient will your coding be? 100,000 gas units or 1 million gas units is the difference of $23 vs $233 with current gas prices. I’m asking number of gas units because then we can calculate the price in fiat ourselves at various gas prices.

I believe the coding will remain the same. Same as it currently is, the only difference is that you now have power over every single step. But i cant fully say, im sure @binh can confirm.

With this new flow, the amount of gas units each tx will take will be the same, but you can always choose to change the gas price per GWEI for a slower yet cheaper tx.

That’s amazing guys!

It’s likely going to 4-8x the cost of shielding for users but overall having control over every step is much better. I’m very surprised more people aren’t commented on this as it’s a HUGE change to incognito.