Skip to main content
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.
Every division rounds down. Both quotes run against the user. L is priced at P + c, above its NAV, and S at K / (P - c) * γ, above its NAV too, so the user gets slightly fewer of each. state_mult is 150 (1.5×) in ProxyMode; the other states are in the risk-state table. A worked example: 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. 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 live markets have it on (read on chain, 13 Oct 2026).

Fees

The keeper posts one fee per market and writes it to both mint_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 live markets run 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 risk-state multiplier. In ProxyMode, which every devnet market is in, that is 1.5×, so QQQ’s 18 bps is charged as 27 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

Outside Normal 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

For a full script with wallet setup, see Mint and redeem example.

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

These multipliers are surcharges. No state discounts the fee, and there is no size throttle outside Stress. risk_state_updated_at changes only when the state does, so the Recovery multiplier keeps falling while the keeper pushes prices. See Risk states.

What you receive

The program then emits 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.