Gas Cost for Encrypted Gates

On what technical basis are the gas costs for encrypted operations (Gas estimation | fhEVM) determined in Zama’s fhEVM? Specifically, how does Zama set the gas costs for encrypted gates and computations, as described in the official fhEVM gas documentation?"

11 Likes

Hey!

The documentation you’re referring to is now outdated with the new protocol coming in few days. In the new version of Zama’s FHEVM, we have moved away from the traditional gas-per-block model and introduced a new system based on Homomorphic Computation Units (HCUs).

In the updated protocol, gas is no longer metered per block. Instead, each transaction has its own HCU limit, which better aligns with the computational requirements of FHE operations.

Each encrypted operation is benchmarked on a dedicated coprocessor machine. The execution time of each operation is then used to determine its HCU cost. This approach ensures that pricing reflects real compute time.

5 Likes

Are they any references of cost model in terms of HCU units , Could you kindly point me to those?

6 Likes