Spatial Discretization for Fine-Grain Zone Checks with STARKs
Sungmin Lee, Kichang Lee, Gyeongmin Han, JeongGil Ko
TL;DR
This work tackles zero-knowledge spatial zone checks (PiP) by discretizing space into grid-based lookup tables within a fixed STARK execution model. It compares center-point, voting-based boolean, and distance-aware discretizations, demonstrating that storing signed distance values with arithmetic-native bilinear interpolation yields substantial accuracy gains on coarse grids with only modest proof overhead. The study provides a systematic evaluation on real OpenStreetMap zones, identifying that accuracy saturates around moderate resolutions while proof costs scale with grid size, and that distance-aware encodings shift the trade-off favorably. The findings highlight discretization strategy, particularly distance-aware encodings, as a key lever for efficient, private spatial checks in practice, enabling scalable zero-knowledge geospatial applications.
Abstract
Many location-based services rely on a point-in-polygon test (PiP), checking whether a point or a trajectory lies inside a geographic zone. Since geometric operations are expensive in zero-knowledge proofs, privately performing the PiP test is challenging. In this paper, we answer the research questions of how different ways of encoding zones affect accuracy and proof cost by exploiting gridbased lookup tables under a fixed STARK execution model. Beyond a Boolean grid-based baseline that marks cells as in- or outside, we explore a distance-aware encoding approach that stores how far each cell is from a zone boundary and uses interpolation to reason within a cell. Our experiments on real-world data demonstrate that the proposed distance-aware approach achieves higher accuracy on coarse grids (max. 60%p accuracy gain) with only a moderate verification overhead (approximately 1.4x), making zone encoding the key lever for efficient zero-knowledge spatial checks.
