Skip to main content

Phat Contract

Phat Contract (also known as Fat Contract) has introduced new programming model called Off-chain Computation. This product is created by Phala Network. This blockchain is a decentralized cloud platform, built around TEE-based privacy technology.

Web2 vs. Web3 solution

DApps becoming more and more complex and require to serve a large number of users. Sometimes we need to use centralized tools in our decentralized application for exact needs. For instance, the existing DApps usually deploy backend logic to centralized services like AWS. The problem is that all your sensitive data will be processed in centralized clouds.

Phala Cloud is one of the step in replacing Web2. You can use this platform through Phat Contract. The main Phala Cloud features is:

  • blockchain-native solution (all data are saved on-chain);
  • low latency;
  • continuous service (no need to wait for the block production)
  • connectivity (HTTP requests)

Phala Pink

Pink extension is implementation of Phat Contract. Phat Contract is actually different from smart contract. It created to be a computation module for your contract. More about Phat Contract details you can read on official page.

How to use

To create Phat Contract you just need to use pink crate for your existing smart contract. If you want to create, for instance, ERC-20 (PSP-22) token, you can use OpenBrush, and then you can add some functionality by using Phala Pink. For sure, you can run your ink! contract in Phala blockchain with no modifications or without using pink-extension.

Check this repository to see some examples of pink-extension usage.