Blueprint Pricing
This guide explains the RFQ (“request for quote”) pricing flow used to create services from signed operator quotes on Tangle.
Prerequisites
- Understanding of Blueprint concepts and execution model
- Familiarity with the service lifecycle (request/approve vs RFQ/quotes)
- Basic knowledge of signatures and replay protection
Pricing Workflow
The end-to-end flow looks like:
- Find operators: discover operators registered for a blueprint.
- Request quotes: call each operator’s pricing endpoint (usually gRPC) and request a quote for the desired TTL and requirements.
- Verify quotes: verify operator signatures and enforce expiry.
- Create service from quotes: submit quotes on-chain via
createServiceFromQuotes(...)and pay the sum oftotalCost. - Run jobs: submit jobs to the service; operators submit results; fees are distributed by the protocol.
Where Quotes Come From
Operators typically run the SDK’s pricing server (pricing-engine-server) which:
- Computes costs from the local policy file and benchmark cache.
- Returns
SignedQuotepayloads that can be submitted directly to theTanglecontract. - Signs quotes as EIP-712 typed data under the
TangleQuotedomain (version1) for the target chain +Tanglecontract address.
Operators must configure the server with the correct deployment addresses (notably OPERATOR_TANGLE_CONTRACT) so signatures verify on-chain.
Implementation Steps
1. Discover operators and endpoints
Operators publish an endpoint string as part of their on-chain preferences. Use that endpoint to request quotes out-of-band.
2. Request quotes
Quote requests typically include:
blueprintIdttl- Optional security requirements and other blueprint-specific config
- Optional proof-of-work (if the operator enables it)
3. Submit createServiceFromQuotes
Submit the quotes on-chain and pay the total cost. The contract verifies:
- The quote signature(s)
- TTL and expiry constraints
- Per-operator replay protection (quotes cannot be reused)
- The signed security commitments (quotes must not be modified after receipt)
Understanding Pricing Calculations
Operators can use any internal pricing model. A common shape is:
Price = Resource Cost × Duration Factor × Security FactorThe service’s totalCost is typically the sum of the operator quotes.
Where:
- Resource Cost = resource_count × price_per_unit_rate
- Duration Factor = time_blocks × BLOCK_TIME
- Security Factor = Factor based on security requirements
Understanding this helps you estimate costs and evaluate quotes effectively.
Best Practices
- Get Multiple Quotes: Always request quotes from all registered operators to compare prices
- Verify All Signatures: Always verify the signature of each quote before using it
- Check Expiry Times: Ensure quotes haven’t expired before submitting them to the blockchain
- Use conservative security requirements: Prefer explicit requirements and bounded TTLs
- Handle Errors Gracefully: Implement proper error handling for failed quote requests
- Keep Quotes Intact: Never modify quote details after receiving them
- Use fresh proof-of-work (if enabled): Generate a new proof-of-work for each request
- Expect Price Variation: Don’t assume all operators will provide the same price