Sol.College

Full lesson

DeGenome-A-Decentralized-Privacy-Preserving-Infrastructure-for-Secure-Genomic-Data-Sharing

DeGenome is a decentralized platform designed to securely collect, store, and analyze genomic data while preserving individual privacy and at the same time building a knowledge base for genomic data that could be used for biomedical research, disease prediction, and drug discovery.

What it does

From the project README:

DeGenome is a decentralized **Trusted Research Environment (TRE)** for genomic data governance. It serves as a secure, two-sided marketplace where genomic data contributors retain permanent custody and control of their datasets, and researchers obtain governed, cryptographically audited, and tiered access to genomic insights.
Original
SyedaAfiaShah/DeGenome-A-Decentralized-Privacy-Preserving-Infrastructure-for-Secure-Genomic-Data-Sharing
SuperStack fork
Blockchains/DeGenome-A-Decentralized-Privacy-Preserving-Infrastructure-for-Secure-Genomic-Data-Sharing @ c353090
Stars
0
Last push (original)
2026-05-19
Languages
Python, JavaScript, TypeScript, Rust, CSS, HTML
Detected stack
Anchorsolana-pyweb3.js
Categories
Other
Licence
MIT
Homepage
https://degenome.vercel.app

Architecture

132 source files. By extension: .py ×60, .rs ×22, .jsx ×17, .ts ×13, .js ×10, .tsx ×10.

Top-level directorySource files
backend52
frontend46
anchor23
tests9
scripts2

On-chain programs: anchor/programs/degenome

Dapp: devnet deploy pending

⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/degenome-a-decentralized-privacy-preserving-infrastructure-for-secure-genomic-data-sharing/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

Key code, explained

Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.

SyedaAfiaShah/DeGenome-A-Decentralized-Privacy-Preserving-Infrastructure-for-Secure-Genomic-Data-Sharing · anchor/programs/degenome/src/instructions/increment_query_counter.rs L13–36 @ c353090 · MIT · original
    pub grant: Account<'info, AccessGrant>,     #[account(mut)]    pub researcher: Signer<'info>,     #[account(seeds = [b"platform_config"], bump = config.bump)]    pub config: Account<'info, PlatformConfig>,     #[account(mut)]    pub researcher_usdc: Option<Account<'info, TokenAccount>>,    #[account(mut)]    pub contributor_usdc: Option<Account<'info, TokenAccount>>,    #[account(mut, address = config.treasury_wallet)]    pub treasury_usdc: Option<Account<'info, TokenAccount>>,    #[account(mut)]    pub infrastructure_usdc: Option<Account<'info, TokenAccount>>,     pub token_program: Program<'info, Token>,} pub fn handler(ctx: Context<IncrementQueryCounter>, compute_fee_amount: u64) -> Result<()> {    let grant = &mut ctx.accounts.grant;    let clock = Clock::get()?;    require!(grant.is_active, DeGenoError::GrantNotActive);
  1. Line 16 pub researcher: Signer<'info>,: Requires this account to have signed the transaction.
  2. Line 18 #[account(seeds = [b"platform_config"], bump = config.bump)]: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  3. Line 18 #[account(seeds = [b"platform_config"], bump = config.bump)]: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  4. Line 35 let clock = Clock::get()?;: Reads on-chain time from the Clock sysvar.
  5. Line 36 require!(grant.is_active, DeGenoError::GrantNotActive);: An explicit validation that aborts the instruction with an error.
