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
- Relay Mining Parameters & Function
- Claim & Relay Estimation Flow
- 💰 Example with Numbers
- FAQ
Mathematic Representation
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
The end-to-end flow can be split into 4 key steps (steps 1-3 capture in the diagram below):
- Tree Construction: Converts actual offchain number of relays to the probabilistic number of reward applicable relays
- Claim Creation: Sums up the total number of reward applicable relays in the tree into a single claim
- Claim Settlement: Estimates the total number of consumed compute units based on the claim and service parameters
- Token Distribution: Converts the estimated compute units into uPOKT and distributes it to relevant stakeholders
💰 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 x 1 x 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 x 1 x 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 x 1 x 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 x (0.1 / 0.1) x 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.
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.