Sol.College

Structure lesson (licence does not allow quoting code)

Anemone

Original
AnemoneDefi/Anemone
SuperStack fork
Blockchains/Anemone @ 7487535
Stars
0
Last push (original)
2026-05-11
Languages
TypeScript, Rust, CSS, HTML, JavaScript, Just
Detected stack
AnchorNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

105 source files. By extension: .ts ×54, .rs ×38, .tsx ×12, .jsx ×1.

Top-level directorySource files
programs38
scripts26
app21
keeper16
tests3
migrations1

On-chain programs: programs/anemone

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
set_keeperSetKeeperprograms/anemone/src/lib.rs:54
update_treasuryUpdateTreasuryprograms/anemone/src/lib.rs:58
pause_protocolPauseProtocolprograms/anemone/src/lib.rs:74
unpause_protocolPauseProtocolprograms/anemone/src/lib.rs:78
pause_marketPauseMarketprograms/anemone/src/lib.rs:82
unpause_marketPauseMarketprograms/anemone/src/lib.rs:86
update_rate_indexUpdateRateIndexprograms/anemone/src/lib.rs:104
sync_kamino_yieldSyncKaminoYieldprograms/anemone/src/lib.rs:108
deposit_liquidityDepositLiquidityprograms/anemone/src/lib.rs:112
request_withdrawalRequestWithdrawalprograms/anemone/src/lib.rs:116
deposit_to_kaminoDepositToKaminoprograms/anemone/src/lib.rs:120
withdraw_from_kaminoWithdrawFromKaminoprograms/anemone/src/lib.rs:124
settle_periodSettlePeriodprograms/anemone/src/lib.rs:128
claim_maturedClaimMaturedprograms/anemone/src/lib.rs:145
liquidate_positionLiquidatePositionprograms/anemone/src/lib.rs:149
close_position_earlyClosePositionEarlyprograms/anemone/src/lib.rs:153
add_collateralAddCollateralprograms/anemone/src/lib.rs:157
handle_close_position_earlyClosePositionEarlyprograms/anemone/src/instructions/trader/close_position_early.rs:145
handle_liquidate_positionLiquidatePositionprograms/anemone/src/instructions/trader/liquidate_position.rs:165
handle_claim_maturedClaimMaturedprograms/anemone/src/instructions/trader/claim_matured.rs:134
handle_add_collateralAddCollateralprograms/anemone/src/instructions/trader/add_collateral.rs:54
handle_settle_periodSettlePeriodprograms/anemone/src/instructions/trader/settle_period.rs:70
handle_pause_marketPauseMarketprograms/anemone/src/instructions/admin/pause_market.rs:35
handle_unpause_marketPauseMarketprograms/anemone/src/instructions/admin/pause_market.rs:41
handle_update_treasuryUpdateTreasuryprograms/anemone/src/instructions/admin/update_treasury.rs:27
handle_pause_protocolPauseProtocolprograms/anemone/src/instructions/admin/pause_protocol.rs:18
handle_unpause_protocolPauseProtocolprograms/anemone/src/instructions/admin/pause_protocol.rs:24
handle_set_keeperSetKeeperprograms/anemone/src/instructions/admin/set_keeper.rs:18
handle_update_rate_indexUpdateRateIndexprograms/anemone/src/instructions/keeper/update_rate_index.rs:54
handle_sync_kamino_yieldSyncKaminoYieldprograms/anemone/src/instructions/keeper/sync_kamino_yield.rs:42

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
tests/anemone.tsPublicKey, findProgramAddressSync, Keypair, SystemProgram, requestAirdrop, getLatestBlockhash
scripts/test-suite-c.tsPublicKey, findProgramAddressSync, Keypair, SystemProgram, requestAirdrop, getAccountInfo
scripts/demo-surfpool.tsPublicKey, findProgramAddressSync, SystemProgram, Keypair, getAccountInfo, requestAirdrop
scripts/test-money-flow.tsPublicKey, findProgramAddressSync, SystemProgram, Keypair, Program, getAccountInfo
scripts/setup-devnet.tsKeypair, PublicKey, findProgramAddressSync, SystemProgram, getAccountInfo, Program
scripts/test-multi-lp.tsPublicKey, findProgramAddressSync, Keypair, SystemProgram, Program, getAccountInfo
scripts/test-mainnet-sync.tsPublicKey, findProgramAddressSync, SystemProgram, getAccountInfo, Program, Keypair
scripts/simulate-liquidation.tsPublicKey, findProgramAddressSync, Keypair, AnchorProvider, Program, getAssociatedTokenAddressSync
scripts/test-mainnet-cycle.tsPublicKey, findProgramAddressSync, Keypair, Program, SystemProgram, AnchorProvider
scripts/test-suite-c-mainnet.tsPublicKey, findProgramAddressSync, SystemProgram, getAccountInfo, Program, Keypair
scripts/setup-surfpool.tsPublicKey, findProgramAddressSync, Keypair, getAccountInfo, Program, SystemProgram
scripts/setup-mainnet.tsPublicKey, findProgramAddressSync, Program, Keypair, SystemProgram, getAccountInfo

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/anemone/. 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 lint
appnpm run dev
appnpm run start
appnpm run build
appnpm run lint
keepernpm run dev
keepernpm run start
keepernpm run build
.anchor build
.anchor test
.anchor run test
.cargo build
.cargo test

What you could build from it