Completion-Based Capacity Verification
The incentive-compatibility proof in Proposition (Truthful BNE) assumes a detection mechanism capable of identifying over-reporting sinks within a bounded time window . This section formalises the CompletionTracker protocol that realises such detection on-chain without external oracles.
Dual-Signed Completion Receipts
Every task completed in BPE produces an EIP-712 typed-data receipt signed by both the executing sink and the requesting source:
Definition (CompletionReceipt)
A completion receipt is a tuple
where identifies the task type, and are Ethereum addresses, is a unique 32-byte identifier, and is the block timestamp at submission. The receipt is valid iff both and .
Dual signing prevents unilateral fabrication: a malicious sink cannot inflate its completions without cooperation from a source that actually consumed the service, and a malicious source cannot credit a sink that did not perform.
Rolling-Window Epoch Accounting
Time is partitioned into epochs of duration s. For each (task-type, sink) pair, the contract maintains:
where is the number of valid receipts submitted during epoch and is the EWMA-smoothed declared capacity. We cap at (100% utilisation).
When an epoch elapses, any participant may call advanceEpoch to finalise the rate and reset the counter. The on-chain cost is ~48,000 gas per epoch advance (see Evaluation, Experiment E6).
Statistical Divergence Detection
Definition (Under-performance)
Sink under-performs in epoch if , where (the slash threshold in basis points,
SLASH_THRESHOLD_BPS = 5000).
The protocol tracks a consecutive counter that increments when and resets to zero otherwise.
Proposition (Detection Latency)
An over-reporting sink that sustains capacity inflation is detected and slashed within
provided the excess demand induces a utilisation deficit for consecutive epochs.
Proof.
When , the additional flow routed to sink is . Tasks arriving at rate exceeding true capacity cannot be completed, so . Hence . For large enough such that , the under-performance counter increments each epoch. After such epochs, the auto-slash fires, proving the claim. ◻
Auto-Slash Mechanism
When , the advanceEpoch function atomically invokes StakeManager.slash:
with (10% of stake) and a reason hash keccak256("COMPLETION_UNDERPERFORMANCE"). After slashing:
-
The consecutive counter resets (), giving the sink a recovery window.
-
The reduced stake lowers the concave capacity cap , forcing the sink to either re-stake or operate at genuinely lower capacity. Both outcomes align incentives.
-
The epoch counter and completion tally reset for the next measurement window.
Composability with BNE condition.
The slash amount feeds directly into the BNE condition: substituting , s, the BNE holds for all deviations , consistent with the parameterisation of Security Analysis.
Future Verification Hardening
The statistical detection mechanism operates purely on completion counts, requiring no access to the task payload or execution environment. Two complementary approaches can further reduce the trust assumption on source-sink collusion:
Trusted Execution Environments (TEEs).
Sinks running inside a TEE (e.g., Intel SGX, ARM TrustZone) can produce hardware-attested proofs of execution. An on-chain verifier interface ICapacityVerifier.verify(attestation) can augment the CompletionReceipt with a TEE quote, reducing the receipt to a single-party proof of work that does not require source co-signing.
ZK-ML proofs.
For deterministic ML inference tasks, recent advances in zero-knowledge machine learning (zkML) allow sinks to generate succinct proofs that a specific model produced a specific output. Integrating ZK-ML verification would upgrade the completion tracking from statistical (probabilistic detection over epochs) to cryptographic (per-task deterministic verification), at the cost of higher sink-side computation.
Both extensions are backward-compatible: the CompletionTracker contract can be wrapped by a verifier contract that gates recordCompletion on additional cryptographic evidence, without modifying the epoch accounting or auto-slash logic.