Skip to content

feat: resolution tier rewards#418

Open
dylanuys wants to merge 5 commits into
mainfrom
feat/resolution-tier-rewards
Open

feat: resolution tier rewards#418
dylanuys wants to merge 5 commits into
mainfrom
feat/resolution-tier-rewards

Conversation

@dylanuys

@dylanuys dylanuys commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Problem

Veo C2PA manifests don't expose the model variant, so every Veo submission (lite, fast, full) was priced at the cheapest variant's rate ($0.03/s). Miners had no incentive to run anything above veo-lite, despite a 20x cost spread across the family. Separately, resolution wasn't priced at all — for any model, minimum-resolution output earned the same reward as top-tier output.

Approach

Resolution and audio presence are covered by the C2PA hard binding we already require (assertion.bmffHash.match), so they are cryptographically attested signals: a miner can't upscale, re-encode, or mux in audio without invalidating the manifest. We use them to price rewards by delivered resolution tier.

Video — tiers 480p / 720p / 1080p (challenge mix 20/40/40, CHALLENGE_TIER_WEIGHTS). 4K is deliberately not a tier for now: it is never requested, and 4K output classifies and prices as 1080p. The Veo 4K price entries remain in MODEL_TIER_PRICES (the live SKU merge re-adds them anyway) but are unreachable until 4K rejoins the tier list.

Image — tiers 1K / 2K / 4K by minimum pixel dimension (nominal 1024/2048/4096, challenge mix 40/40/20). Image C2PA manifests rarely expose a usable model variant and image APIs price per image (typically tiered by output size), so images are priced purely by delivered tier with relative prices 1x/2x/4x → after the sqrt taper, multipliers of 1x/1.41x/2x.

Shared mechanics for both modalities:

  • Challenges request a tier via generation parameters["resolution"]; rewards price at min(observed, requested):
    • Overshooting a request never pays more, so ignoring requests is never profitable.
    • A miner whose model can't reach the requested tier delivers a lower one and gets that tier's price — graceful degradation, no failure state, no capability negotiation.
  • Veo (C2PA-blind, model_name=None) is priced as the fast variant at its (tier, audio) combination. Flooring at lite was maximally arbitrage-safe but credited every real fast/full generation at lite rates, capping the family at 1.63x; the fast floor bounds a lite miner's overcredit at ~2x on price while Google-certified content earns a fair mid-family rate (720p 1.63-1.83x, 1080p 1.83-2.0x). Veo can't produce sub-720p, so a 480p-tier challenge prices at Seedance fast's 480p rate ($0.07/s -> 1.53x) — the bottom tier pays the same regardless of family. Tier/audio price tables are parsed from OpenRouter pricing_skus key suffixes at module load (hardcoded fallbacks included), so capability and price drift self-correct.
  • Named models (Seedance exposes model_name via C2PA) use explicit per-tier price tables (NAMED_MODEL_TIER_PRICES) from provider quotes, since OpenRouter publishes no Seedance pricing SKUs: seedance-2-0 $0.50/$2.00/$2.40 per 5s at 480p/720p/1080p, fast $0.35/$0.76 at 480p/720p. The spread is not pixel-proportional, so tables beat a shared scale. Resulting multipliers: fast 1.53x/2.25x; full 1.83x/3.65x/4.0x. A tier absent from a model's table pays its top priced tier (no extrapolated premium); named models without a table fall back to pixel-ratio scaling of their flat 720p reference, floored at baseline.

Changes

  • gas/evaluation/resolution_tiers.py (new): per-modality tier definitions, orientation-agnostic min-dimension classification, weighted sampling, effective_tier.
  • gas/evaluation/generative_challenge_manager.py: samples and sends the requested tier for both modalities, records it on the challenge outcome.
  • gas/evaluation/rewards.py: MODEL_TIER_PRICES (Veo floor pricing), IMAGE_TIER_PRICES, per-generation multipliers for both modalities; falls back to model-name pricing for stats that predate tiered challenges.
  • gas/cache/: schema migration adding requested_resolution to generator_challenge_outcomes and has_audio to media; miner video writes detect the audio track (ffprobe); reward stats join media onto outcomes and emit structured image_generations / video_generations lists.

