# Grant Application: CoW Playground Offline Development Mode

- Space: [CoW DAO Grants](https://snapshot.box/s:cowgrants.eth.md)
- Author: 0x96584773E2845315e0421f75c296469C96911b88
- State: Passed
- Voting type: Basic
- Start: 2025-12-02 14:26 UTC
- End: 2025-12-05 14:26 UTC
- Votes: 4
- Quorum: 3 voting power
- Discussion: https://forum.cow.fi/t/grant-application-cow-playground-offline-development-mode/3262
- Open in Snapshot: https://snapshot.box/#/s:cowgrants.eth/proposal/0xc95e4ce75d17540e52484ea40980109a900ce1caa074033ea5cf220e6712b03c

## Results

- For: 4 voting power, 100.0%
- Against: 0 voting power, 0.0%
- Abstain: 0 voting power, 0.0%

## Proposal

# Grant Application: CoW Playground Offline Development Mode

**This is a reduced version, full version available in the forum:** https://forum.cow.fi/t/grant-application-cow-playground-offline-development-mode/3262

**Team:** @bleu @yvesfracari @ribeirojose @mendesfabio @lgahdl

**About Us:** bleu is a web3 technology and UX partner. Our CoW work includes: Python SDK, Framework Agnostic SDK, Hook dApps (cow-shed module), and Solver Infrastructure improvements.

## Simple Summary

Self-contained offline development mode for CoW Protocol backend engineers, eliminating blockchain forks and archive node dependencies. Enables testing autopilot/driver changes with realistic DEX liquidity without external dependencies.

## Problem & Solution

**Current barriers:**
- High infrastructure costs (archive node access ~$500-1000/month)
- Network dependency and latency
- Difficult scenario reproduction
- Complex setup for new developers

**Benefits:**
- Lower entry barriers for backend engineers
- Deterministic, reproducible testing
- Cost reduction (eliminate archive node costs)
- Faster development cycles with instant state

## Milestones & Funding

| Milestone | Duration | Payment |
|-----------|----------|---------|
| **M1 — Proof of Concept** | **COMPLETED** | **1,800 xDAI** |
| **M2 — Core Infrastructure & Periphery** | **4 weeks** | **12,000 xDAI** |
| **M3 — Frontend & Documentation** | **1 week** | **3,000 xDAI** |
| **Maintenance** | 1 year | **16,800 COW** |

**Total:** 16,800 xDAI + 16,800 COW vesting | **Duration:** 5 weeks

## Key Deliverables

**M1 - Completed PoC:**
- Local Anvil blockchain with core contracts
- Basic tokens (WETH, USDC, DAI) and Uniswap V2
- Auto-generated configs (driver.toml, baseline.toml)
- State persistence (dump/load)
- Successful end-to-end order settlement

**M2 - Core Infrastructure (4 weeks):**
- Additional tokens (USDT, GNO)
- Comprehensive Uniswap V2 pairs with realistic liquidity
- Periphery contracts: CoWHooksTrampoline, CoWShed, ComposableCoW, ERC1271Forwarder
- Watch Tower for conditional orders
- CoinGecko API mock for offline prices
- Complete backend testing capabilities

**M3 - Frontend & Documentation (1 week):**
- CoW Swap UI adapted for local chain (chain ID 31337) and tokens deployed offline
- Setup guides and configuration reference
- Testing scenarios and Forge script examples
- Architecture overview and troubleshooting

## Technical Approach

**Architecture:**
- Anvil local blockchain (no forking)
- Foundry deployment scripts with CREATE2
- Docker Compose orchestration
- JSON-based state management
- One-command startup: `docker-compose -f docker-compose.offline.yml up`

**Smart Contracts:**
- Core: GPv2Settlement, VaultRelayer, AllowListAuth, Balances
- Periphery: CoWHooksTrampoline, CoWShed, ComposableCoW, ERC1271Forwarder
- DEX: Uniswap V2 (full coverage), minimal Balancer V2 Vault mock
- Tokens: WETH, USDC, DAI, USDT, GNO with realistic liquidity

**Services:**
- Autopilot, Driver, Orderbook API, Baseline Solver, Watch Tower
- CoinGecko API mock for offline operation

## Why This Matters

**For Backend Engineers:**
- Test autopilot/driver changes instantly
- No infrastructure setup required
- Reproducible test scenarios
- Fast iteration cycles

**For Solver Developers:**
- Realistic liquidity for strategy testing
- Compatible with existing solvers (no code changes)
- Quick environment reset for testing

**For the Ecosystem:**
- Lower onboarding friction
- Reduced development costs
- Faster innovation cycles
- Open-source community benefit

## Evaluation Against RFP Criteria

**Technical Approach:** Anvil + Foundry + Docker-compose = fast, deterministic

**Resource Efficiency:** Minimal footprint (~MB storage), fast startup (seconds), no archive node costs

**Ease of Use:** One-command startup, works alongside fork mode, pre-configured, simple state reset

**Solver Compatibility:** No code changes needed, realistic liquidity, standard interfaces

**DEX Configuration:** Uniswap V2 pairs full-cover, realistic mainnet-based liquidity, sufficient depth

**Maintenance:** 1-year COW vesting (16,800 COW) for updates, bug fixes, community support

**Documentation:** Backend-focused guides, architecture overview, Forge examples, troubleshooting

**Cost & Timeline:** 16,800 xDAI over 5 weeks, PoC de-risks delivery, transparent breakdown

## Alignment with Grants DAO Values

- **Open Source:** All code in CoW Protocol repositories from day 0
- **Clear Milestones:** 3 focused phases with verifiable deliverables
- **Price Transparency:** Phase-by-phase breakdown aligned with scope
- **Sustainability:** 1-year maintenance through COW vesting
- **Simplicity:** Focused on core needs, no over-engineering
- **Documentation:** Enables immediate productivity
- **Responsiveness:** Revised scope based on DAO feedback

## Budget Breakdown

**M1 - PoC (COMPLETED):** 1,800 xDAI
- Core contracts, basic tokens, Uniswap V2, state persistence, end-to-end test

**M2 - Core Infrastructure:** 12,000 xDAI (4 weeks)
- Additional tokens and pairs, periphery contracts (hooks, CoWShed, ComposableCoW)
- Watch Tower, CoinGecko mock, complete backend testing

**M3 - Frontend & Documentation:** 3,000 xDAI (1 week)
- Configuring Frontend to work with offline mode, documentation, testing examples

**Maintenance:** 16,800 COW (1-year vesting)
- Bug fixes, security updates, documentation updates, community support

**Total CAP:** 16,800 xDAI + 16,800 COW

## Payment Information

**Gnosis Chain Address:** 0x554866e3654E8485928334e7F91B5AfC37D18e04

**Payment Schedule:** Upon approval of each milestone

## Terms

By submitting this grant application, we acknowledge and agree to be bound by the CoW DAO Participation Agreement and the CoW Grant Terms and Conditions.

---

To vote or create proposals from an AI assistant, connect the Snapshot MCP at https://mcp.snapshot.box

