Phala Network Docs
  • Home
    • πŸ‘ΎPhala Network Docs
  • Overview
    • βš–οΈPhala Network
      • πŸ’ŽPhala Cloud
      • πŸ₯·Dstack
      • πŸ”GPU TEE
    • πŸ’ŽPHA Token
      • πŸͺ™Introduction
      • πŸ‘Delegation
        • Delegate to StakePool
        • What is Vault
        • What is Share
        • WrappedBalances & W-PHA
        • Examples of Delegation
        • Use Phala App to Delegate
        • Estimate Your Reward
      • πŸ—³οΈGovernance
        • Governance Mechanism
        • Join the Council
        • Voting for Councillors
        • Apply for Project Funding
        • Phala Treasury
        • Phala Governance
        • Setting Up an Account Identity
  • Phala Cloud
    • πŸš€Getting Started
      • Sign-up for Cloud Account
      • Start from Cloud UI
      • Start from Cloud CLI
      • Start from Template
    • 🟧Launch an Eliza Agent
    • πŸ“¦Create CVM
      • Create CVM with Docker Compose
      • Create CVM with Private Docker Image
      • Set Secure Environment Variables
      • Access Your Applications
      • Setting Up Custom Domain
      • Debug Your Application
      • Deployment Cheat Sheet
    • βš™οΈCVM Management
      • Upgrade Application
      • Resize Resources
      • Check Logs
      • Private Log Viewer
    • πŸ”„Deploy Docker App in TEE
      • Expose Service Port
      • Generate RA Report
      • Access Database
      • Create Crypto Wallet
    • πŸ›³οΈSetup a CI/CD Pipeline
    • πŸ› οΈPhala Cloud CLI Reference
      • phala
        • auth
        • cvms
        • docker
        • simulator
    • Production Checklist
    • ❓FAQs
    • πŸ”Troubleshooting
    • πŸ“–Glossary
    • πŸ“‹References
    • πŸ”’Use Cases
      • TEE with AI
      • TEE with FHE and MPC
      • TEE with ZK and ZKrollup
  • Dstack
    • Overview
    • Getting Started
    • Hardware Requirements
    • Design Documents
      • Decentralized Root-of-Trust
      • Key Management Protocol
      • Zero Trust HTTPs (TLS)
    • Acknowledgement
  • LLM in GPU TEE
    • πŸ‘©β€πŸ’»Host LLM in GPU TEE
    • πŸ”GPU TEE Inference API
    • 🏎️GPU TEE Benchmark
  • Tech Specs
    • ⛓️Blockchain
      • Blockchain Entities
      • Cluster of Workers
      • Secret Key Hierarchy
  • References
    • πŸ”Setting Up a Wallet on Phala
      • Acquiring PHA
    • πŸŒ‰SubBridge
      • Cross-chain Transfer
      • Supported Assets
      • Asset Integration Guide
      • Technical Details
    • πŸ‘·Community Builders
    • 🀹Hackathon Guides
      • ETHGlobal Singapore
      • ETHGlobal San Francisco
      • ETHGlobal Bangkok
    • 🀯Advanced Topics
      • Cross Chain Solutions
      • System Contract and Drivers
      • Run Local Testnet
      • SideVM
    • πŸ†˜Support
      • Available Phala Chains
      • Resource Limits
      • Transaction Costs
      • Compatibility Matrix
      • Block Explorers
      • Faucet
    • ⁉️FAQ
  • Compute Providers
    • πŸ™ƒBasic Info
      • Introduction
      • Gemini Tokenomics (Worker Rewards)
      • Budget balancer
      • Staking Mechanism
      • Requirements in Phala
      • Confidence Level & SGX Function
      • Rent Hardware
      • Error Summary
    • 🦿Run Workers on Phala
      • Solo Worker Deployment
      • PRBv3 Deployment
      • Using PRBv3 UI
      • PRB Worker Deployment
      • Switch Workers from Solo to PRB Mode
      • Headers-cache deployment
      • Archive node deployment
    • πŸ›‘οΈGatekeeper
      • Collator
      • Gatekeeper
  • Web Directory
    • Discord
    • GitHub
    • Twitter
    • YouTube
    • Forum
    • Medium
    • Telegram
  • Legacy
    • Information
    • βš’οΈPhala SDK
    • πŸ‘¨β€πŸš€Builders Program
    • πŸ₯·AI Agent Contract
      • WapoJS Functions
      • Phala Agent Gateway
  • AI Agent Contract (Legacy)
    • πŸ‘©β€πŸ’»Getting Started
      • Build Your First AI Agent Contract
      • Build An Agent to Transact Onchain
      • Build Your AI Agent Contract with OpenAI
      • Build Your AI Agent Contract with LangChain
      • Integrate with 3rd Party API with HTTP Request
      • Run a Local Testnet With Docker
      • AI Agent Contract Templates
    • πŸ§™β€β™‚οΈExamples
      • Create a Weather Agent w/ Function Calling
    • ⛓️Supported Chains
    • FAQ
  • Agent Wars (Legacy)
    • πŸ“œIntroduction
    • πŸ’ΈTokenomics
    • ▢️Getting Started
      • Wallet Setup & Get PHA
      • Buy and Sell Keys
    • πŸ§‘β€πŸ«Tutorial
