Deposits are free
- The deposit instruction no longer takes a fee. The full deposited amount is credited to the shielded vault and bound into your note commitment (the C1 deposit-binding proof now pins the full amount, not a post-fee value). The per-pool token fee vault is no longer touched on deposit.
The percentage fee moved to withdrawal
- A new global
Config.withdraw_fee_bps(default 0, recommended 23 bps = 0.23%, capped at 100 bps) is charged at withdraw time in the withdrawn asset and accrues to the pool's token fee vault — reusing the existing permissionless sweep path. - The fee is bound inside the withdraw circuit:
JoinSplitnow provesΣ inputs = Σ outputs + fee_amount + change, withfee_amounta new public input. The on-chain handler recomputesfloor(total_out * withdraw_fee_bps / 10_000)from the configured rate and rejects any proof whose boundfee_amountdoesn't match (FeeMismatch). The relayer cannot tamper with the fee. - This required a withdraw-circuit recompile, a fresh trusted-setup phase-2 ceremony, and a re-embedded verifying key. The public-input count went from 13 to 14, updated in lockstep across the circuit, the on-chain
WithdrawPublicInputs, the relayer request schema, and the web client.
Both withdraw fees are admin-tunable
Config.withdraw_fee_bpsis settable via the newset_withdraw_fee_bpsinstruction; the flatConfig.withdraw_fee_lamportsremains settable viaset_withdraw_fee. Both are capped on-chain (1.00% and 0.1 SOL respectively) and adjustable without a program redeploy. The admin dashboard's Fees page now reads both live rates and exposes inputs to change them.CONFIG_VERSIONis now 4. Pre-v4 config accounts are realloc'd and zero-initialized (fee-free) on the firstset_withdraw_fee_bps(orset_withdraw_fee) call; turn on the recommended rate withset-withdraw-fee-bps.ts --bps 23as an explicit launch step.
What this means for you
- Funding the pool now costs nothing — you only pay when value actually leaves the shielded set. A round-trip costs about the same as before, just shifted to the exit. See /docs/fees for worked examples.