SyedaAfiaShah/DeGenome-A-Decentralized-Privacy-Preserving-Infrastructure-for-Secure-Genomic-Data-Sharing · anchor/programs/degenome/src/instructions/submit_verdict.rs L25–48 @ c353090 · MIT · original
    #[account(mut)]    pub reviewer: Signer<'info>,     #[account(mut)]    pub treasury_usdc: Option<Account<'info, TokenAccount>>,    #[account(mut)]    pub challenger_usdc: Option<Account<'info, TokenAccount>>,     #[account(seeds = [b"platform_config"], bump = config.bump)]    pub config: Account<'info, PlatformConfig>,     pub token_program: Program<'info, Token>,} pub fn handler(ctx: Context<SubmitVerdict>, verdict: ReviewVerdict, evidence_cid: Option<String>) -> Result<()> {    require!(verdict != ReviewVerdict::Pending, DeGenoError::Unauthorized);     let assignment = &mut ctx.accounts.assignment;    assignment.verdict = verdict.clone();    assignment.evidence_cid = evidence_cid;    let clock = Clock::get()?;    assignment.completed_at = Some(clock.unix_timestamp);     let dispute = &mut ctx.accounts.dispute;
  1. Line 26 pub reviewer: Signer<'info>,: Requires this account to have signed the transaction.
  2. Line 33 #[account(seeds = [b"platform_config"], bump = config.bump)]: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  3. Line 33 #[account(seeds = [b"platform_config"], bump = config.bump)]: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  4. Line 40 require!(verdict != ReviewVerdict::Pending, DeGenoError::Unauthorized);: An explicit validation that aborts the instruction with an error.
  5. Line 45 let clock = Clock::get()?;: Reads on-chain time from the Clock sysvar.
SyedaAfiaShah/DeGenome-A-Decentralized-Privacy-Preserving-Infrastructure-for-Secure-Genomic-Data-Sharing · anchor/programs/degenome/src/instructions/update_verification_status.rs L1–24 @ c353090 · MIT · original
use anchor_lang::prelude::*;use crate::state::*;use crate::errors::*; #[derive(Accounts)]pub struct UpdateVerificationStatus<'info> {    #[account(mut)]    pub dataset: Account<'info, DatasetRegistration>,        #[account(        seeds = [b"platform_config"],        bump = config.bump,        has_one = authority @ DeGenoError::Unauthorized    )]    pub config: Account<'info, PlatformConfig>,        #[account(mut)]    pub authority: Signer<'info>,} pub fn handler(ctx: Context<UpdateVerificationStatus>, new_status: VerificationStatus) -> Result<()> {    require!(ctx.accounts.config.authority == ctx.accounts.authority.key(), DeGenoError::Unauthorized);        ctx.accounts.dataset.verification_status = new_status;
  1. Line 11 seeds = [b"platform_config"],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  2. Line 12 bump = config.bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  3. Line 13 has_one = authority @ DeGenoError::Unauthorized: Checks that a stored pubkey field matches the passed account.
  4. Line 18 pub authority: Signer<'info>,: Requires this account to have signed the transaction.
  5. Line 22 require!(ctx.accounts.config.authority == ctx.accounts.authority.key(), DeGenoError::Unaut: An explicit validation that aborts the instruction with an error.
SyedaAfiaShah/DeGenome-A-Decentralized-Privacy-Preserving-Infrastructure-for-Secure-Genomic-Data-Sharing · anchor/programs/degenome/src/instructions/initialize_reputation.rs L1–24 @ c353090 · MIT · original
use anchor_lang::prelude::*;use crate::state::*; #[derive(Accounts)]pub struct InitializeReputation<'info> {    #[account(        init,        payer = payer,        space = ReputationAccount::SPACE,        seeds = [b"reputation", wallet.key().as_ref()],        bump    )]    pub reputation: Account<'info, ReputationAccount>,        /// CHECK: The wallet to create the reputation for    pub wallet: UncheckedAccount<'info>,        #[account(mut)]    pub payer: Signer<'info>,    pub system_program: Program<'info, System>,} pub fn handler(ctx: Context<InitializeReputation>) -> Result<()> {    let clock = Clock::get()?;
  1. Line 7 init,: Creates and pays for a new account. Space and payer must be specified.
  2. Line 10 seeds = [b"reputation", wallet.key().as_ref()],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  3. Line 11 bump: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  4. Line 19 pub payer: Signer<'info>,: Requires this account to have signed the transaction.
  5. Line 24 let clock = Clock::get()?;: Reads on-chain time from the Clock sysvar.

How to run, build and test

These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.

DirectoryCommandRuns
frontendnpm run devvite
frontendnpm run buildvite build
anchoranchor buildcompile programs and generate IDLs
anchoranchor testlocal validator + test suite
anchoranchor run testyarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts

What you could build from it

Used in lessons