Sol.College

Full lesson

Bounty-Stack

BountyStack is a decentralized Q&A platform on Solana, enabling users to post questions with crypto bounties and rewarding the best answers trustlessly via smart contracts. Monetize knowledge, connect with experts, and automate payouts - no intermediaries required.

What it does

From the project README:

BountyStack is a Web3-native Q&A platform that fundamentally reimagines how knowledge exchange is incentivized. By leveraging Solana smart contracts, the platform enables users to attach SOL bounties to questions, with funds held in trustless escrow and automatically distributed to experts who provide accepted answers.
Original
ANAS727189/Bounty-Stack
SuperStack fork
Blockchains/Bounty-Stack @ 558c814
Stars
1
Last push (original)
2026-01-28
Languages
TypeScript, Rust, CSS, JavaScript
Detected stack
AnchorNext.jsweb3.js
Categories
Infrastructure & Tooling
Licence
MIT
Homepage
https://bounty-stack.vercel.app

Architecture

52 source files. By extension: .ts ×29, .tsx ×22, .rs ×1.

Top-level directorySource files
client31
server18
web33

On-chain programs: web3/programs/bounty_escrow

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/bounty-stack/. 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.

ANAS727189/Bounty-Stack · web3/programs/bounty_escrow/src/lib.rs L205–228 @ 558c814 · MIT · original
  // Find the PDA using the same seeds seeds = [b"bounty", question_id.as_bytes()], bump = bounty_account.bump, // Verify the bump   // Security: Ensure the signer is the original asker has_one = asker @ BountyError::Unauthorized,  // When this instruction finishes, close the account // and send the remaining rent SOL to the `asker`. close = asker )] pub bounty_account: Account<'info, BountyAccount>,
  1. Line 209 seeds = [b"bounty", question_id.as_bytes()],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  2. Line 211 bump = bounty_account.bump, // Verify the bump: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  3. Line 217 has_one = asker @ BountyError::Unauthorized,: Checks that a stored pubkey field matches the passed account.
  4. Line 224 close = asker: Closes the account at the end of the instruction and refunds its lamports.

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
web3npm run lintprettier */*.js "*/**/*{.js,.ts}" --check
clientnpm run devnext dev
clientnpm run startnext start
clientnpm run buildnext build
clientnpm run linteslint
servernpm run devnodemon src/server.ts
servernpm run startnode dist/server.js
servernpm run buildtsc
web3anchor buildcompile programs and generate IDLs
web3anchor testlocal validator + test suite
web3anchor run testyarn run ts-mocha -p ./tsconfig.json -t 1000000 \

What you could build from it

Used in lessons