Powered by GitBook
LogoLogo

Participate

  • Compute Providers
  • Node
  • Community
  • About Us

Resources

  • Technical Whitepaper
  • Token Economics
  • Docs
  • GitHub

More

  • Testnet
  • Explorer
  • Careers
  • Responsible Disclosure

COPYRIGHT Β© 2024 PHALA.LTD ALL RIGHTS RESERVED. May Phala be with you!

On this page
  • Design Targets
  • Overall Design
  • Related Workers
  • Value Promise
  • Initial
  • Performance Test
  • Minimum Stake
  • Cost
  • General mining process
  • Update of
  • Payout Event
  • Subsidy Budget
  • Heartbeat & Payout Schedule
  • Slash rules
  • Final payout

Was this helpful?

Edit on GitHub
  1. Compute Providers
  2. Basic Info

Gemini Tokenomics (Worker Rewards)

PreviousIntroductionNextBudget balancer

Last updated 1 year ago

Was this helpful?

This document contains the Supply-end Tokenomics for Phala Network, which defines how workers get their rewards by sharing the computing power.

To read about how Demand-end users can stake PHA to use the network, see .

After the approval of the β€œGemini Tokenomics upgrade" democratic referendum on the block height #1,467,069, we have updated the content of the Supply-end Tokenomics as follows:

Design Targets

The overall economic design is built to address these points:

  1. Support Phala Network’s trustless cloud computing architecture

    • Consensus-Computation Separation

    • Linearly-scalable computing workers (100k order of magnitude number of workers)

  2. Incentivize workers to join the network

    • Ensure payment for power supplied irrespective of demand, especially at network bootstrap

    • Subsidize mining pool with 70% of the initial supply over time

    • Bitcoin-like budget halving schedule

    • Power the Phala and Khala at the same time

  3. Application pricing

  4. On-chain performance

The following details some key elements of the economic model.

Overall Design

Related Workers

Phala Supply-end Tokenomics applies to any workers running on Phala or Khala.

  • A virtual score for an individual worker representing value earned which is payable in the future, to motivate workers to behave honestly and reliably

  • Equal to the expected value of the revenues earned by the worker for providing power for the platform

  • Changes dynamically based on the worker’s behaviors and the repayment of Rewards

Params used in simulation:

Performance Test

A performance test measures how much computation can be done in a unit of time:

For reference,

Platform
Cores
Score
Approximate Price

Low-End Celeron

4

450

$150

Intel Xeon E Processor

6

1900

$500

Mid-End i5 10-Gen

8

2000

$500

High-End i9 9-Gen

10

2800

$790

The table is based on the version while writing of this documentation and is subject to changes.

The performance test will be performed:

  1. Before mining to determine the Minimum Stake

  2. During mining to measure the current performance, and to adjust the $V$ increment dynamically

Minimum Stake

Proposed parameter:

Locked state $PHA token can also be used for mining staking, e.g., Khala Crowdloan reward

Cost

General mining process

  • Decreased according to the Slash Rules if the worker misbehaves

Finally, once the worker decides to stop mining, they will wait for a Cooling Down period $\delta$. They will receive an one-time final payout after the cooldown.

Block number
$t$
$t+1$
$\dots$
$T$
$\dots$
$T+\delta$

Value Promise

$V_t$

$V_{t+1}$

$\dots$

$V_T$

$\dots$

$\dots$

Payment

$w(V_t)$

$w(V_{t+1})$

$\dots$

$w(V_T)$

$0$

$\kappa \min(V_T, V^e)$

Block reward

…

…

Block reward

Cooling off for $\delta$ blocks

Final payout

Proposed parameter:

When there’s no payout or slash event:

Proposed parameters:

Payout Event

In order to stay within the subsidy budget, at every block the budget is distributed proportionally based on the current Worker Shares:

Proposed algorithm:

Subsidy Budget

Phala / Khala

Relaychain

