Sol.College

Structure lesson (licence does not allow quoting code)

advisor-fee-vault

Advisor fee vault on Solana: USDC yield positions with office, advisor and Rivool fees split onchain. Built for Colosseum Crypto World's Fair.

Original
Rivool-Finance/advisor-fee-vault
SuperStack fork
Blockchains/advisor-fee-vault @ 233140a
Stars
0
Last push (original)
2026-10-30
Languages
HTML, TypeScript, Rust, Shell, JavaScript
Detected stack
Anchorweb3.js
Categories
DeFi
Licence
none detected: code not quoted on Sol.College
Homepage
https://rivool.finance

Architecture

21 source files. By extension: .ts ×15, .rs ×6.

Top-level directorySource files
scripts13
programs4
idl2
tests2

On-chain programs: programs/advisor-fee-vault, programs/stand-in-yield

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
initializeInitializeprograms/stand-in-yield/src/lib.rs:13
set_exchange_rateSetExchangeRateprograms/stand-in-yield/src/lib.rs:24
depositTransactprograms/stand-in-yield/src/lib.rs:42
redeemTransactprograms/stand-in-yield/src/lib.rs:105
register_vaultRegisterVaultprograms/advisor-fee-vault/src/lib.rs:19
accrueAccrueprograms/advisor-fee-vault/src/lib.rs:31
settleSettlementprograms/advisor-fee-vault/src/lib.rs:35
depositClientTransactprograms/advisor-fee-vault/src/lib.rs:39
close_positionClosePositionprograms/advisor-fee-vault/src/lib.rs:51
transfer_office_authoritySetOfficeFeeprograms/advisor-fee-vault/src/lib.rs:72
set_advisor_feeSetAdvisorFeeprograms/advisor-fee-vault/src/lib.rs:167
register_vaultRegisterVaultprograms/advisor-fee-vault/src/positions.rs:138
accrueAccrueprograms/advisor-fee-vault/src/positions.rs:215
settleSettlementprograms/advisor-fee-vault/src/positions.rs:228
depositClientTransactprograms/advisor-fee-vault/src/positions.rs:351
withdrawClientTransactprograms/advisor-fee-vault/src/positions.rs:399

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/svm/tests/programs.rsPubkey, Keypair, Transaction
programs/advisor-fee-vault/src/positions.rsseeds, has_one, Pubkey, Program, CpiContext, AccountInfo
programs/advisor-fee-vault/src/lib.rsPubkey, seeds, has_one, Program
scripts/client.tsPublicKey, Transaction, Connection, Keypair, SystemProgram, getAssociatedTokenAddressSync
programs/stand-in-yield/src/lib.rsseeds, Pubkey, CpiContext, Program, has_one
scripts/bootstrap.tsSystemProgram, getAccountInfo, Transaction, createMint, mintTo, getBalance
scripts/governance.tsPublicKey, transfer, Transaction, AccountInfo, getAccountInfo
scripts/verify-evidence.tsPublicKey, transfer, Transaction
scripts/governance.test.tsKeypair, PublicKey, SystemProgram
scripts/devnet-operations.tsPublicKey, getAccountInfo, getBalance
scripts/governance-smoke.tsPublicKey, TransactionMessage, getBalance, requestAirdrop, getLatestBlockhash
scripts/demo.tsPublicKey, 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/advisor-fee-vault/. 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 test
.npm run deploy
.anchor build
.anchor test
.anchor run test
.cargo build
.cargo test

What you could build from it