The NullGraph smart contract is a Solana program built with Anchor 0.31.1 that manages the on-chain infrastructure for Null Knowledge Assets (NKAs) and the bounty marketplace.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Ge0frey/nullgraph/llms.txt
Use this file to discover all available pages before exploring further.
Program ID
lib.rs:8:
Technology Stack
Solana program development framework providing type-safe account validation, PDA derivation, and CPI abstractions
Systems programming language ensuring memory safety and zero-cost abstractions
Token interface for USDC transfers via CPI using
transfer_checked for decimal validationArchitecture
The program implements a decentralized bounty marketplace for null scientific results using four core account types:Program Flow
Security Model
All program operations are protected by Anchor’s account validation framework:- Signer enforcement: Every mutation requires the appropriate authority (researcher, bounty creator, or protocol authority)
- PDA ownership: All data accounts are program-owned PDAs preventing external modification
- Status guards: Instructions validate current account status before state transitions
- Replay protection: PDA init constraints prevent duplicate accounts
- Vault authority: Token vaults use the vault PDA itself as authority, only accessible via CPI with correct signer seeds
- Safe arithmetic: All fee calculations use checked math operations (
checked_mul,checked_div,checked_sub) - Transfer validation:
transfer_checkedvalidates mint address and decimal precision on every USDC transfer
File Structure
The entire program is contained in a single file:Next Steps
Accounts
Explore all account structures and their fields
Instructions
Learn about all 6 program instructions
Events
Review emitted events for indexing
Errors
Reference all custom error codes