Fee types
Protocol fees have a hard ceiling of 1% (
MAX_PROTOCOL_FEE_BPS = 100). No admin key can set more.Round timing, amount grids, fee rates and gas reserves are dynamic policy. Read them from
veilify_getWithdrawalPolicy at runtime. Do not hardcode them.How protocol fees are computed
Fees are integer basis points, rounded down in your favour:How the relayer fee works
- The proxy estimates gas for the operation.
- It multiplies by the current gas price, with a buffer.
- The fee and fee token become public inputs of the proof.
- The contract pays exactly that fee to the relayer (
msg.sender). - The fee is deducted from your veiled balance into a fee change note.
Round withdrawal gas
Round withdrawals are prepared with fixed gas fields so they can be sent later without a new signature.
If network fees rise above the cap, Round mode is paused (
round_price_above_cap) and queued legs may move to a later round (gas_spike).
These references come from Ethereum mainnet. Robinhood Chain gas is far cheaper, and its fees include an L1 data component. Launch values are calibrated on testnet.
Gas escrow on deposits
The gatekeeper’s gas for approving or rejecting your deposit is paid from an ETH escrow you send with the deposit:- reimbursed at the gas actually used, priced at most
basefee + 3 gwei - plus a fixed settlement overhead (default 45,000 gas; set per chain to include L1 data cost)
- the remainder goes back to you in the same transaction