[Shipped] Incognito mode for smart contracts and dapps

What privacy problem are you solving?

Describe the pain point. What are the shortcomings of current solutions?

Right now, thousands of developers all over the world are programming smart contracts to build decentralized applications (commonly known as “dapps”). Arguably, privacy concerns play a part in discouraging adoption beyond the crypto niche, as traditional investors hesitate to expose how much they trade on a trading dapp like Uniswap, or how often they invest & borrow on a lending dapp like Compound.

What is needed is the incognito mode for smart contracts. Once this is available, we will unlock two essential use cases.

  • For crypto users: you will be able to use existing dapps anonymously — buying & selling crypto anonymously on Uniswap, investing & borrowing anonymously on Compound, minting DAI anonymously at MakerDAO, etc.

  • For crypto builders: you can build your own dapps and write your own smart contracts on Ethereum, and out of the box, you can provide the incognito mode for your smart contracts for your users too.

What is the solution?

Why is it a good idea? What’s new about what you’re doing? The more details, the better. Sketches, mockups, demos, prototypes, videos, pictures - it all helps community members get excited as you are.

There are some teams actively working on privacy for smart contracts, such as Oasis and RenVM. We believe there is a different approach.

We’re exploring a way to simply unshield the input when making a smart contract function call, then shield the output (or “returned value”) from it. The smart contract runs as-is on Ethereum.

This approach avoids the need to build a new EVM from scratch. We reuse the existing Ethereum EVM and thousands of existing Ethereum dapps and focus on solving the privacy problem for dapp users. Developers can build dapps as usual on Ethereum, and also offer their users the choice of accessing these dapps in incognito mode.


What substitutes do people resort to because this doesn’t exist yet?

Who are the direct and indirect competitors? Why is your solution better?

There are several approaches to allow developers to build dapps in a confidential manner:

  • Implement privacy functions (encrypt & verify) right on top smart contracts (Ethereum’s, Neo’s and so on). Every newly created dapp will then use those functions for its operations.

  • Create a completely new VM with built-in privacy supported.

Each of the above approaches has its own downside; gas expense for cryptographic computation in the former, or huge engineering and testing efforts in the latter.

In our approach, we’re trying to utilize existing weapons: privacy of Incognito chain and battle-tested EVM of Ethereum. Dapp developers can still write and deploy smart contracts to Ethereum, and Incognito users can still experience those dapps seamlessly and anonymously using their privacy coins (pETH, pDAI, etc.)

Who are you?

Introduce the project team members (schools, jobs, projects, github, twitter, blogs, etc.) and any similar work you’ve done.

The project will be implemented by @harry, @thachtb, and @tien on the core team.

  • @thachtb has nearly 3 years of experience as a blockchain engineer. Previously, he was a leader of a crypto-exchange project. He has contributed to many blockchain projects as a core member. And now he is a smart contract engineer of the project. In his spare time, apart from coding, he also loves mentoring about blockchain stuff.

  • @tien has over 4 years of experience as a senior software engineer. Previously, he was a core developer for a Japanese employment service in Vietnam. He is now the frontend lead responsible for building the Incognito wallet. He is also a community enthusiast and loves asking questions and giving answers on Stack Overflow.

  • @harry recently joined Incognito’s interoperability team to help build cool stuff. Previously, @harry worked for one of the biggest e-commerce systems in Vietnam called Tiki. He has had experiences with the popular programming languages as well as messaging systems like Kafka in a microservices architecture. He’s strongly interested in building scalable and reliable systems with low latency APIs. On a less serious note, as a human, he’d love to sleep well at night by building monitoring systems apart from the main system.

Why do you care?

Tell people why you’re passionate about your privacy project and committed to making it happen.

As we’ve mentioned previously, there are many developers (including ourselves) who want to build dapps to serve as many users as possible. However, we feel that the lack of privacy would be of big concern to our users, especially in financial applications where there is a need for confidential transactions. We believe Incognito mode for smart contracts will help solve this problem.

What’s your plan? What’s your schedule?

Layout a clear, specific timeline for what community members can expect.

The project duration will be 3 months from Feb 1, 2020 to April 30, 2020.

Ship Date Deliverable
March 31, 2020 Ship pKyber (incognito mode for Kyber)
April 30, 2020 Ship pCompound (incognito mode for Compound)
May 21, 2020 Ship pUniswap (incognito mode for Uniswap)

What’s your budget?

A simple breakdown lets community members know you’ve thought things through and have a workable plan, so they can trust you to use funds wisely.

The project will be undertaken by 4 engineers for 3 months.

Resource Cost Quantity Monthly Cost
Incognito Protocol Engineer 1,000 PRV 1 1,000 PRV
Ethereum Smart Contract Engineer 1,000 PRV 1 1,000 PRV
Senior Software Engineer (1 month) 500 PRV 2 1,000 PRV

| TOTAL (x 3 months) | | | 7,000 PRV |

Is there an existing conversation around this idea?

Not yet on this forum. Let us know what you think!

Is there anything else you would like the community to know?

Feedback welcome. What do you think is the best way to offer incognito mode for dapps?


@favdesu on telegram

Super cool idea! However, why is compound needed? Just add a pDAI/pcDAI trading pair and that’s covered

the main idea here is to unlock the use case that people can invest and borrow crypto anonymously on compound, dYdX, or any lending protocols. given the choice, i think it’s very unlikely that people want to disclose how much they borrow and how much collaterals they provide.

