Use this file to discover all available pages before exploring further.
You can integrate Continuum into your own on-chain program via Cross-Program Invocation (CPI). Common reasons to do this:
A vault program that mints Continuum positions on its users’ behalf.
A structured product that bundles long/short tokens across multiple markets.
An automated portfolio rebalancer that reads NAV and acts.
This page covers the calling patterns. The receiving programs (mint-redeem, clp, etc.) are normal Anchor programs, so any caller that satisfies the account list can invoke them.
Most users don’t need CPI. If your integration is off-chain (a bot, a frontend), you don’t need CPI - you sign transactions directly. CPI is for cases where the protocol you’re building is itself on-chain.Privileged ixns can’t be CPI’d by random callers.keeper_mint_single requires signer == market.keeper_authority. CPI doesn’t change this - your program would need to be the keeper authority to call it. Privileged paths are not designed for general CPI integration.The mint_paired and redeem_paired paths can be CPI’d freely because they have no signer privilege beyond the user’s own signature.
The receiving program treats whoever signed the outer instruction as user. So if your program builds the inner ix correctly, your user’s signature carries through as long as your program passes the user as a signer.Sketch (Rust / Anchor in your own program):
(mint_redeem::cpi types come from declaring the program as a dependency in your Cargo.toml; see Anchor’s CPI docs.)The user signs the outer instruction; the inner CPI inherits that signature. mint_redeem debits user_collateral, mints to user_long and user_short. There’s no PDA-signed CPI required.
If your program holds the collateral (e.g., a vault), then your PDA needs to sign. You’ll need to allocate a PDA whose ATAs hold the collateral and the resulting L+S tokens, and use CpiContext::new_with_signer:
Symmetric to mint. Your program calls mint_redeem::cpi::redeem_paired(cpi_ctx, l_amount, s_amount). Whoever holds the L+S tokens (user or PDA) needs to sign.
keeper_mint_single / keeper_redeem_single - require signer == market.keeper_authority. You’d need to be the keeper authority. Generally, only the canonical keeper has this, and on mainnet it’ll be a multisig.
All clp_* Meteora-proxy ixns - same. CLP authority requirement.
Account list ordering. Anchor’s CPI account context expects a specific order. If you build the account list manually (e.g., from a TypeScript instruction), order must match the IDL’s accounts array exactly.#[account(mut)] correctness. Forgetting to mark accounts mutable in your wrapping context - when they need to be mutated by the inner CPI - produces AccountNotMutable errors. Match the inner program’s account constraints.Compute budget.mint_paired is moderate-CU. Wrapping it adds your program’s overhead. If you bundle multiple Continuum CPIs in one outer ix, you may need to set a compute budget instruction:
import { ComputeBudgetProgram } from "@solana/web3.js";tx.add(ComputeBudgetProgram.setComputeUnitLimit({ units: 600_000 }));
Address Lookup Tables. If your outer ix has > ~30 accounts, use ALTs to avoid the per-tx account limit.