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 directory | Source files |
|---|---|
client | 31 |
server | 18 |
web3 | 3 |
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.
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>,- 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. - 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. - Line 217
has_one = asker @ BountyError::Unauthorized,: Checks that a stored pubkey field matches the passed account. - 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.
| Directory | Command | Runs |
|---|---|---|
web3 | npm run lint | prettier */*.js "*/**/*{.js,.ts}" --check |
client | npm run dev | next dev |
client | npm run start | next start |
client | npm run build | next build |
client | npm run lint | eslint |
server | npm run dev | nodemon src/server.ts |
server | npm run start | node dist/server.js |
server | npm run build | tsc |
web3 | anchor build | compile programs and generate IDLs |
web3 | anchor test | local validator + test suite |
web3 | anchor run test | yarn run ts-mocha -p ./tsconfig.json -t 1000000 \ |
What you could build from it
- Fork the SuperStack copy and extend it within the Infrastructure & Tooling gaps listed on the idea page.
- Learn the pattern first: Anchor account constraints