Hackernoon logoPrivacy Protection and Web3 Analytics by@phalanetwork

Privacy Protection and Web3 Analytics

Author profile picture

@phalanetworkHang Yin

Chief Scientist at Phala Network

Though there have been more and more developers and product designers joining Web3.0 world in recent years, it is almost ignored by most of them that they are still using centralized infrastructure — data analytic tools — to build apps and webs. Every minute, project builders are making themselves part of the reason for data breach events, as they have to collect user data intendedly or unintendedly for product improvement.
In the article, Loss of business: the largest cost of a data breach, written in August 14, 2019, it is mentioned the average cost that a company has to pay is $3.92 million, once a data breach occurred. Such a huge accomplishment should be shared by all data owners, but, most of the time, it’s not.
The size and scale of these estimates suggests that the data breach problem is not only poorly contained — it is out of control. -- Cybersecurity, Data Breaches, and the Economic Loss Doctrine in the Payment Card Industry
Data is asset. It should be authorized, succeeded, rented, and retrieved if necessary, instead of collected and abused for free.

W3A: the Black Box of data analysis

Web3 Analytics is a decentralized Google Analytics alternative aiming to give users full control of their data. It provides web performance measurement, customized statistics, and data visualization dashboard, with the cost of integrating only 10 lines of code. Empowered by TEE network, Phala confidential smart contract runs the computation of data analysis in TEE nodes, and outputs only the results to the authorized parties, isolated and in parallel.
In Web3 Analytics, user data is end-to-end encrypted between the user browser and backend (a confidential contract), and the encrypted data will be stored in a decentralized storage network. The encryption key is only accessible by its owner and the smart contract, which enables users to withdraw or delete their user data whenever or wherever they want.
By design, the raw personal data is only read and processed by the smart contract, and will not be output from the TEE without the permission of its owner. At the same time, analysis results will be displayed on the dashboard of both the user client and the dev client, which achieves “analyzing without leaking any raw data”.
Once a data rental deal has been made, the amount of the deal will be logged on the blockchain. And the profit will be transparently distributed to data owners.
Web3 Analytics is featured for:
  • Automatic and customized event measurement and statistics for Web and Mobile apps
  • Data visualization on developer dashboard
  • Decentralized data management: Users have 100% control over the collected data and its access permission on a personal data console
  • Data Plaza: A marketplace for data rental
“The core problem we identified and solved is: to decentralize the management and valuation of off-chain user data.” -- Marvin Tong, CEO of Phala Network

Data Plaza

Data Plaza is a novel feature provided by W3A where you can “rent” data: by paying a certain amount of PHA, you hold the right of analyzing someone’s data for a specific use case. The data can be analyzed by your algorithm.

4 steps:
  1. The data consumer first needs to write a smart contract (the algorithm) and explain what data he needs and what is it for, which will be translated to data providers in a user-friendly way;
  2. Data providers authorize the access to their data;
  3. The authorized data access request will be processed by W3A in TEE enclaves.
  4. W3A outputs the results to the data consumer, and data providers will receive their return at the same time.

    Development Roadmap

    Phala has been developing W3A since Q1, 2020. During the past 6 weeks, we have been working on key functionalities such as:
    • Secure data encryption SDK
    • Privacy-preserving data analytics smart contract
    • Personal data depot
… and the implementation is millions of times faster than sMPC.

In the next 3 months, both user client and dev client will be ready for public testing. Developers who integrate W3A will also receive a LARGE amount of PHA as the reward of supporting privacy protection technologies.

On Building Web3 Together

Phala Network is a cross-chain interoperable confidential smart contract network for privacy-preserving decentralized apps and services. Phala took only a month to receive our first Web3 Foundation Grant in June, 2019 — pLIBRA. Phala is also one of the inaugural members of Substrate Builders Program. We built our network on Substrate because:
  • Substrate offers the common parts that almost every blockchain needs such as network, configurable consensus, storage, mempool, etc. We could thus focus more on Phala itself, our vision, and the ecosystem instead of getting stuck in complicated development from scratch.
  • As a confidential contract network, we don’t want to limit the boundary to only our blockchain, but also benefit the entire Web3 ecosystem. XCMP, SPREE, and other interoperability infrastructure on Polkadot make it possible. We believe Polkadot is naturally the best fit.
Since the day we applied for W3A Grant, Phala has been receiving both technical and event support from Web3 Foundation and Parity.
For instance, one of the core parts in Phala Network is to establish the trust between the blockchain and the pRuntime in TEE. Therefore the pRuntime needs to validate the blocks and derived messages from the blockchain in TEE, which means we need to build a Substrate light validation client in the TEE.
Unlike simple blockchains such as Bitcoin, validating blocks with Substrate’s advanced consensus algorithm, Grandpa over Babe, is way more challenging. It’s the engineers from Substrate Builder Program that offered us great help: code samples, and a few code triaging sessions from the beginning. Without the support from Parity and W3F, we could not imagine it can be built within just three weeks.
Phala will, in the near future, run as the parachain of Polkadot and the infrastructure of blockchain confidentiality to provide data protection service with contract-level parallel computing performance.

About Phala

Substrate-based confidential smart contract blockchain on which you can develop confidentiality-preserving and privacy-first blockchain apps. Member of Substrate Builders Program starting lineup. Recipient of Web3 Foundation Grant. Phala will be a parachain of Polkadot, freeing the privacy computing power of countless CPUs to provide confidentiality-preserving function for all blockchains.

Tags

The Noonification banner

Subscribe to get your daily round-up of top tech stories!