Phat Contract — What Phala’s New Product Will Bring to Web3

If you have followed Phala’s roadmap, it’s no surprise that the official version of Phat Contract will launch soon. In this article, we would like to provide a high-level overview of why we have developed Phat Contract and what value it can bring to the overall Web3 space.
The Next Major Step in Replacing Web2
With the rise of more and more DApp development in the blockchain space, it is no question that the backend hosting for DApps is getting more complex. Most current tech in Web3 is based on available solutions, such as smart contracts. However, there are still many limitations coming with the current infrastructure in Web3. It is obvious that the need for decentralized computing and hosting of complex applications is increasing drastically. Though, the full potential of decentralized solutions is not in use yet.
It will surprise you, but most DApps as well as game developments built in Web3 are still using a huge amount of centralized services, such as computing services provided by AWS, Microsoft, or Google.
The problem today is that not enough decentralized solutions are available which can actually handle the requirements for such DApps.
Servers vs. Serverless
Some cloud companies provide dedicated servers for developers to host their applications on it. However, this service is often very expensive and time-intensive to set-up, leading to high operation and maintenance costs. Another option is to provision serverless functions. Serverless is a cloud computing execution model where the cloud provider offers computing resources on demand. It will also manage all architectures, including cloud infrastructure. Looking into existing centralized serverless functions, you might be familiar with AWS Lambda.
If you, however, want to combine serverless functions with a high degree of decentralization, not many solutio ns are out there for this. It is technologically easy to either focus on a centralized serverless function or on solely decentralized computation. Most solutions provide such a general approach, nonetheless it lowers the automated functions in a serverless approach. The magic of combining both services has not been tackled yet and this is where Phala Network comes in. The new product that will solve these issues is the “Phat Contract”.
The Web3 Version of AWS Lambda
Phat Contract can be seen like the Web3 version of AWS Lambda backed by the decentralized Phala computing cloud. It is meant to support complex computation with low latency and cost.
The difference to other serverless solutions is that it runs on Phala’s decentralized computation cloud which has by now over 130,000 vCPU running. That said, Phat Contract do not minimize on decentralization nor on serverless functionality.
Due to the fact that Phat Contract run in one or several decentralized computation nodes simultaneously and all computation nodes are on-call for 24 hours, scaling-up is guaranteed.
As you might know, Phala Network runs like a cloud rather than a chain, because we separate the consensus from the computation and all the computation nodes are executed in Secure Enclaves. Since Phat Contract are also executed off-chain, there is low latency and zero gas fee. Yes you heard it right, zero gas fee for execution in Phat Contract. This is achieved by the off-chain execution.
The off-chain execution brings many more advantages. Simply put, you can understand Phat Contract as Lego blocks to be able to create your own DApps without the need to maintain a server. Moreover, you also do not need to resign from decentralization.
Phat Contract can access any Web2 and Web3 services through built-in internet access. Therefore, it can interact with any blockchain smart contract (EVM, WASM…)
Now you are asking, where is all the data stored when I execute in Phat Contract? No worries, we got you! Phat Contract support the standard S3 API so you can connect to many storage solutions such as Amazon S3, Arweave and Filecoin.
Impossible DApps made possible with Phat Contract
Let’s talk about use cases. Understanding all the advantages of Phat Contract it is not too difficult to come up with fitting use cases. I mean this is what we have waited for to make impossible DApps possible. And yes, Phat Contract was born to build impossible decentralized apps. As we know by now, many use cases are limited to be built for Web3, however, Phat Contract can make many use cases a reality for Web3.
Here you can find an overview of several use cases we are expecting (and also working on):
Web3 Middleware
- Building decentralized Oracles with one contract, e.g on-chain price feed, Twitter monitor, cross-chain data feed
- Data attestation service for smart contracts
- Privacy-enhanced RPC API
- Indexer aggregator for e.g. The Graph, SubQuery
- Workflow / automation / keeper / ifttt
- Personal storage / secret store, e.g. personal tx/address tagging on a blockchain explorer
Web2 to Web3 middleware
- Development of a Push notification service to social media, mobile apps, etc.
- Account abstraction, e.g. decentralized OAuth
- Decentralized PKI e.g. HTTPs certificate authority for ENS
- Trusted IoT data processor
Retail tools from Web2 to Web3
- Leveraging 2FA on a decentralized infrastructure
- Enabling a decentralized password manager
- Hosting for website front-ends
What use cases can you think about when learning about Phat Contract? We are excited to hear about them and see what you are building with our new product release.
About Phala
Phala Network tackles the issue of trust in the computation cloud.
By organizing a decentralized network of computation nodes around the world, it offers high-performance services without relying on any cloud vendor. Phala workers run the programs in Secure Enclaves, a privacy technology already embedded into modern processors, enabling versatile and confidential execution. Together, this creates the infrastructure for a powerful, secure, and scalable trustless computing cloud.
— Subscribe | Website | Twitter | Github
— Discord | Forum | Telegram |Italiano |Français | Persian | Korean
Phat Contract — What Phala’s New Product Will Bring to Web3 was originally published in Phala Network on Medium, where people are continuing the conversation by highlighting and responding to this story.