Links

Fees

A $0.10 stable fee is added to each transaction* and paid with BOB tokens. You DO NOT need any native (MATIC) tokens to deposit, transfer, or withdraw from zkBob. All tx fees are $0.10 and paid using BOB.
Fees cover the cost of transactions in most situations (see below) and can result in a surplus depending on gas and token prices. BOB accumulates with the fee receiver and is periodically withdrawn, swapped for native tokens, and sent to the relayer to subsidize future transaction costs. Relayers do not keep any profits from extra fees - all collected fees are used to support the protocol.
*In special cases, transactions may incur additional fees when many notes need to be processed at the same time. Learn more.

Transaction costs

Exact tx fees are calculated as the cost of the calldata for an operation (deposit, transfer, withdrawal) multiplied by the gas price and the token price. Tx gas examples:
To calculate a baseline for any operation, we take the highest gas cost (deposit) + 15% buffer = 902,000 gas.
Max Fee baseline = 902,000 * gas price * token price
Fees can vary significantly based on the gas price and token price at the time of a transaction. In this table, the top row shows example USD equivalent token prices ($0.35 to $1.05) and the left column shows varying gas costs ranging from 30 to 100 gwei. These are multiplied with 902,000 to calculate the cost for a max transaction.
$0.35
$0.80
$1.05
30 gwei
$0.009
$0.02
$0.03
75 gwei
$0.02
$0.05
$0.07
100 gwei
$0.03
$0.07
$0.1

Fee Collection

Fees are currently collected internally within the pool contract and the accumulatedFee method. They can be manually withdrawn by a separate operator account (a specified account called the fee recipient) rather than a primary relayer account. This maintains safety in the protocol as a primary relayer is responsible for sending transactions and should not have the ability to call the withdrawFee function.
Once enough BOB has accumulated, it can be withdrawn and swapped for native (MATIC) tokens. These are then sent to the primary relayer to cover gas fees for future operations.

View Accumulated Fees

Anyone can view current fees accumulated by the protocol. This does not represent all fees collected, but only those accumulated since the previous withdrawal.
1) Go to the pool proxy contract on Polyscan and click the Read as Proxy tab.
2) Query the accumulatedFee method using the Relayer (Operator) Address 0xc2c4ad59b78f4a0afd0cdb8133e640db08fa5b90.
3) Convert the result (in gwei) to USD using Ethereum Unit Converter. Since BOB is a stable token, the Ether amount will be USD equivalent (in the case below $13.70 BOB is currently accumulated in the contract).