Token Logic Modules Introduction

Introduction

Token Logic Module (TLM) processing consists of the following sequential steps:

1

TLM pre-processing

General pre-processing to determine the number of tokens to settle per claim.

2

TLM processing

Iterating through each TLM, sequentially, independently of each other.

Background: Max Claimable Amount

tl;dr Max Claimable Amount ∝ (Application Stake / Number of Suppliers per Session)

Per Algorithm 1 of the Relay Mining paper (https://arxiv.org/pdf/2305.10672), the maximum amount a supplier can claim from an application in a single session MUST NOT exceed the Application's stake divided by the number of suppliers in the session.

This is referred to as "Relay Mining Payable Relay Accumulation" in the paper and is described by the following pseudo-code:

Algorithm 1

See the relay mining docs (https://dev.poktroll.com/protocol/primitives/relay_mining) or the annotated presentation (https://olshansky.substack.com/p/annotated-presentation-relay-mining) for more information.

TLM (pre) Processing

tl;dr Determine if the claim amount is greater than the maximum claimable amount prior to running each individual TLM.

Prior to processing each individual TLM, we need to understand if the amount claimed by the supplier adheres to the optimistic maxIA set per the limits of the Relay Mining algorithm.

Pocket Network can be seen as a probabilistic, optimistic permissionless multi-tenant rate limiter.

This works by putting funds in escrow, burning it after work is done, and putting optimistic limits in place whose work volume is proven onchain.

Suppliers always have the option to over-service an Application (i.e. do free work) in order to ensure high quality service in the network. This may lead to offchain reputation benefits (e.g. Gateways favoring them), but suppliers' onchain rewards are always limited by the cumulative amounts Applications' stakes (at session start; per service) and the number of Suppliers in the session.

Max Claimable Amount (MCA) = Application Stake / NumSuppliersPerSession

  • Claim Amount (CA)

  • Max Claimable Amount (MCA) = (AppStake / NumSuppliersPerSession)

Questions evaluated prior to TLM processing:

  • Is CA > MCA?

    • Yes → Broadcast event that Settlement Amount (SA) = MCA (Application Overserviced Event), then process TLMs with SA = MCA.

    • No → SA = CA; process TLMs with SA = CA.

Possible TLM examples:

  • TLM: Burn Equals Mint

  • TLM: Global Inflation

  • TLM: Global Inflation Reimbursement Request

  • TLM: ...

Token Logic Modules Pre-Processing

Was this helpful?