Skip to main content

Overview

PaxSpot uses four custom EVM precompiles for exchange-critical computation. They run as native HyperPaxeer consensus code and are live on mainnet.
All price values in these examples use 18-decimal fixed point integers.

0x901 OROBResolver

OROB orders store signed basis-point offsets from the oracle price instead of stale absolute prices.
Formula:

Solidity example

viem example

0x902 BatchClearing

BatchClearing computes the supply-demand crossing for a sealed-bid auction and returns a uniform clearing price.
Input expectations:
  • buyOffsets are sorted from most aggressive to least aggressive.
  • sellOffsets are sorted from cheapest to most expensive.
  • buySizes.length must equal buyOffsets.length.
  • sellSizes.length must equal sellOffsets.length.
  • Empty buy or sell sides return zero matched volume.

0x903 OracleAggregator / VOM

OracleAggregator reads validator-consensus prices from x/paxoracle and lets active validators submit price attestations.

Read the validator price

Submit a validator price

submitPrice() is for active validators. Transactions from non-validator addresses are rejected by the oracle module.

0x904 PoFQScorer

Proof-of-Fill-Quality scores execution quality relative to the oracle price. Scores range from 0 to 1e18, where 1e18 means the fill matched the oracle price.