feat: resolution tier rewards#418
Open
dylanuys wants to merge 5 commits into
Open
Conversation
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
force-pushed
the
feat/resolution-tier-rewards
branch
from
July 20, 2026 21:47
82334d3 to
955de4a
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inMODEL_TIER_PRICES(the live SKU merge re-adds them anyway) but are unreachable until 4K rejoins the tier list.Image — tiers
1K / 2K / 4Kby 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:
parameters["resolution"]; rewards price atmin(observed, requested):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 OpenRouterpricing_skuskey suffixes at module load (hardcoded fallbacks included), so capability and price drift self-correct.model_namevia 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 addingrequested_resolutiontogenerator_challenge_outcomesandhas_audiotomedia; miner video writes detect the audio track (ffprobe); reward stats join media onto outcomes and emit structuredimage_generations/video_generationslists.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
Deploy notes
duration_secondsSKU is 1080p output (price tables self-correct via the live fetch; that naming assumption doesn't).IMAGE_TIER_PRICESratios (1/2/4) and the challenge tier mixes are the tuning knobs; both are deliberately conservative first guesses.