No miner changes required — the reference miner already forwards parameters["resolution"] and snaps to the nearest supported value. Requested vs. observed tier is stored per outcome, so compliance is queryable before deciding whether penalties are ever warranted.

Testing

  • Full test suite passes (37 tests).
  • End-to-end check: challenge outcome → media join → stats → tier-priced reward multiplier for both modalities, including overshoot capping, undershoot degradation, unknown-resolution baseline, 4K-video-classifies-as-1080p, and image tier classification (portrait/landscape, sub-1K floor).

Deploy notes

  • Schema migration auto-applies on validator start.
  • Worth confirming with one live generation per variant that OpenRouter's un-suffixed duration_seconds SKU is 1080p output (price tables self-correct via the live fetch; that naming assumption doesn't).
  • IMAGE_TIER_PRICES ratios (1/2/4) and the challenge tier mixes are the tuning knobs; both are deliberately conservative first guesses.

dylanuys and others added 3 commits July 20, 2026 18:34
Video challenges now request a resolution tier (720p/1080p/4K, weighted
random) via the generation parameters. Verified videos are priced at
min(observed, requested) tier, so overshooting a request never pays more
and miners whose model can't reach the tier degrade to a lower price
instead of failing.

Veo C2PA manifests don't expose the model variant, so Veo videos are
priced at the cheapest variant able to produce their (tier, audio)
combination: 4K rules out veo-lite and floors at veo-fast's 4K rate.
Tier/audio price tables are parsed from OpenRouter pricing_skus at
module load, with hardcoded fallbacks.

- store requested_resolution on challenge outcomes, audio-track
  presence on media rows (schema migration)
- join media onto outcomes so reward stats carry per-generation
  model/resolution/audio
- fall back to model-name pricing for stats predating tiered challenges
… pricing

Video: 4K is no longer a tier — never requested, and 4K output classifies
and prices as 1080p. 480p becomes requestable (mix 20/40/40). Veo 4K price
entries stay (live SKU merge re-adds them) but are unreachable until 4K
returns to the tier list.

Images join the tier system: challenges request 1K/2K/4K (min-dimension
nominal 1024/2048/4096, mix 40/40/20), outcomes record requested vs observed
tier, and image rewards are priced by delivered tier at min(observed,
requested) with relative prices 1x/2x/4x (sqrt taper -> 1x/1.41x/2x).

Named models (Seedance exposes model_name via C2PA) are priced from explicit
per-tier tables (NAMED_MODEL_TIER_PRICES) built from provider quotes —
OpenRouter publishes no Seedance SKUs, and the real spread is not
pixel-proportional (seedance-2-0 $0.50/$2.00/$2.40 per 5s at
480p/720p/1080p; fast $0.35/$0.76 at 480p/720p). A tier absent from a
model's table pays its top priced tier; named models without a table fall
back to pixel-ratio scaling of their flat 720p reference. All named-model
prices floor at the baseline.
@kenobijon
kenobijon force-pushed the feat/resolution-tier-rewards branch from 82334d3 to 955de4a Compare July 20, 2026 21:47
Veo manifests hide the variant, but a Google cert is cryptographic proof of
real paid generation — flooring at lite credited every fast/full video at
lite rates and capped the whole family at 1.63x. Veo is now priced as the
middle variant (_VEO_FLOOR_MODEL = veo-3.1-fast), bounding a lite miner's
overcredit at ~2x on price; since challenge volume is demand-limited this
doesn't reorder anyone's model choice.

Veo also cannot produce sub-720p output (720p is the family minimum), so a
480p-tier challenge previously priced a real 720p Veo generation at the
baseline. Tiers below the family minimum now price at the floor variant's
cheapest producible combo with the same audio state.
A 480p-tier Veo submission is a real 720p generation (720p is the family
minimum), but paying it 720p rates made the bottom tier family-dependent.
Price it at Seedance fast's 480p rate so 480p challenges pay 1.53x
regardless of which family serves them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants