mint_paired(collateral_amount) moves cUSDC from the user into the market’s collateral vault and mints the long (L) and short (S) tokens to the user. After the fee, half the value goes into each leg.
Math
Prices and amounts use 6 decimals (1_000_000 is 1 cUSDC). Every devnet market runs in ProxyMode, where the price P is Market.user_twap_price. Despite its name, that field holds the keeper’s latest spot price, adjusted for corporate actions.
P + c, above its NAV, and S at K / (P - c) * γ(P - c), above its NAV too, so the user gets slightly fewer of each. isqrt is the integer square root, rounded down. age is the chain time now minus the price’s own stamp, twap_updated_at, floored at 0. Since 20 Nov 2026 every live market has band_sigmas_x100 200 and band_horizon_secs 30, so c is oracle_confidence × 2 × sqrt(age / 30 s): 1.414× at 15 s, 2× at 30 s and 4× at 120 s. The risk state plays no part in c. state_mult applies only to a market whose band fields are both 0, and fee_mult is the multiplier stored for the current state in risk_fee_config. The reasoning is on Risk states.
A worked example, from before the 20 Nov 2026 change, when c was oracle_confidence × 1.5 and the fee was 1.5× the posted fee: SPY’s last push before the weekend, at 20:10 UTC on 9 Oct 2026, set P to 778.569999 with oracle_confidence 0.123159 and γ 0.99854103 (SPY’s decay was keeper-posted then, so γ was the same at every price). That gives c = 0.184738, an L quote of 778.754737 and an S quote of 655.818093 (S’s NAV was 655.662481). At those quotes a 1,000 cUSDC mint pays a 24 bps fee of 2.40 cUSDC and receives 0.640509 SPYL and 0.760576 SPYS.
QQQ is the exception. As of 10 Oct 2026 its worst_case_config.enabled is false, so c is 0 and both legs are quoted at NAV. The other 12 markets then live had it on (read on chain, 13 Oct 2026).
Fees
The keeper posts one fee per market and writes it to bothmint_fee_bps and redeem_fee_bps. The value is clamp(fee_mult × half-spread, 10, 100) bps. The half-spread comes from the keeper’s volatility model for that market, and fee_mult defaults to 1.0. As of 13 Oct 2026 the posted fees on the 13 markets then live ran from 10 bps (EUR, GBP, JPY) to 39 bps (TSLA); QQQ posts 18 bps, SPY 16 and NVDA 31.
The program multiplies the posted fee by the multiplier stored for the risk state. Since 20 Nov 2026 that multiplier is 1× in every state on every live market, so a posted 18 bps is charged as 18 bps. The multiplier never lowers a fee.
The dev tax, fee × dev_tax_pct / 100, goes to the fee recipient; dev_tax_pct is 10 on every market (10 Oct 2026). Since 12 Oct 2026 every live market’s fee recipient is the treasury → Addresses → Fee recipient. The other 90% of the fee stays in the collateral vault and counts toward total_collateral, where it backs the market. Nothing waives or discounts it, and donating to a vault earns no waiver.
Price freshness
OutsideNormal state, mint reverts with TwapNotAvailable when user_twap_price is 0 or twap_updated_at is more than 300 seconds old. While the underlying market is closed (nights, weekends and holidays), the keeper normally withholds pushes, so minting stops until trading resumes. Any push restarts the 300-second clock. The bin books trade off-hours instead, and only then.
In Normal state the program reads the price from the market’s oracle account instead. No devnet market runs in Normal.
Accounts
Names are as in Anchor’s TypeScript client.
The program creates no accounts. The app adds an idempotent ATA creation for each leg in front of every mint, and the sample below does the same. The cUSDC account must exist and hold the amount. The program doesn’t check the balance, so a short balance fails inside the SPL Token transfer.
TypeScript
Minimum mint size
collateral_amount must be at least 10 cUSDC (10_000_000 base units). A smaller amount, zero included, fails with BelowMinimum.
Errors
See the full error catalog.
Behavior across risk states
| Risk state | Price | Mint | |---|---|---|---| |Normal | The market’s oracle account | Allowed |
| ProxyMode (every devnet market) | user_twap_price, at most 300 s old | Allowed |
| Stress | user_twap_price, at most 300 s old | Blocked by default |
| Recovery | user_twap_price, at most 300 s old | Allowed |
The state picks the price and whether mint is open. It does not change the fee or the band: the fee is the posted fee and the band follows the age of the price. There is no size throttle outside Stress. See Risk states.
What you receive
PairedActionExecuted with action 0, the amounts minted, fee_amount and dev_tax.
L and S are classic SPL tokens with 6 decimals and no freeze authority. You can transfer them, trade them on the bin books, or hold them in other programs. There is no lockup.
See also
Redeem
The inverse: burn both legs and receive cUSDC.
End-to-end TypeScript example
A full script with wallet setup, IDL load, mint and verify.

