AMA Highlights: Phala Network

By Rowan Zwiers, Analyst.
March 12, 2021–10 min read.

On Friday 12 March we welcomed Marvin Tong from Phala Network into the Hillrise Capital Telegram Chat for an AMA about the future of privacy-preserving smart contracts.

Phala Network enables cloud and smart contract processing without giving up data confidentiality. It takes advantage of TEE-based privacy technology found within most modern processors.

A variety of services are already being built including Web3 Analytics and a Google Analytics competitor.

As a layer-1 protocol, the native PHA token will be used to purchase computing resources and data, and for staking and governance.

With concern around data privacy growing, we were excited to learn more about what Phala Network can do! We really appreciated the great level of detail provided by Marvin Tong during the AMA.

In this post, we have compiled key questions and answers from the event.

Daniel Dal Bello
Hey Marvin, welcome, and thanks for joining us tonight. We’ve become really interested in the Polkadot ecosystem over the past handful of months and looking forward to this conversation.

As always, could you please start us off with an introduction to yourself and Phala Network?

Marvin Tong
My name is Marvin Tong, founder of Phala Network. I was Senior Product Manager at Tencent & Didi. I used to work on the project facing towards million-users. And I personally have experience in business strategy design, experience in design service, data-driven decision, and business model.

Phala is a private computations cloud. This means it offers generalized compute at a public cloud scale, with a property of base-layer privacy — i.e. users’ transactions are not publicly revealed. It combines a p2p network of computing hardware + software with a blockchain that is needed for additional security and order.

Phala is also Substrate-based, which means that we can run a confidential smart contract with confidentiality-preserving. Phala will be a parachain of Polkadot, providing the privacy computing cloud to anyone, and provide confidentiality-preserving function for all blockchains.

Daniel Dal Bello
what motivated you to leave the senior positions you had in the past and move into the blockchain industry?

Marvin Tong
The first time I heard about blockchain was from my friends,and it attracted my curiosity. I spent a lot of time figuring out what blockchain technology, POW, smart contracts, and Dapp were. At the same time, Hang Yin did well at BTG — — a Bitcoin fork project to fight miner-control projects like BCH or BSV. However, due to its too decentralization to make it better, he also tried to find a better way for full-time working for Web3.0. Finally, we agreed to start a web 3.0, which’s the beginning of Phala Network.

Raymond Reijnders
To lower the barriers to entry for mining within the Phala ecosystem, you’ve implemented a lending protocol for new ‘worker nodes’ to borrow the required PHA to stake.

Has this been successfully implemented, and if so how does it work in practice?

Marvin Tong
Good question! We have a very specific design in token economic: 70% of PHA will reward TEE workers online — link to dashboard!

Phala testnet Vendetta 1605 Race V2 ended at Block 1,304,000 on March 5. Compared to the 1605 Race V1 campaign, 1605 Race V2 was a less dramatic event, but the stats have exceeded V1‘s peak. Going by phala.subscan.io and the Dashboard count, the TEE Worker number topped out at 2,640, and the total power hit 982,580 which suggests over 14,000 CPU cores shared their privacy computing power during this campaign. In addition, during these 30 days, we saw up to 345 full nodes in 30+ cities worldwide on four continents.

Daniel Dal Bello
Could you briefly cover the TEE environment and why this is important for what you have built?

Marvin Tong
Specifically, TEE is the execution unit of the confidential contract in the CPU. The confidential contract runs in a special black box in the CPU-the security zone (Enclave). The execution of the contract is completely isolated from the operating system and even external hardware to ensure that the data is not visible to the outside world. Transaction privacy is guaranteed.

The main function of zero-knowledge proof is privacy transactions, and Phala Network combines the advantages of TEE and blockchain to realize a universal smart contract that can keep data confidential, and breaks the restriction that all data in smart contracts must be disclosed.

The management of the key is also a very interesting issue. The key is equivalent to the ownership of all assets on the blockchain. Therefore, on the current blockchain, the key must be properly kept by the user, otherwise, the assets may be lost. Smart contracts can be used to set permissions flexibly, but due to the public nature, they cannot keep keys for users.

But with a secret smart contract, it is different. Users can save the key in the contract, and use the contract to flexibly verify the user’s identity before releasing the key without worrying about the key being lost.

