02 / Workshop

Workshop
Datasets straight from the chain

Build training data from the same Uniswap oracles the contract will read. Pick a target market, a horizon and up to eight features, then clean, clip, split and fingerprint the set.

The numbers the contract will see

Features use the contract's own arithmetic on minute-aligned windows, so a model never trains on values it will not get on chain.

Minute bars from the oracle

Each pool keeps a ring of tick observations. Recent hours come from that ring exactly. Older days are rebuilt from swap logs and flagged as such.


Ring bufferSwap logsExact flag
Oracle depth per marketMeasured
Oracle ring, hours backLongest lookback a feature needs (2 h)

Two features, four windows

MOM compares the last window with the one before it. DEV compares the last minute with the window average. Windows of 5, 15, 30 or 60 minutes on any of eight markets.


MOMDEV8 markets
Feature windowsDefinition
MOM 30m twap(30m, 0)minus twap(60m, 30m) DEV 30m twap(1m, 0) minus twap(30m, 0) 60m ago30mnow MOM 30m twap(30m, 0)minus twap(60m, 30m) DEV 30m twap(1m, 0) minus twap(30m, 0) 60m ago30mnow

TWAPs floor like Uniswap's OracleLibrary, and a market priced as token1 flips its sign after the floor.

Clip on train, split by time

Clip levels come from the training split only. Splits run in time order, and a sample whose label window crosses into the next split is purged.


70 / 15 / 15PurgeTrain-only clip
Split and clipIllustrative
One feature, train split, values past the clip level in grey
-1270+127

Values beyond the clip level map to plus or minus 127, exactly as the contract clamps them.

A fingerprint anyone can check

The canonical CSV is hashed with keccak-256. The hash rides along in the spawn transaction, so anyone can match a polyp to the data it learned from.


keccak-256CSVdatasetHash
dataset.csvReal hash
t,f0_ETH_MOM_300,f1_ETH_DEV_900,f2_NVDA_MOM_1800,f3_QQQ_DEV_300,move_ETH_1800,y,split
1759471200,18,-34,41,6,14,10000,train
1759471260,17,-30,40,5,9,10000,train
1759471320,11,-22,38,4,-3,0,train
1759471380,6,-9,37,2,-11,0,train
1759471440,-2,4,35,-1,-6,0,train
keccak-256 of the 6 lines above
cd233adc3bc6f0cf…8f3f

The page re-hashes the text when it loads.

How it works

From pools to a CSV

  1. 01

    Pick

    A target market, a horizon of 15, 30 or 60 minutes and up to eight MOM or DEV features.

  2. 02

    Pull

    Minute series for each market, one UTC day at a time. Closed days are cached for good.

  3. 03

    Clean

    Drop samples with gaps. Optionally keep exact minutes only, drop flat moves or quiet periods.

  4. 04

    Export

    Download the canonical CSV and its keccak-256 fingerprint, ready for training.

What comes with it

Data

Eight markets

ETH, NVDA, GOOGL, SPCX, NET, AAPL, QQQ and TSLA, each a Uniswap V3 pool against USDG.

Exact flags

Every minute says whether it came from the oracle ring or was rebuilt from swap logs.

Feature stats

Quantiles, a robust scale and how many values would clamp at the chosen divisor.

Hygiene

Purged splits

Chronological train, valid and test sets with no label leaking across a boundary.

Train-only clipping

Divisors come from the training split, so the test set stays honest.

Fingerprint

A keccak-256 hash of the exact CSV, stored on chain when you spawn.

Build a dataset in minutes

Everything runs in your browser. No account, no upload.