# How Axiom works

Axiom consists of two main technical pieces:

*   The `AxiomV0` smart contract which stores Merkle roots of Ethereum block hashes, in batches of 1024. The `AxiomV0` contract will only accept and store a batch of blocks if:

    * A ZK SNARK verifies that the hashes of block headers form a commitment chain.
    * The most recent block in the chain has a hash that is either already in the `AxiomV0` cache or is [directly accessible](https://docs.soliditylang.org/en/v0.4.24/units-and-global-variables.html#block-and-transaction-properties) within the smart contract (one of the 256 most recent blocks).

    In this way `AxiomV0` ensures that it only stores commitments to block hashes that are trustlessly verified.
* The `AxiomV0StoragePf` smart contract which allows batch verification of arbitrary historic Ethereum storage proofs against the root of trust given by block hashes cached in `AxiomV0`.

On top of this initial release of Axiom, applications can apply verified compute primitives like basic analytics (sum, count, max, min) and cryptographic operations (signature verification, key aggregation) on the imported historic data.  All Axiom circuits are implemented in the [halo2](https://github.com/privacy-scaling-explorations/halo2) proof system and open-sourced at [https://github.com/axiom-crypto](https://github.com/axiom-crypto).

**Warning:** Our circuits and smart contracts are currently **unaudited** and intended only to illustrate use cases for Axiom. They **should not** be relied upon for production usage or value transfer.