for example, alice wouldn’t personally want the entire world to know that she just borrowed $1,000,000 USDC and just put down $1,500,000 collateral in ETH. currently, these transactions are recorded publicly on ethereum.

this is not only helpful to the existing compound users & crypto users, but also important to the mainstream users who may be more reluctant to disclose their financial information in order to enjoy the attractive 5% - 8% APR on compound today vs. their current yield <1% APR at chase or bank of america. with privacy, the mainstream users may be more likely to convert the cash they have in their savings account today at traditional banks into stablecoins (like DAI or USDC) and get good yield for their money on compound.


Just a quick update for Feb 2020:

  • Finished up the development of pUniswap at Incognito protocol and Ethereum smart contract.
  • We’re now writing integration tests so that we can run/test the full flow of relevant components (eth-bridge, pUniswap). The basic test-cases will be done on Feb 29, 2020

For this reason, I think their proposal is a well spent 4000PRV in order to increase interest and user base of the platform. This will widen things up and open it up to more people with more interests.

I vote yes! (not that you asked. :wink:)

Oh so was this proposal already approved?
Does that get posted publicly?

Hi @Mike_Despo, the smart contract has been on Kovan testnet already. We’ve been doing integration tests between the Incognito chain and the new contract for a week now in order to make sure the feature works flawlessly.
In the meantime, the Incognito app team also starts working from their end to get users the most convenient experience with this, so stay tuned, please :slight_smile:


Hi mike - this proposal details work that has been ongoing for a while - funded by the core dev team. it is accountable for its deliverables like all others.

it’s been moved to ‘work-in-progress’ now :slight_smile:


@duc The update looks good. Funds for Feb have been disbursed.

1 Like

Update: week of March 2 - 6, 2020:

  • We’ve been working on integration tests (between Incognito chain & Ethereum smart contract) and bug fixes throughout the week. The trading with 0x aggregator works like a charm now.
  • Next week, we’re gonna continue testing the trading with Kyber aggregator and starting development for client/app side.

@duc great progress. congrats! your roadmap in the original proposal stated that your team would ship pUniswap first. this update stated that you guys just got p0x working and now working on pKyber next. can you confirm what will the team ship? is it all 3: pUniswap, pKyber, and p0x?

1 Like

@duy, technically, p0x aggregates liquidity from other decentralized exchanges like Uniswap, Kyber, Oasis, 0x Mesh and find the best prices for traders. So instead of having to connect to every single source, we just need to integrate with p0x and it would be a better approach in both terms of development effort and liquidity providing. In other words, you can see this as an “indirect” development of pUniswap.

With a similar idea, we’ve integrated with Kyber aggregator as well in order to have a comparison to the former one (eg, 0x aggregator) in aspects of reliability, convenient UX and aggregated price.


hey, just updated the timeline of the project as it’s including the additional development budget for UI/UX on the Incognito wallet. The original one just counted for backend stuff. We feel that it’s worth adding more budget/effort for frontend stuff as well when it’ll be an easier way for the average users to be able to experience the feature.


Updates for the week of March 9 - 15, 2020:

  • The testing for the Kyber aggregator has been done already. So the updates for both Incognito protocol and smart contracts are ready to be deployed on the test-net environment now (yes, we’re planning to deploy them on test-net tomorrow)
  • We’ve also started working on pCompound stuff for a few days now and will continue playing with it next week.
  • The development for pUniswap micro-app has been kicking off this week, the team is working really hard to get this done within this month as planned.

Hi team,

I know that we have this flow

“Incognito -> Incognito smart contract -> Proxy smart contract -> 3rd-smart contract”

And in this flow of communication, we send a request with a single token to the smart contract. I consider that we can update something by making a request with a map or array token(instead of a single token). I think by this way, we will make our flow smoother in integration, and the general process also. Your team can consider this modifcation


Updates for the week of March 16 - 22, 2020:

  • We have deployed updates for Incognito protocol and smart contracts to Test-net environments already. Also, re-run the integration tests between these two and the results are looking good now. It also means that, they are ready to be deployed on Main-net environments.
  • For the micro-app side, we’ve been working on the basic UI/UX for trading stuff and APIs/Workers as an intermediary for communication/interaction between the micro-app and smart contracts. The integration between these two will be doing early next week, probably this will take a half week and the other half will be for testing.

@duc @tien is it possible for you guys to share the ui/ux screenshots here so the community can review? i’m personally super excited to use uniswap and compound anonymously :slight_smile: and so are our friends at constant and their large userbase!

1 Like

hey there, below is the screenshots for trading flow, this is very first/minimal version and we’re trying to make it similar to PDEX’s so anyone can find it familiar :wink: Still working on the iterations (especially fees stuff) and any feedback is very welcome!

  • Deposit

  • Trade

  • Withdrawal


Updates for the week of March 23 - 29, 2020:

  • The integration between pUniswap micro-app and smart contracts through backend APIs/workers has been finished. We have been working on QA things to make sure everything is okay before deploying all of them on the production (probably within next week).
  • Hey @tien, can you share the apk file of the app (or a URL that everyone can download from)? So we can get feedback from the community sooner.

Updates for the week of March 23 - 29, 2020:

This is an awesome project! I cant wait to write my own contracts usable from the Incognito wallet.