Program Reference
Program ID, all 8 instructions, PDA seeds, account layouts, and fee constants for the GridCore Anchor program.
Program Details
On-chain identity and network.
The program is upgradeable. The deployer holds the upgrade authority. A future audit will precede any upgrade authority burn.
There is no admin instruction or GlobalConfig account. The treasury wallet address is hardcoded in the binary at compile time. No instruction changes program logic after deployment.
GridState and TileState are the canonical source of truth. No off-chain database is authoritative. The frontend reads directly from program accounts via getProgramAccounts.
Instructions
All 8 callable instructions and their purpose.
Discriminators use the seed pattern "global:instruction_name" — the first 8 bytes of SHA-256 of that string.
Creates a GridState PDA for a given SPL mint. The caller becomes the grid creator permanently and receives 0.4% of every future buyout. The grid is immediately live and tiles are claimable.
Claims an empty tile OR buys out an existing holder. First claim: pays starting_price, tile auto-lists at 1.2×, no seller payout. Buyout: pays listed price; seller receives 98%; 2% fee split (1% pool, 0.4% creator, 0.6% treasury). A 20-minute protection window starts for the new holder.
Changes the resale multiplier to 120 (1.2×), 150 (1.5×), or 200 (2.0×). Updates listed price = acquisition_price × multiplier / 100. First change is immediate; subsequent changes have a 24-hour cooldown.
Sets a custom absolute listed price. Floor: new_price ≥ acquisition_price × current_multiplier / 100. No cooldown — can be called any time.
Holder voluntarily gives up their tile. Holder pays 2% of their current listed price as an exit fee (same 1%/0.4%/0.6% split). No SOL is refunded. Tile resets to unowned state at the grid's starting_price. Requires 20-minute protection window to have elapsed.
Transfers accumulated rewards from vault to holder. Amount = (accumulator − reward_debt) / PRECISION. Rewards are equal per tile — one share per tile regardless of price.
Anyone can inject SOL directly into the grid's reward accumulator. If no tiles are held yet, SOL parks in pending_seed and is flushed on first tile acquisition.
Creator-only. Reclaims any SOL injected via inject_rewards before any tiles were claimed. Once the first tile is acquired, pending_seed is permanently flushed to the accumulator.
PDA Seeds
Deterministic account addresses for all program accounts.
All accounts are Program Derived Addresses. The frontend derives these off-chain before submitting transactions. Seeds must match the program exactly.
Fee Constants
All hardcoded rates in the program.
