Golden Grid Smart Contract Audit
Zealynx audited the Golden Grid smart contract implementation, a decentralized pixel-based lottery protocol with Chainlink VRF randomness, mathematical pixel-to-bitmap conversions, and a multi-shareholder reward distribution system. Over a 2-week engagement, the team identified 10 issues including 1 Critical (VRF callback deadlock), 3 High (shareholder accounting corruption and biased randomness), 1 Medium, 4 Low and 1 Informational. All Critical, High, Medium and Low findings were fixed; the Informational was acknowledged.
Scope
3 files · 770 SLOCFindings
click any row for the full write-upKey Findings
- VRF callback failure deadlock. The protocol lacks a recovery mechanism for failed VRF callbacks, causing permanent deadlock where
isPendingstays locked. If callbacks revert, all future draws become impossible and user funds are permanently locked. - Biased lottery distribution. The
transformRandomToPixelfunction executes identical modulo operations in both branches, negating the rejection-sampling bias correction. Pixel numbers 0-57,895 have ~0.059% higher winning probability, compromising lottery fairness. - Systematic accounting corruption in
totalUnclaimedProceeds. The mechanism tracks only new rewards but subtracts complete liabilities during withdrawals, causing systematic corruption that enables over-allocation and prevents legitimate withdrawals. - Fund loss during zero-shareholder periods. When
totalShares = 0, incoming funds are marked "accounted for" without being distributed, causing approximately 50% permanent loss and unfair allocation when shareholders are re-added.
Team & approval
Disclaimer
This audit is not an endorsement and does not constitute investment advice. Zealynx reviewed the codebase at the commits listed in section 02 over the engagement window. Findings are limited to issues identified within that scope and do not preclude the existence of other vulnerabilities. Subsequent code changes are not covered by this report unless the engagement is explicitly extended.

