Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt

Use this file to discover all available pages before exploring further.

Dynamic Fee Sharing lets a project configure a token fee vault, fund fees into it, and let configured shareholders claim their share over time. To learn more about product behavior, design considerations, compatibility, and formulas, you can read the following documentations.

Learn more about Dynamic Fee Sharing

Product overview for fee vaults, fee sharing flows, and high-level integration behavior.

Dynamic Fee Sharing Formulas

Formula references for fee allocation, user shares, and claim accounting.

Integration

Program Accounts

Fee vault state, token vault PDA, fee vault authority PDA, constants, and token support.

Program Instructions

Initialization, direct funding, source-program funding, and fee claim instruction details.

Program Events

Anchor event-CPI payloads for vault initialization, funding, and user claims.

Program Errors

Anchor custom error codes, enum names, messages, and common integration causes.

TypeScript SDK

TypeScript SDK for creating vaults, funding them, reading state, and claiming user fees.

Rust CPI

Anchor CPI integration with the dynamic-fee-sharing program crate.

Program IDs

The dynamic_fee_sharing program ID is the same on mainnet and devnet:
NetworkProgram ID
Mainnet Betadfsdo2UqvwfN8DuUVrMRNfQe11VaiNoKcMqLHVvDPzh
Devnetdfsdo2UqvwfN8DuUVrMRNfQe11VaiNoKcMqLHVvDPzh
The program-wide fee vault authority PDA is:
AuthorityAddress
Fee Vault AuthorityEYqHRdtepv1KKUkPAYMBYpSfiGfNd8sa55ZtswodTfBS

Fee Vault Types

Vault typeAddress modelCreated byMain use
Non-PDA fee vaultExternal keypair accountinitialize_fee_vault / createFeeVaultStandalone fee sharing when the vault address can be created and stored off-chain.
PDA fee vaultPDA from ["fee_vault", base, token_mint]initialize_fee_vault_pda / createFeeVaultPdaProtocol integrations where a deterministic vault address must sign source-program fee claims.
Both vault types share the same FeeVault state layout and support direct funding plus user claims. Only PDA fee vaults support fund_by_claiming_fee, because the vault PDA signs the downstream whitelisted claim or withdrawal instruction.

Source Repositories

Dynamic Fee Sharing Program

Anchor program source for dynamic_fee_sharing.

Dynamic Fee Sharing IDL

Published IDL used by the TypeScript SDK.

TypeScript SDK

SDK for transaction builders, state reads, PDA helpers, and example scripts.

Commands

TaskCommand
Build programcd dynamic-fee-sharing && anchor build
Run program testscd dynamic-fee-sharing && pnpm install && pnpm test
Build TypeScript SDKcd dynamic-fee-sharing-sdk && pnpm install && pnpm run build
Run TypeScript SDK testscd dynamic-fee-sharing-sdk && bun test

Stay Updated

Dynamic Fee Sharing Changelog

Program and SDK changes for integration planning.