Sol.College

Structure lesson (licence does not allow quoting code)

Solana_Detector

Real-time fraud prevention for Solana smart contracts secure every transaction, on-chain and beyond.

Original
RishiGitH/Solana_Detector
SuperStack fork
Blockchains/Solana_Detector @ 74bc5c5
Stars
2
Last push (original)
2024-10-11
Languages
TypeScript, Python, MDX, JavaScript, Rust, Dockerfile
Detected stack
solana-py
Categories
Other
Licence
none detected: code not quoted on Sol.College
Homepage
https://sifusecurity.com/

Architecture

177 source files. By extension: .tsx ×113, .py ×33, .ts ×24, .js ×4, .rs ×3.

Top-level directorySource files
frontend135
on-chain-analysis12
sifu_ai_analysis_security_tools12
cron-analysis-lambda8
on-chain-contracts7
contract_byte_code_to_human_redable_code2
api_dynamo_db1

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
initializeInitializeon-chain-contracts/demo_vunerable_pool.rs:9
depositDepositon-chain-contracts/demo_vunerable_pool.rs:19
withdrawWithdrawon-chain-contracts/demo_vunerable_pool.rs:51
initializeInitializeon-chain-contracts/demo_vunerable_pool_sifu_secured.rs:16
depositDepositon-chain-contracts/demo_vunerable_pool_sifu_secured.rs:26
withdrawWithdrawon-chain-contracts/demo_vunerable_pool_sifu_secured.rs:58
initializeInitializeon-chain-contracts/sifu_signature_verification.rs:12
verify_signatureVerifySignatureon-chain-contracts/sifu_signature_verification.rs:19

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
on-chain-contracts/test_E2E_pool_drain.tsPublicKey, Connection, Keypair, Transaction, getBalance, SystemProgram
on-chain-analysis/test_sign.jsKeypair, PublicKey, Program, Transaction, SystemProgram, Connection
frontend/config/detection-apis.tsAccountInfo, Program, Pubkey, invoke, invoke_signed, Transaction
sifu_ai_analysis_security_tools/mock_data.pyAccountInfo, transfer, Pubkey, invoke, invoke_signed
on-chain-analysis/full_verifier_test.jsPublicKey, Keypair, Transaction, SystemProgram, Connection, AnchorProvider
on-chain-contracts/test_on_chain_verification.tsPublicKey, Keypair, Connection, SystemProgram, Program, AnchorProvider
on-chain-contracts/test_new_contracts.tsSystemProgram, Program, PublicKey, Keypair, requestAirdrop, AnchorProvider
on-chain-contracts/demo_vunerable_pool_sifu_secured.rsPubkey, Program, invoke, AccountInfo, transfer, CpiContext
on-chain-contracts/demo_vunerable_pool.rsProgram, Pubkey, transfer, CpiContext
on-chain-contracts/sifu_signature_verification.rsseeds, invoke, Program, Pubkey
on-chain-analysis/test_verifier.jsPublicKey

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/solana-detector/. 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

No package.json, Anchor.toml, Cargo.toml, go.mod or Makefile was found near the root. See the project README.

What you could build from it