Phala Network: Artificial Intelligence Routing

Aug 01, 2024
16 min read

Introduction

Phala Network, established in 2018, initially positioned itself in the privacy computing sector by combining smart contract execution environments with TEE (Trusted Execution Environment). This integration enabled secure and reliable execution of smart contracts. Additionally, Phala Network provides a comprehensive privacy protection mechanism to ensure that users have control over their own data. In 2023, driven by the AI trend led by the US stock market, Phala Network swiftly adapted to the AI wave by developing artificial intelligence routing. Embracing the concept of modularization, Phala Network transformed itself into the execution layer for artificial intelligence.

Project Basic Information

Basic Information

Project Team

Core Team

  • Marvin Tong: Founder & CEO. Marvin graduated from the Communication University of China with a Master’s degree. After graduation, he worked as a product manager at Tencent and Didi.
  • Hang Yin: Co-Founder & Chief Technical Developer. Hang graduated from Fudan University in China. He was a specialist in ML-related fields for Google Search, one of the Polkadot ambassadors in China, and the founder of Bitcoin Gold.
  • Zhe Wang: Co-Founder & Chief Operating Officer. Zhe graduated from Huazhong University of Science and Technology with a Master’s degree. He is an expert in the computer hardware lab at Huazhong University, and has served as the CTO & CEO of Bitcoin Gold, Xiaohei Technology, and Haha Retail.
  • Jun Jiang: Co-Founder & Chief Technology Officer. Jun was formerly the administrator of RubyChina. He has previously worked as the CTO of KnewOne and as a software architect at DJI.

Advisory Team

Shun Fan Zhou: One of the authors of the Phala Network whitepaper and a PhD from the System Software and Security Laboratory at Fudan University. He has published research on attack transactions and defense mechanisms in the Ethereum ecosystem at the prestigious USENIX Security conference and has co-authored multiple papers in top international security conferences.

Sandro Gorduladze: Angel investor and partner at HASH CIB. Sandro established the research department at HASH, renowned for its in-depth reports. Prior to joining HASH, Sandro worked at PwC Russia, providing tax consultancy to companies in the TMT sector.

Konstantin Shamruk: Holds a PhD in Economics from the University of Toulouse, France. He led the game theory analysis work for the economic design of Phala Network.

Jonas Gehrlein: Research Scientist at the Web3 Foundation, responsible for studying economic issues in the Polkadot ecosystem. Before joining W3F, Jonas earned a PhD in Behavioral and Experimental Economics from the University of Bern, where he researched human behavior in markets and organizations. He also holds a Master’s degree in Quantitative Economics from the University of Konstanz.

Zo Meckbach: Senior Ambassador for Polkadot, researcher, and advocate for Web3 and cybersecurity. She is currently the COO of MH-IT & Service GmbH. Before joining MH-IT, she held an application analysis position at Google.

Funding Information

Phala Network has raised approximately $10 million through a single round of financing.

Seed Round

In July 2020, Phala Network raised $10 million in its seed round, with investments from Candaq Group, IOSG Ventures, SNZ, Incuba Alpha Group, nfiChain, Exoplanet Capital, and Blue Mountain Labs.

Development Strength

Phala Network was initiated in 2018 by founder Marvin Tong. The table below outlines key events in the project’s development:

From Phala Network’s project development roadmap, it is evident that the Phala Network team consistently meets their scheduled milestones on time. This punctuality reflects the strong capabilities of the technical development team led by Marvin Tong and Hang Yin. While Phala Network’s expansion into the AI sector offers broader development prospects, it also brings greater technical challenges, demanding even higher standards from the technical development team.

Technical Features

Phala Network is a privacy computing infrastructure based on the Polkadot ecosystem. It aims to achieve data confidentiality and privacy protection through Trusted Execution Environment (TEE) technology, cloud computing services, and a cross-chain data confidentiality layer. Additionally, Phala Network employs an AI co-processor to provide secure and verifiable computing solutions for integrating encryption and artificial intelligence into the application layer.

In simpler terms, Phala Network has added an AI co-processor to its existing privacy computing infrastructure. This enhancement allows the deployment of AI agent contracts on Phala Network, transforming it into the execution layer for Web3 AI. By utilizing TEE technology, Phala Network ensures privacy protection. With Phala Network’s AI agent contracts, users can access top-tier LLMs (Large Language Models), with control originating from smart contracts written on the blockchain.

