Status: Draft v1.0
Category: Intelligence Fabric Protocol
This specification defines how inference execution is acknowledged, committed, and economically settled within the Intelligence Fabric Protocol (IFP).
It governs:
- Receipt structure
- Output commitment
- Token and compute reporting
- Operator authentication
- Escrow settlement logic
This document defines Phase 2 of the inference lifecycle.
Inference lifecycle:
- SubmitPrompt → Escrow locked
- Off-chain execution
- SubmitReceipt → Settlement
Receipt is the cryptographic and economic bridge between off-chain execution and on-chain settlement.
SubmitReceipt is a consensus-recognized transaction type defined in TET-004.
SubmitReceiptPayload = { prompt_tx_hash: Hash32, output_commitment: Hash32, input_tokens: u32, output_tokens: u32, compute_units: u64, operator_address: Address }
References the original SubmitPrompt transaction.
Validation requires:
- PromptEntry exists
- PromptEntry.status == Pending
- current_height ≤ deadline_height
Cryptographic commitment to generated output.
Defined as:
output_commitment = SHA256(output_bytes || salt)
Salt generated by operator or client agreement.
Output plaintext MUST NOT appear on-chain.
Number of input tokens processed.
Used for:
- Fee calculation
- Reporting
- Analytics
Number of tokens generated.
Must satisfy:
output_tokens ≤ max_output_tokens from SubmitPrompt
Abstract measure of compute usage.
Defined by governance as:
ComputeUnits = deterministic cost metric
Used for:
- Market pricing
- Hybrid pricing
- Reporting
Must match:
- Registered inference operator (if required)
- Valid cryptographic signature
Receipt must be signed by:
operator_private_key
Signature must verify:
Ed25519_Verify(operator_pk, hash(receipt_payload), signature)
If signature invalid:
Transaction rejected.
Upon valid receipt:
- Compute actual_fee F
- Ensure F ≤ escrow_amount
- Distribute F per revenue split
- Refund remainder to sender
- Mark PromptEntry.status = Settled
Fee calculation depends on:
pricing_mode defined in SubmitPrompt.
F = base_price + α × input_tokens + β × output_tokens
Parameters defined in model metadata.
F determined by:
- Operator bid
- Compute units reported
- Market multiplier
Must remain ≤ escrow.
F = max(owner_minimum, market_bid)
Let:
E = Escrow[prompt_tx_hash]
Upon settlement:
- Deduct F from E
- Route F to participants
- Refund (E - F) to sender
Escrow entry then removed or marked closed.
Revenue split defined in model metadata:
S = { operator_bp, owner_bp, validator_bp, vault_bp }
Where sum(bp) = 10000.
Distribution:
operator_share = F × operator_bp / 10000 owner_share = F × owner_bp / 10000 validator_share = F × validator_bp / 10000 vault_share = F × vault_bp / 10000
All integer arithmetic with fixed rounding rules.
To ensure conservation:
Compute shares sequentially:
- operator_share
- owner_share
- validator_share
- vault_share = F - sum(previous)
Guarantees:
Sum(shares) = F
SubmitReceipt must satisfy:
- Prompt exists
- Not expired
- Not already settled
- Operator authorized
- output_tokens ≤ max_output_tokens
- F ≤ escrow
Otherwise rejected.
If receipt submitted after:
current_height > deadline_height
Transaction rejected.
Escrow refunded per IFP-102 rules.
After receipt submission:
PromptEntry enters:
status = SettledPendingChallenge
For:
challenge_window_blocks
During this window:
- Fraud proofs may be submitted
- Settlement may be reverted if fraud proven
After window:
status = Finalized
Future versions may allow:
- ZK proof of execution
- Deterministic inference proofs
- Commitment consistency proofs
Current version relies on economic incentives.
On valid receipt:
State transitions:
Escrow removed
Balances updated
PromptEntry.status updated
Receipt record stored in prunable ledger
All mutations must be atomic.
Settlement must:
- Use integer arithmetic only
- Use canonical rounding
- Produce identical state root on all nodes
- Not depend on external computation
Receipt validation does NOT verify output correctness.
After settlement:
- Escrow fully accounted
- PromptEntry not reusable
- Revenue conserved
- No negative balances
Receipt protocol guarantees:
- Operator accountability
- Fee enforcement
- Escrow safety
- Deterministic revenue routing
It does NOT guarantee:
- Output correctness
- Model fairness
- Output safety
Let:
SR = SubmitReceipt(S, Tx)
If valid:
S' = distribute(F) refund(E - F) update(PromptEntry.status)
Else:
S' = S
IFP-103 defines:
- Output commitment structure
- Token usage reporting
- Operator authentication
- Deterministic settlement
- Revenue distribution
It completes the economic inference cycle:
Commit → Execute → Receipt → Settle
This transforms inference into a protocol-native economic state transition.
End of IFP-103.