Sol.College

Structure lesson (licence does not allow quoting code)

Groundgraph

Groundgraph: prediction market & alpha platform on Solana. Trade ABOVE/BELOW price markets on an original Anchor AMM with Pyth oracles, while a GraphSAGE wallet-graph model flags smart money and turns it into an explainable, calibrated signal. Non-custodial, wallet-only sign-in. Colosseum Crypto World's Fair hackathon.

Original
Fashich/Groundgraph
SuperStack fork
Blockchains/Groundgraph @ 647e373
Stars
0
Last push (original)
2026-10-12
Languages
TypeScript, Python, Rust, CSS, Shell, JavaScript
Detected stack
AnchorNext.jsweb3.js
Categories
DeFiWallets & Identity
Licence
none detected: code not quoted on Sol.College

Architecture

331 source files. By extension: .ts ×205, .tsx ×62, .py ×43, .rs ×21.

Top-level directorySource files
services127
apps119
packages59
programs14
tests7
scripts5

On-chain programs: programs/groundgraph

How it works: instructions and accounts

Each instruction handler and the accounts struct it validates, found by reading the Rust source. Links go to the exact line at the pinned commit.

InstructionAccountsSource
initialize_configInitializeConfigprograms/groundgraph/src/lib.rs:38
update_configUpdateConfigprograms/groundgraph/src/lib.rs:42
allow_feedAllowFeedprograms/groundgraph/src/lib.rs:46
disallow_feedDisallowFeedprograms/groundgraph/src/lib.rs:50
create_marketCreateMarketprograms/groundgraph/src/lib.rs:54
buyBuyprograms/groundgraph/src/lib.rs:58
sellSellprograms/groundgraph/src/lib.rs:62
mergeMergeprograms/groundgraph/src/lib.rs:66
settle_closeSettleCloseprograms/groundgraph/src/lib.rs:70
void_marketVoidMarketprograms/groundgraph/src/lib.rs:74
redeemRedeemprograms/groundgraph/src/lib.rs:78
remove_liquidityRemoveLiquidityprograms/groundgraph/src/lib.rs:82
handle_redeemRedeemprograms/groundgraph/src/instructions/redeem.rs:38
handle_remove_liquidityRemoveLiquidityprograms/groundgraph/src/instructions/redeem.rs:118
handle_initialize_configInitializeConfigprograms/groundgraph/src/instructions/admin.rs:116
handle_update_configUpdateConfigprograms/groundgraph/src/instructions/admin.rs:154
handle_allow_feedAllowFeedprograms/groundgraph/src/instructions/admin.rs:216
handle_disallow_feedDisallowFeedprograms/groundgraph/src/instructions/admin.rs:247
handle_settle_closeSettleCloseprograms/groundgraph/src/instructions/settle.rs:32
handle_void_marketVoidMarketprograms/groundgraph/src/instructions/settle.rs:89
handle_buyBuyprograms/groundgraph/src/instructions/trade.rs:50
handle_sellSellprograms/groundgraph/src/instructions/trade.rs:148
handle_mergeMergeprograms/groundgraph/src/instructions/trade.rs:248
handle_create_marketCreateMarketprograms/groundgraph/src/instructions/create_market.rs:127

Where the Solana code lives

Source files that import a Solana SDK, ranked by how many Solana APIs they use, with the APIs each one calls. Read them in this order to see how the app talks to the chain.

FileSolana APIs used
programs/groundgraph/src/spl.rsAccountInfo, Pubkey, invoke_signed, Program, transfer
packages/sdk/src/instructions.tsPublicKey, getAssociatedTokenAddressSync
packages/sdk/src/events.tsPublicKey, Program, invoke
services/indexer/test/helpers.tsPublicKey, Keypair, Program, invoke
programs/groundgraph/src/instructions/create_market.rsseeds, CpiContext, Program, transfer, AccountInfo, Pubkey
scripts/devnet-lib.tsConnection, Keypair, PublicKey, SystemProgram, Program, getAccountInfo
packages/sdk/test/accounts.test.tsProgram, invoke, PublicKey
services/keeper/src/poster.tsPublicKey, VersionedTransaction, Connection, Keypair, getLatestBlockhash, getBalance
packages/sdk/test/e2e.litesvm.test.tsPublicKey, Keypair, VersionedTransaction, sendTransaction
programs/groundgraph/src/instructions/admin.rsseeds, Pubkey, has_one, Program, AccountInfo, init_if_needed
packages/sdk/src/pda.tsPublicKey, seeds, findProgramAddressSync, Program
apps/web/src/lib/tx.tsVersionedTransaction, Connection, Transaction, signTransaction, sendTransaction

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/groundgraph/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

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
.npm run dev
.npm run build
.npm run test
.npm run lint
services/keepernpm run dev
services/keepernpm run start
services/keepernpm run test
services/apinpm run dev
services/apinpm run start
services/apinpm run test
services/indexernpm run dev
services/indexernpm run start
services/indexernpm run test
apps/webnpm run dev
apps/webnpm run start
apps/webnpm run build

What you could build from it