OperatorsPricingOverview

Blueprint Pricing

Operators can optionally run a pricing service that issues signed quotes for blueprint services. Customers use these quotes to create services via the on-chain RFQ flow.

Prerequisites

  • Familiarity with operating a blueprint runner
  • Knowledge of basic blueprint concepts

How Blueprint Pricing Works

The pricing process follows these steps:

  1. Registration: When you register as an operator for a blueprint, you publish a reachable rpcAddress in your operator preferences.
  2. Quote requests: Customers request quotes from operators (typically via gRPC).
  3. Quote generation: Your pricing server benchmarks your node (optional), applies your local pricing policy, and returns a signed quote.
  4. Service creation: Customers submit quote bundles on-chain via createServiceFromQuotes(...) and pay the total cost.
  5. Service execution: You run the blueprint service and earn fees according to the service’s pricing model.

Setting Up Your Pricing Service

The Blueprint SDK includes an RFQ pricing server (pricing-engine-server) that:

  • Watches Tangle contract events for activation/termination
  • Benchmarks node resources and caches results
  • Serves GetPrice via gRPC and returns quotes compatible with the on-chain RFQ flow

Pricing Configuration (TOML)

Create a TOML file with resource rates (defaults + per-blueprint overrides):

# Default pricing for all blueprints
[default]
resources = [
  { kind = "CPU", count = 1, price_per_unit_rate = 0.001 },
  { kind = "MemoryMB", count = 1024, price_per_unit_rate = 0.00005 },
  { kind = "StorageMB", count = 1024, price_per_unit_rate = 0.00002 },
  { kind = "NetworkEgressMB", count = 1024, price_per_unit_rate = 0.00003 },
  { kind = "NetworkIngressMB", count = 1024, price_per_unit_rate = 0.00001 },
  { kind = "GPU", count = 1, price_per_unit_rate = 0.005 }
]
 
# Blueprint-specific pricing (overrides default)
[123]  # Blueprint ID
resources = [
  { kind = "CPU", count = 1, price_per_unit_rate = 0.0012 },
  { kind = "MemoryMB", count = 2048, price_per_unit_rate = 0.00006 },
  { kind = "StorageMB", count = 1024, price_per_unit_rate = 0.00002 },
  { kind = "NetworkEgressMB", count = 1024, price_per_unit_rate = 0.00003 },
  { kind = "NetworkIngressMB", count = 1024, price_per_unit_rate = 0.00001 },
  { kind = "GPU", count = 1, price_per_unit_rate = 0.005 }
]

Each resource type defines:

  • kind: The resource type (CPU, MemoryMB, StorageMB, etc.)
  • count: The baseline quantity for the resource
  • price_per_unit_rate: The price per unit rate used by your local policy

Run the Pricing Server

Run the daemon with deployment-dependent contract addresses and RPC endpoints:

OPERATOR_HTTP_RPC=https://... \
OPERATOR_WS_RPC=wss://... \
OPERATOR_TANGLE_CONTRACT=0x... \
OPERATOR_RESTAKING_CONTRACT=0x... \
OPERATOR_STATUS_REGISTRY_CONTRACT=0x... \
cargo run -p blueprint-pricing-engine --bin pricing-engine-server

Quote Format and Security

Quotes are:

  • Time-bounded (TTL + expiry)
  • Signed by the operator’s EVM key (replay-protected on-chain)
  • Optionally protected by proof-of-work in the request to reduce abuse of the pricing endpoint

How Prices Are Calculated

Operators can use any internal pricing model. A common shape is:

Price = Resource Cost × Duration Factor × Security Factor

Where:

  • Resource Cost = resource_count × price_per_unit_rate
  • Duration Factor = time_blocks × BLOCK_TIME
  • Security Factor = Factor based on security commitment parameters

Security Commitments

When users request your services, they include security requirements that specify what percentage of assets you need to secure. Your pricing service needs to respond with your commitment:

  • Exposure Percentage: The percentage of assets you guarantee to secure (between the user’s minimum and maximum requirements)
  • Asset Types: Can be Custom (u64) or ERC20 (H160 address)

This commitment will be included with your signed quote. The commitment used for the quote is automatically the minimum exposure percentage specified in the user’s security requirements.

Quote Security Considerations

Quote Signature

  • To ensure the validity of your quotes, your quotes are automatically signed. Users then verify the signature included in an Operator’s quote when they receive it. This ensures a user is getting genuine quotes from you and other operators.

Protection Against Abuse

  • Proof-of-Work Verification: Users provide proof-of-work with their requests, defending against Denial-of-Service (DoS) attacks
  • Quote Expiry: Quotes include an expiry time (typically 10-15 minutes) to prevent stale quotes