Therefore, Phala finally adopted the TEE-blockchain hybrid architecture. We encrypt the state data on the chain and anyone can download it without permission. Using a consensus algorithm, each node can get a consistent state.

Daniel Dal Bello
A cooperative mining pool appears to be coming soon. Should we be thinking of these like typical BTC/ETH mining pools such as F2Pool? Can you walk us through the implications of this on the network regarding centralisation, scalability, or vulnerabilities?

Marvin Tong
The design of Bitcoin by Satoshi is “vote with their CPU power”. So, a PoW-based crypto asset, with its growing well known, there’s no doubt that it will have a process of CPU mining — GPU mining — ASIC mining, and this is the inevitable result of the PoW consensus algorithm.

In the design of Phala Network, it chooses the architecture of detaching consensus and computation to achieve:

- In the consensus part, Phala can achieve the trustless within NPoS system and sharing Polkadot’s safety instead of by using PoW.

- In the computation part, because each TEE is non-byzantine, TEE workers can guarantee the trust computation under the assumption of safety. Furthermore, the similar sharing economy module and PHA mining mechanism can incentive TEE Workers to sign up on Phala Network as well as keeping online even complete the specified computation tasks.

In a word, Phala’s mining mechanism is similar but definitely different to PoW: TEE Workers work is “CPU Proof”, it can validate its exist by the application running in TEE. The mechanism consists of Phala being online and computation task. Computation task is the advanced function based on the CPU online proof, the system assigns computation tasks randomly. There is no need for TEE Workers to fight for the accounting right by computing Hash, so it will not generate the motivation of ASIC. The computing power of TEE Workers is used for running the real world’s trustless computing tasks rather than protect consensus, and CPU computing power can be used instead of “waste”.

All in all, through TEE technology, Phala can not only ensure that the consensus does not need PoW, but also realize the existence and availability of the CPU can be proved without PoW. Therefore, the CPU can be kept online at a very low cost in Phala. Prove that the incentive to obtain the mining system is real CPU mining-and there is no need to worry about GPU and ASIC replacing CPU miners.

Raymond Reijnders
You’ve recently solidified partnerships with a large variety of projects such as Bondly Finance, Reef Finance, Plasm Network, and Zenlink to name a few.

How do you go about prioritizing projects to partner with as well as subsequently work on post-partnership deliverables?

Marvin Tong
Our first priority in finding partners is to be able to establish cross-chain use cases — shares link to cross-chain demo by Acala & Phala. In this use case, you can see how Phala helps Defi on Polkadot protecting privacy. suppose we want to achieve the following:

  • Let the assets and DeFi contracts on Acala use Phala’s scalable execution and privacy capabilities.
  • Let private assets from Phala be used within Acala’s suite of applications.

Using Polkadot/Kusama’s cross-chain protocol, we can achieve both goals without changing a single line of code! For any non-Polkadot/Kusama cross-blockchain interactions it would have consumed huge developer resources and energy. These kinds of Cross chain cases are the partnerships we are focus on building.

In another type of partnership, we have partnerships with NFT projects like Bondly and DEGO. We are aiming to provide Polkadot with NFT products and gameplay that support mystery boxes, random or encrypted content. Phala can bring Secret Boxes NFT into the market, it is much more fun! You don’t know what you get in the market, you can also sell the NFTs in “unknown” status, like a much more powerful version of hashmasks: Hashmasks randomly combine elements to generate your NFT But Phala could enable set up a certain content of NFT secretly (could verify), then sell when no one knows what’s in it! It’s quite popular.

Raymond Reijnders
At the core of Phala is the confidential smart contract platform that you’ve illustrated for us.

We could say you are targeting this notion of the “too much of a good thing” problem that arose from Ethereum’s absolute openness. What arguments against your approach/solution have you heard? Are there valid limitations to the system that you bring to the table?

Marvin Tong
Privacy is important but not the key function of cryptocurrency. We know there’re lots of secret coins/tokens that work well on secret transactions, such as Monero, Zen, Grin, etc., but we want to expand the concept of “privacy protection” to “confidential protection”.

It’s not only related to the user’s transaction, privacy should protect all the confidential data in smart contracts from being leaked. Phala aims to be a secure confidential smart contract platform that runs contracts in trusted hardware enclaves inside processors, creating a novel privacy computing cloud with private computing and services for both users and companies. The major argument about our challenge is, can we trust by hardware? — The answer is, yes and no.

