Sol.College

Structure lesson (licence does not allow quoting code)

Bynomo

The first binary options trading dapp on blockchain

Original
AmaanSayyad/Bynomo
SuperStack fork
Blockchains/Bynomo @ c3153a1
Stars
7
Last push (original)
2026-09-03
Languages
TypeScript, PLpgSQL, CSS, Rust, JavaScript, Python
Detected stack
Next.jsweb3.js
Categories
DeFi
Licence
NOASSERTION: code not quoted on Sol.College
Homepage
https://bynomo.fun/

Architecture

255 source files. By extension: .ts ×176, .tsx ×66, .js ×7, .py ×3, .sol ×2, .rs ×1.

Top-level directorySource files
lib102
app66
components56
(root)8
supabase6
types5
tmp4
scripts4

On-chain programs: contracts/solana/programs/bynomo_binary_options

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
place_betPlaceBetcontracts/solana/programs/bynomo_binary_options/src/lib.rs:101
lock_roundLockRoundcontracts/solana/programs/bynomo_binary_options/src/lib.rs:138
settle_roundSettleRoundcontracts/solana/programs/bynomo_binary_options/src/lib.rs:147
claimClaimcontracts/solana/programs/bynomo_binary_options/src/lib.rs:183
collect_feesCollectFeescontracts/solana/programs/bynomo_binary_options/src/lib.rs:217

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
lib/solana/client.tsPublicKey, Transaction, Connection, getAssociatedTokenAddress, transfer, getLatestBlockhash
lib/solana/backend-client.tsPublicKey, Connection, Keypair, Transaction, transfer, createTransferInstruction
contracts/solana/programs/bynomo_binary_options/src/lib.rshas_one, Pubkey, Program, seeds, CpiContext, transfer
components/balance/DepositModal.tsxsendTransaction, Transaction, transfer, useWallet, Connection, PublicKey
components/game/GameBoard.tsxsendTransaction, useWallet, transfer, Connection, signTransaction
lib/admin/treasuryBalanceSnapshot.tsgetBalance, Connection, PublicKey
components/wallet/WalletConnectModal.tsxuseWallet
app/providers.tsxuseWallet
app/staking/page.tsxuseWallet, sendTransaction, transfer
components/wallet/WalletConnect.tsxuseWallet
lib/solana/wallet.tsuseWallet
lib/utils/address.tsPublicKey

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/bynomo/. 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 start
.npm run build
.npm run test
.npm run lint

What you could build from it