Technical reference

Smart Contracts

Explore the architecture of the JudgeNod Anchor program and the state management of hackathon submissions on Solana.

State account hierarchy in the JudgeNod program.
State account hierarchy in the JudgeNod program.

Program Structure

JudgeNod is built using the **Anchor Framework**, providing a secure and type-safe environment for defining judging logic. The program is designed for modularity, allowing for custom scoring plugins.

Account Hierarchy

The program manages state through a hierarchical set of accounts:

  • GlobalConfig: Singleton account containing global administrative settings and supported SVM versions.
  • RubricAccount: Created per hackathon. Stores the criteria, judge whitelist, and finalization status.
  • SubmissionAccount: Created per judge-project pair. Contains the raw scores and the repository hash.

Key Instructions

The core logic is exposed through these primary instructions:

instructions.rs
pub fn initialize_rubric(ctx: Context<InitializeRubric>, criteria: Vec<Criterion>) -> Result<()> { // Defines the scoring rules for the hackathon }  pub fn submit_score(ctx: Context<SubmitScore>, project_hash: [u8; 32], scores: Vec<u8>) -> Result<()> { // Validates signature and records the evaluation }  pub fn finalize_results(ctx: Context<FinalizeResults>) -> Result<()> { // Closes submissions and computes the final leaderboard }
Once `finalize_results` is called, all associated `SubmissionAccount` states are effectively locked. This is the final atomic step in a hackathon's lifecycle.

Security Measures

Security is the cornerstone of JudgeNod. Our contracts undergo rigorous internal auditing and include several safety mechanisms:

Access Control

Requires specific judge-signature verification for every submission action.

Reentrancy Protection

Utilizes Solana's parallel execution model and account locks to prevent state manipulation.

PDA Isolation

Scores are stored in Program Derived Addresses tied to the judge and project to prevent collisions.

Audit Logs

Every instruction emits a detailed event log for indexing and external verification.

Last updated: April 16, 2026
Edit this page on GitHub &nearr;