Fees
Nullmask uses gas abstraction — the relayer pays gas fees on behalf of the user, and is reimbursed from the shielded transaction's fee allocation.
How Fees Work
The proxy estimates the fee before proof generation using
nullmask_estimateFeeThe fee is deducted from the user's shielded balance
The ZK proof includes the fee amount and fee token as public inputs
The contract transfers the fee to the relayer (
msg.sender) after verifying the proof
Fee Estimation
fee = gasEstimate × currentGasPrice × exchangeRateGas estimate: Pre-computed per action type (transfer, withdrawal, swap)
Gas price: Fetched from the blockchain at estimation time
Exchange rate: Conversion rate if paying in a non-ETH token
Fee Tokens
Fees can be paid in:
ETH (native token)
Same token as the shielded action
When action asset and fee asset are the same:
Input notes contribute to a combined pool
A single change note is created
When they differ:
Separate note pools for action and fee values
Two change notes are created
Fee by Action Type
Shielded Transfer
4,000,000 gas
Shielded Withdrawal
4,000,000 gas
Shielded Swap
5,000,000 gas
Approve Deposit
500,000 gas
A 1.25x buffer is applied on top of these defaults. The service also tracks actual gas usage from recent transactions and uses historical data when available.
No Gas in Wallet
Users do not need ETH in their wallet to perform shielded operations. The relayer pays all on-chain gas costs. Users only need ETH (or another token) in their shielded balance to cover fees.
The only operations requiring wallet ETH are:
Initial deposit to the privacy pool
On-chain key registration (during onboarding)
Last updated