Veilify uses gas abstraction. Relayers pay gas for private operations and are reimbursed from your veiled balance. After your first deposit, your wallet needs no ETH.

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:
The fee rate in force when the gatekeeper approves (deposit) or the pool executes (withdrawal) is the one charged.

How the relayer fee works

  1. The proxy estimates gas for the operation.
  2. It multiplies by the current gas price, with a buffer.
  3. The fee and fee token become public inputs of the proof.
  4. The contract pays exactly that fee to the relayer (msg.sender).
  5. The fee is deducted from your veiled balance into a fee change note.
A fee-paying operation must be submitted by an allowlisted relayer. A zero-fee operation can be submitted by anyone, including you.

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