Author
Vedanta Hazra
(GitHub: https://github.com/vedantahazra)
Experiences and qualifications
I am a recent Mathematics and Computing graduate from IIT Kharagpur, a former software engineering intern at Oracle, and served as the R&D Head of the university’s Computer Graphics Society. My engineering focus is translating complex constraint architectures into low-latency verification systems. This background helped me secure first place at both the IEEE Metaverse Grand Challenge (2025) and the WAVES 2025 XR Hackathon. I am now applying these formal verification principles to decentralized execution networks.
Grant Description
Independent solvers on CoW Protocol operate on competitive margins, relying heavily on simulation pipelines to ensure their generated batch settlements will clear on-chain. However, during optimization, solvers may evaluate large numbers of candidate settlement configurations before selecting a final solution. Full EVM simulation is significantly more computationally expensive than evaluating simple mathematical constraints and is therefore typically reserved for a subset of candidate solutions.
Polytope is designed to complement existing simulation pipelines by acting as an ultra-fast, pre-simulator mathematical filter. Instead of waiting for a heavy EVM state-simulation to spin up and revert due to an invalid parameter, Polytope utilizes deterministic mathematical verification to discard impossible batches in milliseconds.
Furthermore, because solvers utilize complex linear programming and heuristics, internal logic bugs or edge-case rounding errors can occasionally violate uniform clearing prices or create token imbalances across deeply nested trades. Polytope serves as an independent double-check auditor on the solver’s internal optimization engine math, catching these structural logic bugs before they consume simulation resources. SMT verification provides bounded formal verification of encoded settlement invariants by determining whether the specified constraint system is satisfiable.
Polytope acts as an Abstract Syntax Tree transpiler, converting GPv2Settlement payloads into a Z3 SMT-LIB matrix. By strictly using fixed-point integer math, Polytope proves whether the modeled settlement invariants are satisfiable (SAT) or unsatisfiable (UNSAT), providing an early indication of potentially invalid settlement configurations.
A lightweight proof of concept has already been implemented. During development, the prototype successfully detected intentionally malformed settlement configurations involving clearing-price inconsistencies, execution-constraint violations, and slippage faults in under 40ms on local benchmarks. This establishes technical feasibility. The purpose of this grant is to extend the prototype into a reusable solver-facing infrastructure component integrated with real GPv2 settlement flows, utilizing deterministic bounded verification under configurable timeout thresholds to target 5 to 15ms latencies.
Why CoW Protocol?
CoW Protocol’s decentralized solver competition creates strong incentives for efficient and reliable settlement generation. Even a small reduction in failed settlement submissions and simulation overhead can improve solver profitability and reduce wasted computational resources. Polytope is specifically designed around GPv2 settlement semantics and aims to provide reusable infrastructure that any solver operator can integrate into their workflow.
Type of Grant
Milestone-based
Milestones
| Milestones | Title | Due Date | Funding Request |
|---|---|---|---|
| Milestone 1 | Initial Transpiler Architecture and Parser | 2 weeks after acceptance | 2,000 xDAI |
| Milestone 2 | Complete Transpiler Engine Integration | 4 weeks after acceptance | 3,000 xDAI |
| Milestone 3 | Deterministic Engine Benchmarking | 8 weeks after acceptance | 2,000 xDAI |
| Milestone 4 | Historical Revert Analysis | 10 weeks after acceptance | 2,000 xDAI |
| Milestone 5 | Public Deployment and Integration | 12 weeks after acceptance | 3,000 xDAI |
Specifics: Milestone 1
-
Deliverable: Public repository setup and an open-source Go module that accurately ingests CoW Protocol
GPv2Orderstructs. -
Significance: Establishes the foundational parsing architecture required to bridge EVM transaction data into the verification environment, providing immediate, reviewable progress.
Specifics: Milestone 2
-
Deliverable: Full integration of the transpiler engine, translating the parsed batch payloads into Z3 mathematical constraints.
-
Significance: Completes the core SMT mathematical logic pipeline.
Specifics: Milestone 3
-
Deliverable: Benchmark report demonstrating verification latency on representative GPv2 settlement batches, together with deterministic timeout handling and resource bounds.
-
Significance: Establishes operational viability for integration into high-frequency solver infrastructure.
Specifics: Milestone 4
-
Deliverable: We will replay historical failed settlement batches and quantify the percentage identified as invalid by Polytope, average verification latency, classes of invariant violations detected, and candidate batches eliminated prior to simulation.
-
Significance: Evaluates the operational impact and potential economic value of Polytope for solver operators. Historical analysis will quantify the computational and time-saving efficiency of identifying invalid batches via Polytope versus spinning up full EVM simulations, alongside identifying any optimization engine bugs and the overall reduction in expensive simulation workload.
Specifics: Milestone 5
-
Deliverable: Official release of Polytope as an embeddable Go SDK and an optional lightweight gRPC service, accompanied by integration documentation for solver operators.
-
Significance: The final, solver-integratable deliverable allowing immediate, low-latency utilization by the CoW ecosystem without requiring external network hops.
Length
Complete finalization is expected within 3 months, or 12 weeks, from the commencement date. The commencement date will be upon the successful passing of the proposal on Snapshot. Deliverables submitted ahead of the maximum due dates will be pushed for immediate review.
Funding Request
Total Requested: 12,000 xDAI.
- Funding Structure: All funds will be paid strictly on a post-milestone completion basis. Milestone 1 has been scoped to a two-week turnaround to ensure rapid initial delivery and accommodate early project capitalization without requiring upfront advances. Funds are only released after the CoW grants committee reviews and approves each specific deliverable.
This budget aligns with the scope of developing a highly specialized solver infrastructure component, while the milestone weighting ensures strict alignment with CoW DAO completion incentives.
Gnosis Chain Address
0x229c3a2269b3bFF85eB225dEbd8bF4a58C71da8a
Other Information
-
GitHub Repository: The lightweight Proof of Concept Z3 constraint engine is available for review: https://github.com/VedantaHazra/polytope-cow-verifier
-
Demo Video: A video demonstration of this local engine catching slippage and clearing price faults off-chain is available here: https://youtu.be/prgYi1tAL98
Terms and Conditions
By submitting this grant application, I acknowledge and agree to be bound by the CoW DAO Participation Agreement and the CoW DAO Grant Agreement Terms.