Relay across the products

Relays and PREtp both run on Quantum Relay. Each one asks it a different question. The question determines how the product behaves, and especially how it behaves when the answer is unavailable.

What Relay does

Relay verifies a claim about the outside world so that a contract can act on it. It checks more than a price: identity, available liquidity, an executable route and how recently the data was seen. It records which sources agreed, so the check can be re-run later.

A price feed reports a number. Relay reports that a set of conditions all hold at the same time.

The two questions

ProductQuestionCheckedReversible
Relays What is this stock doing right now? Every block Yes
PREtp Is this company's stock onchain yet, and can it be bought? Until true once No

What happens when the answer is missing

A reversible answer and a one-way answer need opposite handling. Most of the design follows from this.

Reversible: keep going

A relay is read on every swap, so it cannot be allowed to revert. If it did, one failed data source would halt trading in the pool. Instead the pool charges its high-water rate until fresh data arrives, then returns to normal.

Nothing has been spent at that point, so a period of charging too much is recoverable. The high-water rate is used rather than the base rate because a cheaper fallback would give traders a reason to wait for one.

One-way: refuse

Graduation spends the market's reserve and opens a pool that cannot be closed again. The same oracle layer therefore refuses to act unless every condition is met. A news headline, a single source, an expired proof or a route too thin to price all mean no.

Waiting another day costs one more day on the curve. Graduating on a bad proof costs the reserve.

This is why Relay keeps working through bad data in one product and refuses to act in another. The difference is whether the action can be undone.

Where this comes from

QuantumPrime builds entanglement hardware so that a communication channel can be verified rather than trusted. Relay applies the same approach to data: verify the claim, then let code act on it. Reactive pools and pre-tokenization are two uses of that.

Relay reads market and infrastructure data today, and will read QuantumPrime hardware once it is flying. See What QuantumPrime is.