Fund open-source AI via PVC-proven model blends and proportional on-chain payouts.
Open‑source AI is hard to fund. Training and testing models cost real money and time, and when many people contribute—by sharing code, running experiments, or helping evaluate results—it’s tough to credit each person fairly. Today, sponsors often rely on trust or manual judging, which doesn’t scale and can feel opaque to participants.
This project turns model improvement into a public prize contest that is easy to verify. Builders train their models off‑chain and submit a tiny “cryptographic receipt” that says, “I made this model and here’s how well it scored,” without exposing the model itself. Think of it like sealing your work in a tamper‑proof envelope and attaching a scoreboard entry: everyone can see you participated and how you performed, but your secret sauce stays private unless you choose to reveal it.
After the deadline, the system blends the best submissions into one stronger model using a simple, transparent rule: better scores earn bigger influence in the blend. Crucially, there’s a single public check that proves the final blended model really was made from the submitted models in exactly those stated proportions. Anyone can run this check, so you don’t have to trust a central coordinator—the math makes the process self‑verifying.
Payouts then follow the same proportions as the blend. If your model contributed 20% of the blended result, you receive roughly 20% of the prize pool. Because the blending rule and the verification are public, participants and sponsors can audit the outcome end‑to‑end without needing to disclose the actual models the contestants generated. This makes rewards feel fair, predictable, and tied directly to measurable contribution.
Beyond prizes for model building, the same approach can reward other valuable work in open‑source AI—like evaluating models on shared datasets or running inference to support the community. By giving everyone a way to prove their contribution and get paid proportionally, this project offers a simple path toward sustainable, transparent funding for open‑source AI.
We built a minimal end-to-end system that ties open-source AI model contributions to fair payouts using homomorphic commitments. On-chain, the core is a Solidity contract (PVCContest3.sol) that stores each submission’s Pedersen Vector Commitment on BN254, the reported error score, and metadata. The contract exposes a single verification entry point where an off-chain aggregator submits the weighted sums of model weights and randomness (Wsum, Rsum), and the contract checks the homomorphic equality Commit(Wsum, Rsum) == Σ αᵢ·Cᵢ. If the equality holds, it distributes a stablecoin prize pool proportionally to the same αᵢ used in the blend. We wrote and tested the contracts with Hardhat/Foundry, using OpenZeppelin for ERC‑20 transfers and BN254 precompiles for scalar multiplication and point addition over alt_bn128.
On-chain verification is deliberately simple: we fix generator points (H, G0..Gk) in PVC3Params.sol and implement a compact multi-scalar multiplication to compute both sides of the equality. For the hackathon we used a 3‑dimensional vector, which keeps gas well within block limits; extending to higher dimensions is straightforward but benefits from chunking (e.g., Merkle-ized segments or a KZG-style commitment) to keep verification O(1). We store generator points as constants and rely on the 0x06/0x07 precompiles for point add/mul to avoid hand-rolled elliptic curve code. Equality reduces to comparing affine coordinates, so no pairing is required. In tests with 10 participants, verifying and paying out took under a few million gas.
Off-chain, a tiny tool computes commitments and the aggregator inputs. We prototyped this in both Python and TypeScript: Python for fast iteration and property tests (NumPy/pytest for vector ops, eth_abi for packing), and TypeScript for browser integration. The aggregator fetches all submissions, derives the deterministic weights αᵢ from error scores (we used inverse-error with an epsilon for stability), and computes Wsum, Rsum, and optionally Csum = Σ αᵢ·Cᵢ to precheck locally before submitting on-chain. Everything is serialized into a proof artifact JSON so anybody can reproduce the math and cross-check against chain logs.
The frontend is two static pages. splash.html explains the “why”: funding gaps, high costs, and missing attribution, plus how PVCs fix verification and payouts. index.html is the interactive demo that walks through the exact 5‑step flow (create contest, add submissions, view, aggregate + prove, payout). For local UX we show a toy linear commitment using JavaScript BigInt so people can click through without a wallet. The UI also renders a modal that explains the homomorphic check and lets users download the JSON artifact. In a real deployment, the UI swaps the toy commitment for RPC calls via ethers.js to the Solidity contract.
We used IPFS to host dataset CIDs and model artifact URIs, which keeps large data off-chain while anchoring references immutably. On EVM, we targeted Sepolia for deployment using Alchemy/Infura as providers, and a mocked ERC‑20 (OpenZeppelin) stood in for a stablecoin. These partner technologies let us keep the on-chain footprint minimal: only commitments, small integers (errors and weights), and a single verification call live on-chain. Everything else—training, evaluation, and vector math—stays off-chain and reproducible.
A few hacky details worth noting. To avoid floating-point pitfalls, we made αᵢ integers with a large base (for example, WEIGHT_BASE = 1e12) and computed shares using integer division; this keeps the math exact and deterministic across languages and the EVM. We also added field-safe handling for negative model weights by mapping them into the BN254 scalar field, so contributors can use signed parameters without surprising wraparound. For scalability, we prototyped an alternative path where the aggregator submits Csum and the contract re-derives it from on-chain Cᵢ and αᵢ only when needed; for small contests this is fine, but for larger sets we’d gate it behind a batching strategy.
If we had more time, the next steps would be replacing revealed vectors in the MVP with a commit–reveal workflow (or never revealing at all, proving only the blended commitment), adding zk proofs of accuracy so error rates can be verified against a committed dataset without leaking data, and upgrading the vector commitment to a chunked/Merkle or KZG scheme to support thousands of dimensions at constant verification cost. Even in its hackathon form, the system shows the core loop: verifiable blending tied directly to proportional payouts, with the cryptography doing the trust work instead of a human judge.