Phala Network’s AI Agent Overview (Refer to Phala Network Whitepaper for the diagram)

Before incorporating AI agent contracts, Phala Network’s primary technical features focused on ensuring data confidentiality and privacy protection through various technologies. These included hardware-based privacy computing technologies, especially Trusted Execution Environment (TEE), to ensure data confidentiality and integrity during computation. All computations within the TEE guarantee the correctness of program execution and data security. Additionally, Phala Network integrated zero-knowledge proof technology to enable private transactions, ensuring that smart contract data remains confidential and protects user privacy. This approach allows Phala Network to offer general-purpose, user-friendly confidential smart contracts supporting zero-trust cloud services.

Key components include the Trusted Execution Environment (TEE) and a multi-layer key rotation system.

Trusted Execution Environment (TEE)

The Trusted Execution Environment (TEE) is a privacy-focused technology that isolates the node’s code execution and operations from the main operating system of the computer processor. Phala Network uses Intel’s Software Guard Extensions (SGX) for TEE processing. This system ensures that even individuals with physical access, such as Phala Network operators or malicious third parties, cannot view the node’s state or manipulate the data being processed. Typically, the TEE replaces zero-knowledge proofs (ZKPs). In Phala Network, TEE not only protects data confidentiality and integrity but also supports complex computational tasks. For example, by offloading the execution of smart contracts to off-chain secure workers supported by TEE, Phala Network can fully utilize the computational power of individual workers without the risk of data leakage or tampering.

Multi-Layer Key Rotation System

Phala Network employs a special set of worker nodes called “Gatekeepers,” whose primary task is to ensure computational security. In Phala Network, worker nodes do not have the authority to leave the network at will, so tasks need to be deployed to redundant worker nodes with the same keys to ensure access to encrypted inputs, outputs, and program states. Gatekeeper nodes are responsible for managing encryption keys and dynamically assigning confidential data to worker nodes, ensuring data security and integrity.

Phala Network uses a comprehensive key rotation mechanism to ensure the privacy of its contracts and the overall security of the system. This process involves periodically updating the master key according to election rules. New Gatekeepers are elected in each cycle and generate a new master key through a secure key exchange protocol. The new key is used to re-encrypt Gatekeeper states, which are then distributed and confirmed among the new Gatekeepers. During this transition, communication between miners and Gatekeepers is temporarily interrupted to maintain consistency and security. Communication resumes after the key rotation, with a delay of two on-chain confirmations. In addition to rotating the master key, Phala Network regularly updates cluster and contract keys to enhance security.

Transition to Web3 AI Execution Layer

After incorporating AI agent contracts, Phala Network’s primary business shifted from being a privacy computing infrastructure to becoming the execution layer for Web3 AI. The original privacy computing infrastructure now serves as the foundation for the Web3 AI execution layer. The existing AI agent contracts operate on top of this original privacy computing foundation.

AI Agent Contracts

AI Agent Contracts are tools for users to build smart contracts that control AI agents capable of running on or off the blockchain. The code for these AI agents is written in TypeScript/JavaScript and executed within Phala Network’s nodes. These agents can aggregate data from external APIs and incorporate custom AI functionalities. AI agents use Phala Network’s trustless cloud computing infrastructure for off-chain confidential processing. Technically, AI Agent Contracts run on TEE (Trusted Execution Environment) within worker nodes managed by Phala Network. A subset of Gatekeeper worker nodes manages the keys to ensure network security. These contracts provide developers with powerful tools to leverage AI agents for various tasks, ensuring security and privacy when handling sensitive data due to the secure execution environment. The development of AI Agent Contracts introduces new possibilities for blockchain technology applications and offers developers more space for innovation.

pRuntime

Worker nodes host AI Agent Contracts in the TEE to protect the code’s integrity and privacy, ensuring that contracts are not subject to malicious attacks or tampering while providing robust computational power to the network. pRuntime (Phala Runtime) is a program running inside the TEE and is a core component of Phala Network’s worker nodes. pRuntime is responsible for receiving and executing computational tasks from the blockchain, ensuring the tamper-resistance and security of computations.

In summary, Phala Network introduces AI Agent Contracts to make AI agents as easy to run as smart contracts, with the management and access control of AI agents handled by smart contracts. AI agents can freely call each other to form complex applications, all within the TEE to ensure code integrity and privacy. This transformation enables Phala Network to become the execution layer for Web3 AI while fully leveraging the advantages of its original privacy computing infrastructure.

