The oracle
SkinPriceOracle holds one price per registered item. Reporters sign their observations off-chain, anyone may relay them, and the contract takes the median of a quorum. Four details below are the difference between that sentence being true and merely sounding true.
The report
A report is an EIP-712 typed message, so a wallet displays its fields rather than a hash, and a signature for one chain or one oracle cannot be replayed on another.
SkinPriceReport(
bytes32 skinId,
uint128 price,
uint64 observedAt
)skinId is keccak256(market_hash_name) — the canonical Steam name, so two reporters cannot disagree about which item they are pricing. price carries eight decimals. observedAt is when the reporter saw the data, not when they submitted it, which is what makes staleness measurable.
Aggregation
| Rule | Why |
|---|---|
| Quorum of reporters | One signer can be wrong, bribed, or simply down |
| Median, not mean | A single absurd report must not move the result |
| Strictly ascending signers | Deduplicates the set in one pass |
| Freshest observedAt wins ties | Deterministic, and prefers newer information |
Sorting the signers is a security measure
It reads like a gas optimisation and it is one, but that is not why it is there. The contract requires each recovered signer address to be strictly greater than the last. Without that check, a single reporter reaches quorum by submitting their own signature several times, and the median of n copies of one number is that number. One reporter would control every price.
The breaker
When an update moves further than the configured threshold, the contract does something that looks wrong at first glance: it writes the real price anyway, and raises a flag beside it. priceAndHealth() returns both, and the vault refuses to spend while the flag is up.
Why not reject the update
Refusing an abnormal report freezes the feed at the old value during precisely the event that made it abnormal — a genuine dislocation — and the vault would then defend a price that no longer exists. Clamping is worse still: it publishes a number the contract knows to be false.
Recording the truth and refusing to act on it is the only option that keeps the feed honest and the money still.
Staleness
Every read carries the age of the observation. Past the limit, defend() reverts rather than trading on a price no one has confirmed recently. A vault doing nothing is a vault that has lost no money.
What this does not protect against
- A wrong source. If the marketplace feed is wrong and every reporter reads it, the median is wrong and the quorum is unanimous. See the reference price.
- A colluding quorum. The threshold is a quorum, not a proof. Enough cooperating reporters can set any price the breaker does not catch.
- Slow drift. A breaker catches jumps. A price walked somewhere over weeks passes every check.
Snapshot data last refreshed Sep 23, 2026 UTC.