Review docs.switchboard.xyz and the Switchboard Examples repository.
- Which sections lack clarity, feel incomplete, or are out of order?
- Propose 3 concrete improvements (titles, placement, code, diagrams, examples).
- For each, explain why it helps adoption and where it should live in the nav.
docs-review.md(≤ 2 pages)
You’re building an on-chain app on Solana that uses an oracle.
- Why choose Switchboard vs alternatives (technical + ops tradeoffs)?
- Which app types would you prioritize and why (price feeds, custom jobs, verifiable randomness, sports/weather, etc.)?
- Which dev resources/tools should Switchboard add or improve (SDKs, templates, dashboards, CLI flows)?
use-cases.md(≤ 2 pages)
A. Consume an existing price feed
- On devnet, read a Switchboard feed (e.g., SOL/USD). See https://explorer.switchboardlabs.xyz/
- Anchor program exposes
record_price(aggregator_pubkey)that:- Verifies the price feed,
- Reads latest result + slot,
- Stores it in your program state (PDA) with the signer’s pubkey and block time.
B. Create & consume your own feed
- Use Switchboard to create a custom feed (e.g., HTTP price or off-chain metric),
- Same on-chain consume path as (A).
-
Solana Program (Anchor)
initialize(...)to set config (e.g., authority, aggregator).record_price(...)verifies the Switchboard account (no spoofing) and persists:- value (i128 or fixed-point),
- caller pubkey.
- Unit test reading a mock or devnet aggregator and asserting parse & storage.
-
Devnet Deployment
- Deploy to devnet. Provide Program ID and an example tx that calls
record_price. - Include
Anchor.tomland IDL intarget/idlcommitted.
- Deploy to devnet. Provide Program ID and an example tx that calls
-
UI (minimal, but real)
- React/Next.js (or Svelte) single page:
- Connect wallet (Phantom/Solana Wallet Standard).
- Display live aggregator value (pulled from chain account or RPC) and last stored value from your program state (PDA).
- Button “Record price” → sends
record_priceto your program; show resulting tx signature and toast success/error. - Show confidence interval and timestamp (humanized).
- Nice-to-have: small chart of last N stored values from your PDA.
- React/Next.js (or Svelte) single page:
-
Switchboard Usage (required)
- Program must verify the Switchboard account layout/signature fields you rely on (no blind reads).
- Explain in README how you validated aggregator data (checking owner, discriminator/layout, permission gates, staleness threshold).
-
Repo & Ops
- Monorepo or two folders is fine:
/programs/price-recorder # Anchor program /app # UI (Next.js) /scripts # local helpers (keypair, seed, tx) README.md - Provide
.env.examplefor UI + scripts (RPC, program id, aggregator pubkey). - Add scripts:
anchor test(program unit/integration tests)pnpm dev(ornpm run dev) for UIts-node scripts/record.tsto invoke the ix from CLI
- Include screenshots or a short screen-cap of the UI recording a price and showing the tx link.
- Monorepo or two folders is fine:
- Program is deployed on devnet;
- At least one tx on devnet calling
record_pricewith a valid aggregator; link provided. - UI builds & runs, can connect a wallet, shows an aggregator’s latest value, and can send a tx to your program.
- Switchboard account checks are present (owner/program id check, data layout/discriminator checks, staleness/slot bounds, optional confidence threshold).
- README has exact steps to:
- create/set feed (or choose an existing one),
- build/deploy program to devnet,
- run UI, invoke instruction,
- verify state via
solana account <pda>or a helper script.
- Public GitHub repo link containing all code, IDL, and README.
- Program ID (devnet) and at least one tx signature invoking
record_price. - Short demo (GIF/video or screenshots).
- Optional: Deployed UI URL (Vercel/Netlify) pointing to devnet.
| Category | Points | Description |
|---|---|---|
| Docs Review Quality | 15 | Clear, actionable improvements with rationale. |
| Use-Case Depth | 15 | Realistic tradeoffs; specific Switchboard advantages. |
| On-Chain Correctness | 30 | Proper aggregator verification, data parsing, checks, clean state model, tests pass. |
| UI/UX | 20 | Wallet flow works, values render correctly, tx feedback is clear. |
| DevEx & README | 10 | One-shot setup, scripts, .env.example, troubleshooting notes. |
| Code Quality | 10 | Structure, types, error handling, small, focused modules. |
- Program: Anchor (Rust), SPL types, deterministic PDAs, fixed-point via
i128orDecimal. - UI: Next.js + Wallet Standard adapter,
@solana/web3.js, small chart (e.g., Recharts). - Tooling:
pnpm