dynamic_fee_sharing program exposes the instructions below. Integrators should use the TypeScript SDK for normal transaction construction, or build through CPI.
Instruction Summary
Initialize Non-PDA Fee Vault
params.users must contain 2 to 5 entries. Each UserShare.address must be non-default, and each UserShare.share must be greater than zero.
Initialize PDA Fee Vault
Use PDA fee vaults when the fee vault must sign downstream source-program instructions, such as DAMM v2 fee claims or DBC fee withdrawals.
Direct Funding
fund_fee transfers min(max_amount, fund_token_vault.amount). If the resulting amount is zero, the instruction returns AmountIsZero.
For Token 2022 transfer-fee mints, the vault credits the transfer-fee excluded amount to total_funded_fee and fee_per_share.
Source-Program Funding
fund_by_claiming_fee is a wrapper for whitelisted source-program actions. The caller passes the downstream instruction data as payload and the downstream account metas as remaining accounts.
The first 8 bytes of
payload must be the downstream Anchor instruction discriminator.
Whitelisted Source Actions
The index is zero-based within the remaining accounts passed to
fund_by_claiming_fee.
User Claim
If the calculated claim amount is zero, the instruction updates no tokens and emits no claim event.

