Docs

Protocol

Contracts and keys

The program, its accounts, and every key the vault depends on, read live from the chain.

Flume is one Solana program and one vault. Everything below is read from the network the app is connected to, through the Flume API, each time this page loads.

Reading the chain…

Program
2PMpaRUNWHAgd2ZSPDYjuaDrqwE89jRDbQrTfehrVtgn
Upgrade authority
…
Vault
…
Vault admin
…
Quote key
…
Vault cash
…
LP share mint
…
USDC mint
…
FLUME mint
…

The keys the vault depends on

KeyWhat it can doWhat it can't
Quote keyCo-sign purchases and SOL sales, which is how a firm quote is issuedMove vault cash on its own, or sign a purchase above the program's limits
Vault adminMove the vault to a new pricing model, only while no stream is open; replace the quote key; name a new admin, who takes over only once it acceptsWithdraw from the vault, or redirect any source's fees
Upgrade authorityReplace the programNothing else; when it's empty, nobody can change the program

No instruction lets any of these keys pay vault cash to themselves, change a source's creator, or redirect fees.

The vault admin is FLUME governance. Each of its actions runs only after a vote passes and its two-day wait is over. See Governance.

Accounts

Every account is a program-derived address, so each one can be found from the vault and the token alone.

AccountSeedsHolds
Vaultvault, first adminAdmin and any admin it has named next, model version and hash, quote key, open streams and what was paid for them
Vault cashliquidity, vaultThe vault's USDC
LP share mintshare_mint, vaultVault shares, six decimals
Sourcesource, vault, token mintCreator, token, SOL paid in, your unclaimed balances, next sale number
Fee accountfee_token, sourceYour USDC waiting to be claimed
Streamstream, sourceThe latest sale's price, share, term, cap and what the vault has received

Instructions

InstructionWho signsWhat it does
create_sourceToken mint authorityRegisters a token as a source
pay_usdc_feeAnyonePays USDC into a source and splits it
pay_sol_feeAnyonePays SOL into a source and records the split
purchaseCreator and quote keyPays the price to the creator and opens a stream
claim_creatorCreatorMoves the creator's USDC and SOL to the creator
convert_solBuyer and quote keySells the vault's SOL for USDC at or above the minimum rate
settleAnyoneCloses a stream whose term or cap has ended
depositLPAdds USDC and mints shares, while no stream is open
withdrawLPBurns shares for USDC, while no stream is open
update_modelVault adminMoves the vault to a new pricing model, while no stream is open
set_underwriterVault adminReplaces the quote key
transfer_adminVault adminNames the next admin
accept_adminThe named adminTakes over as vault admin

Every one of these emits an event, and the app's activity lists are built from them.