dYdX is a decentralized exchange that operates on StarkEx. StarkEx is a ZK rollup that posts batches of transactions to Ethereum with zk-STARK proofs. The dYdX Dune query can be found here.
The query filters transactions sent to the dYdX GpsStatementVerifier contract addresses that invoked the verifyProofAndRegister function from the dYdX L2 on-chain operator contract.
The proof volume is the sum of verifyProofAndRegister function calls from the L2 operator
The cost is calculated using the following formula:
Where:
is the amount of gas consumed by a trace in one of the verifiers
is the price of gas on the day of the transaction
is the average price of ETH in USD on the day of the transaction