Recipe spec

Overview

A recipe is a YAML file that declares a complete Backproto pipeline: the providers, their pricing curves, routing policy, settlement contracts, and observability configuration. The format is machine-readable (for the bake CLI and simulation engine) and human-readable (for the web gallery and documentation).

Top-level fields

FieldTypeRequiredDescription
namestringyesHuman-readable recipe name
descriptionstringyesOne-line description
domainenumyesai | nostr | general | infrastructure | defi
difficultyenumyesbeginner | intermediate | advanced
contracts_usedstring[]yesBackproto contracts this recipe uses
stepsStep[]yesOrdered pipeline stages
fundingobjectnoEscrowBuffer address + Superfluid config
routingobjectnoPolicy, fairness, provider constraints
settlementobjectnoPool address, tracker, penalty config
observabilityobjectnoExport targets (otel, json, webhook)

Provider object

Each step contains one or more providers. A provider declares an endpoint, a capacity attestor address, stake requirements, and pricing curve parameters.

providers:
  - name: vLLM-A
    endpoint: "https://provider-a.example/run"
    capacityAttestor: "0x6f58..."
    stake:
      manager: "0xdc26..."
      min: "500 USDC"
    pricingCurve:
      base: 0.0008   # base price at 0% utilization
      k: 0.15        # sensitivity coefficient
      alpha: 2.0     # convexity exponent

Pricing curve formula

price = base × (1 + k × utilization^alpha)

At 0% utilization the price equals base. As utilization rises, price increases according to a power curve controlled by k (sensitivity) and alpha (convexity). Higher alpha means prices stay flat longer then spike harder near capacity.