Innovation Compared to Competitors

After introducing the AI co-processor, although the underlying operational logic of Phala Network has not changed, the project’s main narrative has shifted from the privacy computing infrastructure track to a specific subfield within the AI sector: the algorithm track. Its competitors now include projects such as Morpheus, QnA3.AI, Fetch.AI, SingularityNET, and ChainGPT.

Phala Network’s Advantages (Refer to Phala Network Whitepaper for the image)
  1. Exceptional Privacy: Thanks to Phala Network’s foundation in privacy computing before its transition to the AI sector, it possesses inherent privacy advantages. Phala Network employs hardware privacy computing technology, especially Trusted Execution Environment (TEE), to ensure data confidentiality and integrity during computation. All computations within the TEE guarantee the correctness of program execution and data security. Additionally, it integrates zero-knowledge proof technology to enable private transactions, ensuring that smart contract data does not need to be disclosed, thereby protecting user privacy. This approach provides users with a secure and reliable privacy computing solution, offering solid technical support for privacy protection in blockchain applications.
  2. Powerful Functionality: The introduction of AI Agent Contracts gives Phala Network a significant edge in the AI agent sector. These contracts simplify the operation of AI agents to be as straightforward as smart contracts, with smart contracts managing AI agents and allowing them to be readily controlled and accessed. Additionally, it enables EVM smart contracts to extend their functionality off-chain, greatly enhancing the efficiency of AI agent deployment and operation. This results in AI agents centered around smart contracts.
  3. Extensive Integration: By utilizing AI Agent Contracts, Phala Network can aggregate data from external APIs and incorporate custom AI Agents. This eliminates the learning curve associated with accessing decentralized applications. Consequently, it allows for the large-scale and effortless integration of external AI tools and projects, such as OpenAI, LangChain, GPT-4, etc.
  4. Broader Applications: The use of AI Agent Contracts makes the deployment of AI agents on Phala Network both simple and versatile. Users can link their custom AI agents to various domains such as social, DeFi, or DAOs, enhancing their efficiency in work and daily life.

In summary, Phala Network’s superior performance simplifies the deployment and use of AI agents, addressing concerns about operational ease and privacy while providing a significant competitive advantage in the AI sector.

Project Model

Business Model

With Phala Network’s core narrative shifting from privacy computing to the AI sector, its economic model now consists of four main roles: miners, staking users, users of AI agent contracts, and users of privacy computing.

  1. Miners: Phala Network miners provide the network’s computational power. They offer their computer CPU power to Phala Network and are the only participants responsible for actual computation. They are fundamental to the network’s operation, and the more computational power they contribute, the greater their rewards.
  2. Staking Users: To ensure miners do not act maliciously, Phala Network’s mining design requires miners to stake a certain amount of PHA tokens as collateral. However, some miners may prefer to provide computational power without staking additional tokens. Thus, staking users are categorized into two types: Stakepool and Vault. Stakepool consists of miners who provide both computational power and staking tokens or users who provide their PHA tokens directly to a Stakepool. Users who do not want to stake tokens directly to a specific Stakepool can place their tokens in a Vault, where the Vault will stake tokens based on the performance of each Stakepool.
  3. Users of AI Agent Contracts: These users are the primary consumers of Phala Network’s services. They run AI agent contracts on Phala Network and are required to pay fees in the form of PHA tokens. This payment is a major revenue source for Phala Network.
  4. Users of Privacy Computing: Phala Network continues to attract users with genuine privacy computing needs due to its strong privacy computing capabilities. Fees paid by private computing users also contribute to the revenue for both miners and Phala Network.

Revenue Sources for Phala Network:

  • Fees paid by users of AI agent contracts
  • Fees paid by users of private computing

Token Model

According to the whitepaper, the total supply of PHA tokens is 1 billion, with a circulating supply of 738.3 million PHA, representing a circulation rate of 73.83%. The overall token distribution is as follows:

Token Utilization

According to the whitepaper, PHA tokens are utilized in Phala Network as follows:

  1. Miner Rewards: Miners receive PHA tokens as rewards for mining new blocks, which requires them to provide computational power.
  2. Usage Fees: Users of AI agent contracts and privacy computing services pay fees in PHA tokens.
  3. Governance Participation: Staking PHA tokens allows users to participate in governance through PhalaDAO.
  4. Staking Participation: In Phala Network’s mining design, miners must stake a certain amount of PHA tokens as collateral to prevent malicious behavior.