Polkadot/ Kusama

Budget for Mining

700 mln

Halving Period

180 days

Halving Discount

25%

Treasure Share

20%

First Month Reward

21.6 mln

Heartbeat & Payout Schedule

If they fail to send the Heartbeat transaction to the chain within the challenge window, the update of their value promise will be

Potential parameters:

Slash rules

The slash rules for workers are defined below. No slash rules have been implemented at the moment but will start in the near future.

Severity
Fault
Punishment

Level1

Worker offline

0.1% V per hour (deducted block by block)

Level2

Good faith with bad result

1% from V

Level3

Malicious intent or mass error

10% from V

Level4

Serious security risk to the system

100% from V

Final payout

Value Promise (V)(V)(V)

Mining honestly: VVV grows gradually over time

Harmful conduct: punished by reduction of VVV

Initial VVV

A Worker will run a Performance Test and stake some tokens to get the initial VVV:

Ve=f(Re,ConfidenceScore)Γ—(S+C)V^e = f(R^e, \text{ConfidenceScore}) \times (S + C)Ve=f(Re,ConfidenceScore)Γ—(S+C)

Re>1R^e > 1Re>1 is a Stake Multiplier set by the network (Khala or Phala).

SSS is the worker stake; a Minimum Stake is required to start mining. The stake can’t be increased or decreased while mining, but can be set higher than the Minimum.

CCC is the estimated cost of the worker rigs, inferred from the Performance Test.

ConfidenceScore\text{ConfidenceScore}ConfidenceScore is based on the worker’s IntelΒ© SGX capabilities.

f(Re,ConfidenceScore)=1+(ConfidenceScoreβ‹…(Reβˆ’1))f(R^e, \text{ConfidenceScore}) = 1 + (\text{ConfidenceScore} \cdot (R^e - 1))f(Re,ConfidenceScore)=1+(ConfidenceScoreβ‹…(Reβˆ’1))

VVV is always less than or equals to VmaxV_{max}Vmax​.

RPhalae=RKhalae=1.5R^e_{\text{Phala}} =R^e_{\text{Khala}} = 1.5RPhalae​=RKhalae​=1.5

ConfidenceScore\text{ConfidenceScore}ConfidenceScore for different Confidence Levels

ConfidenceScore1,2,3=1\text{ConfidenceScore}_{1,2,3} = 1ConfidenceScore1,2,3​=1

ConfidenceScore4=0.8\text{ConfidenceScore}_{4} = 0.8ConfidenceScore4​=0.8

ConfidenceScore5=0.7\text{ConfidenceScore}_{5} = 0.7ConfidenceScore5​=0.7

Vmax=30000V_{max} = 30000Vmax​=30000

P=IterationsΞ”tP = \frac{\text{Iterations}}{\Delta t}P=Ξ”tIterations​
Smin=kPS_{min}=k \sqrt{P}Smin​=kP​

PPP - Performance Test score

kkk - adjustable multiplier factor

kPhala=kKhala=50k_{\text{Phala}} =k_{\text{Khala}} = 50kPhala​=kKhala​=50

C=0.3PΟ•C = \frac{0.3 P}{\phi}C=Ο•0.3P​

Ο•\phiΟ• is the current PHA/USD quote, dynamically updated on-chain via Oracles

PPP is the initial Performance Test score.

In the early stages, we are compensating the equipment cost CCC with a higher Value Promise.

In the future, we plan to compensate for higher amortization costs (adding equipment amortization cost to the running costs cic^ici and cac^aca), thus increasing the speed of growth of the Worker’s VVV.

Each individual’s VVV is updated at every block:

Increased by Ξ”Vt\Delta V_tΞ”Vt​ if the worker keeps mining

Decreased by w(Vt)w(V_t)w(Vt​) if the worker got a payout

When a worker gets a payout w(Vt)w(V_t)w(Vt​), they will receive the amount immediately in their Phala wallet. The payout follows Payout Schedule and cannot exceed the Subsidy Budget.

Ξ΄=blocksΒ equivalentΒ toΒ 7Β days\delta = \text{blocks equivalent to 7 days}Ξ΄=blocksΒ equivalentΒ toΒ 7Β days

Update of VVV

Ξ”Vt=kpβ‹…((ρmβˆ’1)Vt+c(st)+Ξ³(Vt)h(Vt))\Delta V_t = k_p \cdot \big((\rho^m - 1) V_t + c(s_t) + \gamma(V_t)h(V_t)\big)Ξ”Vt​=kp​⋅((ρmβˆ’1)Vt​+c(st​)+Ξ³(Vt​)h(Vt​))

