Program ID
Generated Bindings
For a Rust program in the same workspace, enable the Dynamic Fee Sharing program crate with thecpi feature:
dynamic_fee_sharing.
CPI Pattern
Anchor generates CPI helpers for the program instructions. Account structs use the same names as the instruction contexts in the Dynamic Fee Sharing source.Instructions marked with
#[event_cpi] require the event-CPI accounts generated by Anchor. If you construct CPI calls manually, include the Dynamic Fee Sharing event authority and program accounts expected by the IDL.Common CPI Calls
Account Requirements
Source-Program Funding
fund_by_claiming_fee is the most account-order-sensitive CPI path. The handler validates:
Whitelisted actions are DAMM v2
claim_position_fee, DAMM v2 claim_reward, and DBC creator/partner trading fee, surplus, and migration fee withdrawals.

