CleanField
Reward farmers for not burning their crop residue
Created on 31st January 2026
•
CleanField
Reward farmers for not burning their crop residue
The problem CleanField solves
CleanField tackles two critical interconnected problems:
-
The Air Quality Crisis
Every year, agricultural burning creates 40,000+ fire hotspots in farming regions, pushing air quality to hazardous levels (AQI 300+). Farmers often resort to burning crop residue because it's the cheapest way to clear fields—even though they want to adopt cleaner methods if properly incentivized. -
Broken Incentive Systems
Governments offer rewards for sustainable farming, but the verification process is painfully slow:
Registration review: 1-4 weeks
Satellite cross-checking: 2-6 weeks
Field inspections: 2-4 weeks
Certification: 1-2 weeks
Total: 6-16 weeks before farmers see any reward. This delay kills motivation and trust.
What CleanField Enables
- Instant Verification: Uses zkTLS to cryptographically prove "no burning detected" status directly from government satellite data (GISTDA)—no API access or server changes required
- Trustless Rewards: Smart contracts automatically distribute USDC to verified clean farms, eliminating bureaucratic delays and corruption risks
- Zero Government Overhead: Works with existing public government data; authorities don't need to change anything
- Farmer Empowerment: Provides small-scale farmers direct, transparent access to environmental rewards through a mobile-first interface
Bottom line: CleanField transforms a slow, trust-dependent 6-16 week process into an automated, cryptographically-verified instant payment system—making clean farming financially viable and immediately rewarding.
Challenges I ran into
-
GISTDA API Integration with Thai Language Parameters
The biggest hurdle was integrating with Thailand's GISTDA government API for hotspot detection. The API uses Thai language filter parameters (lu_name='พื้นที่เกษตร' for agricultural land), which caused encoding issues when constructing query strings. We had to carefully handle URL encoding and ensure the Thai characters were properly transmitted. Additionally, the API documentation was sparse, requiring trial-and-error to understand the response format and spatial query parameters. -
zkTLS SDK Integration Complexity
Integrating the Primus zkTLS SDK proved more complex than anticipated. The SDK requires server-side initialization with app credentials, and the attestation flow involves multiple async steps. We initially struggled with the MPC vs Proxy mode decision—MPC offers higher security but slower performance, while Proxy mode is faster but requires more trust. We ultimately designed an abstraction layer (primusClient.ts) that gracefully falls back to mock attestations when credentials aren't configured, allowing the demo to work without full SDK setup. -
Bridging Web2 Government Data with Web3 Smart Contracts
The core challenge was creating a trustless bridge between GISTDA's traditional Web2 API and our on-chain reward system. We needed to prove that "No Burning Detected" status came from the official government portal without requiring GISTDA to modify their systems. zkTLS solved this, but designing the proof submission flow—where the oracle generates proofs, hashes them, and submits to the smart contract—required careful consideration of trust assumptions and gas optimization. -
Geospatial Buffer Calculations
Determining whether a hotspot falls within a farm's boundary required converting kilometers to approximate degrees (bufferKm / 111). This simple approximation works near Thailand's latitude but isn't
Tracks Applied (5)
BGA Prize
Privacy — Privacy & Zero-Knowledge Applications
Digital Economy — Open Digital Economy
Localism
ZKTLS Prize
Technologies used