Our threat model partially assumes the TEE manufacturer can be trusted. This is reasonable. First, they don’t know how their hardware will be used and thus cannot plan the attack ahead of time, significantly reducing the risks. Second, if affected by the so-called zero-day attacks, other applications running on this CPU (outside of the TEE) are generally at risk. It’s common to think software vulnerabilities are patchable while hardware vulnerabilities are not. Suppose the vulnerability requires physical access to exploit it, as some other papers suggest, miners may be able to steal data from the confidential contract. In order to mitigate this, we apply randomness to Phala. The blockchain randomly assigns miners to the confidential contracts in each period. The miners shuffle after every such period. As long as the malicious party doesn’t have control over a significantly large portion of miners such an attack is impossible.

Raymond Reijnders
Privacy and confidentiality have been big conversations and they’re starting to get bigger with each data leak and on a smaller scale Brave Browser’s growing traction and Google’s privacy-first model.

How do you feel about the future of privacy and technology generally? Given the ideal scenario of Phala gaining significant traction and ‘market share’ — what does the future look like for you?

Marvin Tong
Yes, we think the privacy of data is one of the most important rights for humans, but we are selling it to companies for free. We want to prevent Orwellian or opposing-anarchistic scenarios of a dystopian digital future, we need technology to maintain the structure of established societal institutions, checks, and balances in the digital realm, rather than breaking or molding them. Phala can address these challenges. We should envision multiple use-cases where individuals, businesses, and governments may use the single protocol that ensures both privacy and trust among them.

Just as Bitcoin helped create verifiable digital scarcity, Phala helps create verifiably private computations.

We also want to allow the applications on the Phala cloud to remain compliant with different privacy-sensitive regulations across jurisdictions while maintaining the advertised properties.

Daniel Dal Bello
At first glance, Secret Network appears to be solving similar ‘issues’ with privacy-preserving/confidential smart contracts.

Based on the current state of both projects, can you talk us through any similarities and perhaps more importantly — the differences? What are some things that you can enable above and beyond Tendermint-based Secret Network?

Marvin Tong
Good question! Common points of Phala and Secret are that we both run confidential smart contracts and we both rely on hardware enclaves (Intel SGX).

But we also have many differences from each other: Secret is in Cosmos ecosystem while Phala is in Polkadot ecosystem. On Phala, we separate consensus and computation. We can have unlimited numbers of miners to run computation tasks. But all nodes of Secret network run the same computation task, meaning that there’s a limit computation performance in the network. Therefore, SCRT has a similar throughput to other blockchains (ETH, EOS, etc), but Phala is a rollup architecture and can scale thousands of times. On the market side, Secret targets blockchain use cases, while Phala targets both blockchain and cloud computing scale scenarios.

Daniel Dal Bello
Given the more technical nature of the ecosystem, it is perhaps likely that participation by your 30,000 Telegram community members is limited (e.g mining, gatekeeping). Do you agree with this? In what other areas do you see your community growing and how do you approach converting community members to active participants?

Marvin Tong
I think all 30k members in the community can join Phala network playground very well. Phala is a very scalable platform in which you can:

  • Join Phala as a miner If you have TEE equipment. No limits! We design the network in 100k level of computing hardware number online at the same time.
  • If you have $PHA token, you can stake for TEE workers to get some share.
  • If you have $PHA token, you can also nominate Gatekeepers who manage the TEE’s keys for security.
  • Developer can use $PHA to lend for decentralized CPU deploy their program Privacy Cloud platform.
  • If you hold $DOT or $KSM, you can get PHA by slot auction!
  • And we also have Defi in Privacy on Polkadot so that everyone can use it in very soon.

Our community is growing very fast.

Hillrise Capital is an independent research and advisory firm exclusively focused on blockchain startups and crypto-assets.

Phala Network is a privacy-preserving cloud computing service, based on Substrate, that will run as a parachain in the Polkadot ecosystem to offer computing power comparable to existing cloud services but which protects the privacy of managed programs.

Connect with Hillrise Capital
https://hillrise.capital/join-us
https://hillrisecapital.medium.com
https://twitter.com/hillrisecapital

We’re an independent research and advisory firm focused on blockchain startups and crypto-assets.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store