Determining PHA’s Value

The whitepaper indicates that PHA tokens’ value in Phala Network is fairly conventional, with the introduction of a staking mechanism increasing the value of PHA tokens through lock-up, which is a key factor in enhancing the project’s value. The current circulation rate of PHA tokens is 73.83%. While this is relatively high, approximately one-third of the tokens remain undeveloped.

In the future, the increase in PHA token value will primarily come from the intrinsic value of the Phala Network project itself. Specifically, this value is linked to the usage level of AI agent contracts. Higher usage will drive up the token price, which in turn will increase miner rewards, leading more miners to participate, lock up more tokens, and reduce the token circulation rate, creating a positive feedback loop.

However, PHA tokens do not have a mechanism for centralized or periodic burning, which is a notable gap in its tokenomics. If Phala Network’s business does not develop successfully, the token price may not rise accordingly.

Token Price Performance

PHA Price Trends (the data from CoinGecko)

According to data from CoinGecko, PHA’s price has increased more than 4 times over the past year, from a low of $0.0816 in July 2023 to a high of $0.3465. The primary trading venues for PHA include major exchanges such as Binance, OKX, and HTX. This significant price increase this year has been largely driven by the benefits of the AI sector’s growth.

Market Cap and FDV

Current Price: $0.126

Circulating Supply: 738,334,838 PHA

Market Cap: $93.43 million

Fully Diluted Valuation (FDV):

  • Total Supply: 1 billion PHA
  • FDV: $126.54 million

Daily Trading Volume

Approximately $5.66 million.

PHA Daily Trading Volume

Although the trading volume represents about 4.47% of the circulating market cap, which is relatively low, this is largely due to the current market environment. Recent events, such as Mt. Gox situation has led many users to adopt a more cautious stance, contributing to lower trading activity.

Top Ten Token Holders

The data from Etherscan

According to data from Etherscan, the top ten PHA holders collectively account for 92.19% of the total supply.

Number of PHA Holders

Number of PHA Holders (the data from Subscan)

According to data from Subscan, the number of PHA token holders has been steadily increasing over the past year.

Daily Active Accounts

Daily Active Accounts (the data from Subscan)

According to data from Subscan, the number of daily active accounts on Phala Network has been consistently increasing over the past year.

Staking Situation

Staking Situation (the data from Subscan)

According to data from Subscan, the actual circulating supply of PHA should be 847.27 million PHA, while the current circulating supply is 738.33 million PHA. Therefore, the actual stake amount is approximately 108.94 million PHA.

Project Risks

While Phala Network’s shift to the AI track with the introduction of AI Agent contracts benefits its project development and token value growth, it also faces significantly increased technical challenges. The integration of complex AI Agent contracts on top of its existing privacy computing infrastructure, combined with the continual addition of new AI Agents, poses substantial challenges for its technical team. Therefore, the project may encounter system issues in the future. The uncertainty largely depends on Phala Network’s ability to address these problems and whether the AI Agent contracts perform as advertised.

Summary

Phala Network’s introduction of AI Agent contracts has made deploying and managing AI Agents as straightforward as handling smart contracts. This approach enables real-time management and access control of AI Agents, allows different agents to interact freely to build complex applications, and ensures all operations occur within a Trusted Execution Environment (TEE) to protect code integrity and privacy. By leveraging its existing privacy computing infrastructure, Phala Network has effectively transformed itself into a Web3 AI execution layer. This innovation provides a novel solution for AI application security and privacy protection while supporting the integration of smart contracts and blockchain technology.

After transitioning to the AI track with the launch of AI Agent contracts, Phala Network stands to benefit from project development and token price growth. However, this shift also brings increased technical challenges, particularly due to the complexity of the AI Agent contracts and the ongoing integration of new AI Agents. These factors present a significant challenge to the technical team.

In summary, Phala Network has leveraged its strengths in privacy computing infrastructure and the new capabilities of AI Agent contracts to position itself advantageously in the AI track. If the project continues as planned, Phala Network is likely to maintain a strong position in the AI space.

Frontier Lab is a leading global market maker in the cryptocurrency space, offering secure, efficient, and transparent Market Making as a Service (MaaS).
We provide tailored liquidity solutions for token projects, exchanges, and institutions, enhancing market efficiency.
Frontier Lab currently provides liquidity across over 50 exchanges and trading platforms worldwide, ensuring stable and scalable market support for our partners.
Join Us