Relay Mining Estimation & Parameters

A gentle high-level introduction to token minting and burning, intended to understand the different variables involved and how they interact.

Mathematic Representation

Claim.NumRelays=scaleDown(RelayMiningDifficulty,ActualNumberOfRelays)ClaimedComputeUnits=Claim.NumRelays×ComputeUnitsPerRelayEstimatedOffchainComputeUnits=scaleUp(RelayMiningDifficulty,ClaimedComputeUnits)uPOKT=EstimatedOffchainComputeUnits×ComputeUnitsToTokenMultiplierComputeUnitCostGranularity\begin{aligned} \text{Claim.NumRelays} &= \text{scaleDown}(\text{RelayMiningDifficulty}, \text{ActualNumberOfRelays}) \\ \text{ClaimedComputeUnits} &= \text{Claim.NumRelays} \times \text{ComputeUnitsPerRelay} \\ \text{EstimatedOffchainComputeUnits} &= \text{scaleUp}(\text{RelayMiningDifficulty}, \text{ClaimedComputeUnits}) \\ u\text{POKT} &= \frac{\text{EstimatedOffchainComputeUnits} \times \text{ComputeUnitsToTokenMultiplier}}{\text{ComputeUnitCostGranularity}} \end{aligned}
  • Claim.NumRelays = scaleDown(RelayMiningDifficulty, ActualNumberOfRelays)

  • ClaimedComputeUnits = Claim.NumRelays × ComputeUnitsPerRelay

  • EstimatedOffchainComputeUnits = scaleUp(RelayMiningDifficulty, ClaimedComputeUnits)

  • uPOKT = EstimatedOffchainComputeUnits × ComputeUnitsToTokenMultiplier / ComputeUnitCostGranularity

Relay Mining Parameters & Function

Parameter
Type
Scope
Controller
Description

RelayMiningDifficulty

Dynamic Parameter

Service Specific

Onchain protocol business logic

The probability that a relay is reward applicable

ComputeUnitsPerRelay

Static Parameter

Service Specific

Service Owner

Number of compute units each reward applicable relay accounts for

ComputeUnitsToTokenMultiplier

Static Parameter

Network Wide

Network Authority

Number of onchain tokens minted/burnt per compute unit

ComputeUnitCostGranularity

Static Parameter

Network Wide

Network Authority

Enable more granular calculations for the cost of a single relay (i.e. less than 1 uPOKT)

scaleDown

Offchain procedure

Service Specific

RelayMiner & Onchain Params

A methodology to ensure RelayMiner scalability

scaleUp

Onchain procedure

Service Specific

Validator & Onchain Business Logic

A methodology to ensure fair token distribution

Claim & Relay Estimation Flow

1

Tree Construction

Converts actual offchain number of relays to the probabilistic number of reward applicable relays.

2

Claim Creation

Sums up the total number of reward applicable relays in the tree into a single claim.

3

Claim Settlement

Estimates the total number of consumed compute units based on the claim and service parameters.

4

Token Distribution

Converts the estimated compute units into uPOKT and distributes it to relevant stakeholders.

(Workflow elements referenced: Sparse Merkle Sum Trie root sum of reward-applicable relays, RelayMiner co-processor, Service.RelayMining Difficulty, Session.Cost in uPOKT, Service.ComputeUnitsPerRelay, Claim.NumRelays.)

💰 Example with Numbers

Assume the following Offchain market driven numbers:

  • POKT price: $0.1/POKT

  • Market rate: $5M for 1M relays

  • Session: Num actual offchain relays between App (User) & Supplier (Operator)

Num Relays
Description
RelayMiningDifficulty (RMD)
ComputeUnitsPerRelay (CUPR)
ComputeUnitsToTokenMultiplier (CUTTM)
ComputeUnitCostGranularity (CUCG)
Estimated Compute Units (CU)
uPOKT Result
USD (at $0.10/POKT)

1,000,000

Baseline values

1.0

1.0

50

1

1,000,000 × 1 × 1 = 1,000,000

1,000,000 × 50 / 1 = 50,000,000 uPOKT = 50 POKT

$5.00

1,000,000

High multiplier / High granularity

1.0

1.0

50,000,000

1e6

1,000,000 × 1 × 1 = 1,000,000

1,000,000 × 50,000,000 / 1,000,000 = 50,000,000 uPOKT = 50 POKT

$5.00

1,000,000

High compute units per relay

1.0

5.0

50

1

1,000,000 × 1 × 5 = 5,000,000

5,000,000 × 50 / 1 = 250,000,000 uPOKT = 250 POKT

$25.00

10,000,000

Adjusted relay mining difficulty

0.1

1.0

50

1

1,000,000 × (0.1 / 0.1) × 1 = 1,000,000

1,000,000 × 50 / 1 = 5,000,000 uPOKT = 5 POKT

$5.00

FAQ

Why do we need relay mining difficulty?

To be able to scale a single RelayMiner co-processor to handle billions of relays while being resource efficient.

How do we prove the claim?

Visit the claim and proof lifecycle docs for more information: https://dev.poktroll.com/protocol/primitives/claim_and_proof_lifecycle

Why is every relay the same number of compute units?

We will handle variable compute units per relay in the future.

How does rate limiting work?

Rate limiting is an optimistic non-interactive permissionless mechanism that uses a commit-and-reveal scheme with probabilistic guarantees, crypto-economic (dis)incentives, and onchain proofs to ensure that suppliers do not over-service applications.

How does burning work?

Burning is a mechanism that puts funds in escrow, burns it after work is done, and puts optimistic limits in place whose work volume is proven onchain.

Was this helpful?