Program ID
Generated Bindings
For a Rust program in the same workspace, enable the DBC program crate with thecpi feature:
CPI Instruction Scope
Event CPI Accounts
Most public DBC instructions use#[event_cpi]. Include these accounts when constructing CPI contexts:
Remaining Accounts
Swaps may require the instructions sysvar as the first remaining account.
The program validates single-swap behavior for active rate limiter pools. The first-swap minimum-fee path also validates that pool initialization appears earlier in the top-level transaction; do not assume a CPI-only path is eligible for that minimum fee.
Swap CPI Shape
Useswap2 for new integrations because it supports exact-in, partial-fill, and exact-out modes.
Before calling DBC from your program:
- Decode and validate
VirtualPoolandPoolConfig. - Verify account ownership and data length before deserializing.
- Use the Rust quote library or TypeScript SDK math to calculate expected amounts.
- Pass user-controlled slippage limits into your own instruction args.
- Recheck token mints, vaults, token program IDs, and signer authorities in your account constraints.
Token Programs
DBC supports SPL Token and Token-2022 base mints. Migration and pool creation account lists differ by token type.Common CPI Failures
Some DBC handlers wrap downstream CPIs with account invariant checks. If the downstream CPI unexpectedly changes account owner, data length, or reduces lamports, DBC can returnAccountInvariantViolation.