homho^mhom is the unconditional VVV increment factor for worker

c(st)c(s_t)c(st​) is the operational cost to run the worker

Ξ³(Vt)h(Vt)\gamma(V_t)h(V_t)Ξ³(Vt​)h(Vt​) represents a factor to compensate for accidental/unintentional slashing (ignored in simulated charts)

kp=min⁑(PtP,120%)k_p = \min(\frac{P_t}{P}, 120\%)kp​=min(PPt​​,120%), where PtP_tPt​ is the instant performance score, and $P$ is the initial score

If V>VmaxV > V_{max}V>Vmax​ after the update, it will be capped to VmaxV_{max}Vmax​

hoPhalam=ρKhalam=1.00020ho^m_{\text{Phala}} =\rho^m_{\text{Khala}} = 1.00020hoPhalam​=ρKhalam​=1.00020 (hourly)

w(Vt)=BshareΞ£sharew(V_t) = B \frac{\text{share}}{\Sigma \text{share}}w(Vt​)=BΞ£shareshare​

where BBB is the current network subsidy budget for the given payout period.

Whenever w(Vt)w(V_t)w(Vt​) is paid to a worker, his VVV will be updated accordingly:

Ξ”V=βˆ’min(w(Vt),Vtβˆ’Vlast).\Delta V = -min(w(V_t),V_t-V_\text{last}).Ξ”V=βˆ’min(w(Vt​),Vtβ€‹βˆ’Vlast​).

VlastV_\text{last}Vlast​ is the value promised at the last payout event, or VeV^eVe if this is the first payout.

The update of V is limited to ensure the payout doesn’t cause VVV to drop lower than it was in the last payout event. The limit is necessary to make sure workers are well incentives to always accumulate credits in the network. Otherwise, workers are incentivized to constantly reset their mining session if V decreases over time.

Share represents how much the worker is paid out from VVV. We expect it will approximate the share baseline, but with minor adjustments to reflect the property of the worker:

shareBaseline=Vt.\text{share}_{\text{Baseline}} = V_t.shareBaseline​=Vt​.

Ξ£share\Sigma \text{share}Ξ£share contains the share of workers which are running on Phala or Khala with the same subsidy ratio.

shareKhala=Vt2+(2Ptβ‹…ConfidenceScore)2\text{share}_{\text{Khala}} = \sqrt{V_t^2 + (2 P_t \cdot \text{ConfidenceScore})^2}shareKhala​=Vt2​+(2Pt​⋅ConfidenceScore)2​

sharePhala=Vt2+(2Ptβ‹…ConfidenceScore)2\text{share}_{\text{Phala}} = \sqrt{V_t^2 + (2 P_t \cdot \text{ConfidenceScore})^2}sharePhala​=Vt2​+(2Pt​⋅ConfidenceScore)2​

PtP_tPt​ is the instant performance score

In any block ttt, if the Worker’s VRF is smaller than their current Heartbeat Threshold Ξ³(Vt)\gamma(V_t)Ξ³(Vt​), they must send the Heartbeat transaction to the chain, which will update the on-chain record of their Value Promise and send a Mining Reward w(Vt)w(V_t)w(Vt​) to their reward wallet:

Ξ”Vt=βˆ’w(Vt).\Delta V_t = - w(V_t).Ξ”Vt​=βˆ’w(Vt​).
Ξ”Vt=βˆ’h(Vt).\Delta V_t = - h(V_t).Ξ”Vt​=βˆ’h(Vt​).

and their status is changed to unresponsive, and they will get repeatedly punished until they send a heartbeat, or stop mining. The slash amount hhh is defined in the Slash section.

The target is to process around 20 heartbeat challenges per block. The heartbeat challenge probability Ξ³(Vt)\gamma(V_t)Ξ³(Vt​) will be adjusted to target this number of challenges.

ChallengeWindow=10\text{ChallengeWindow} = 10ChallengeWindow=10 (blocks)

When a worker chooses to disconnect from the platform, they send an Exit Transaction and receive their Severance Pay after Ξ΄\deltaΞ΄ blocks.

After the cooling down period, the worker gets their final payout, representing the return of the initial stake. However, if VTV_TVT​ goes lower than the initial VeV^eVe, the worker will get less stake returned as a punishment:

w(T+Οƒ)=min⁑(VTVe,100%)β‹…Sw(T + \sigma) = \min(\frac{V_T}{V^e}, 100\%) \cdot Sw(T+Οƒ)=min(VeVT​​,100%)β‹…S

where SSS is the initial stake.

πŸ™ƒ
Stake to Compute