Recent developments in zero-knowledge proofs represent a fundamental advance in the programmability of cryptography. The resulting ability to trustlessly perform computation is one of the most powerful techniques for scaling blockchains and enabling more full-featured user experiences. Unfortunately, they remain forbidding for smart contract developers to implement and use. As a result, the promise of ZK has yet to be realized in live applications at scale.
To give developers access to the power of ZK, we are building Axiom, a ZK coprocessor for Ethereum which provides smart contracts trustless access to all on-chain data and arbitrary expressive compute over it. Like GPUs do for CPUs today, Axiom augments the capabilities of standard blockchain consensus with zero-knowledge proofs. Smart contracts query Axiom for functions of historic on-chain data like they query oracles today, and we deliver ZK-verified results on-chain for trustless downstream use.
ZK opens the door to new and qualitatively different types of on-chain capabilities which are not currently possible. Beginning with access to historic data and complex compute, Axiom's mission is to make these as accessible and easy to use as possible in on-chain applications. We believe these capabilities can unlock a new wave of richer and more expressive trust-minimized decentralized applications, and we are building Axiom to empower developers to build them.
What does Axiom do?
Developers can access historic on-chain data and perform verified compute over it by making queries into Axiom. Axiom fulfills these queries in three steps:
- Read: Axiom uses ZK proofs to trustlessly prove the correct values of block headers, states, transactions, and receipts from any historical block on Ethereum. Together, these comprise the entirety of Ethereum on-chain data.
- Compute: Once data has been ingested, Axiom applies verified compute primitives on top. This can include diverse operations ranging from basic analytics (sum, count, max, min) to cryptographic operations (signature verification, key aggregation) and machine learning (decision trees, linear regression, neural network inference). The validity of each piece of compute is verified in a ZK proof.
- Verify: Axiom accompanies the result of each query with a ZK validity proof that (1) the input data was correctly fetched from the chain and (2) the compute was correctly applied. After on-chain verification of the ZK proof in the Axiom smart contract, the final result is trustlessly available for use by any downstream smart contract.
Because it reads from raw Ethereum data, Axiom can interoperate with any on-chain system, including base layer Ethereum as well as rollups. This means Axiom can provide ZK-based enhancements for decentralized applications without requiring them to migrate state. This new capability unlocks a dimension to scaling blockchain compute which is complementary to existing solutions like rollups.
How do I use Axiom?
Axiom provides two capabilities -- historic data access and verifiable compute. The first version of Axiom gives self-serve access to historic data, and we are partnering directly with protocols to develop trustless compute primitives on top of this data. To illustrate how to use Axiom, we are launching a demo on Ethereum mainnet at demo.axiom.xyz. Our demo app enables users to:
- Prove account age: Users can trustlessly prove the block number at which their account made its first transaction.
- Prove Uniswap v2 TWAP values: Users can prove the TWAP of the ETH-USD Uniswap v2 pool between any two historic blocks on-chain without checkpointing.
- Access RanDAO randomness: Users can access the randomness generated by the Ethereum Consensus Layer and available to the Execution Layer in the
prevRandaoblock header field.
To integrate Axiom into your own application, you can trustlessly access historic Ethereum states using our custom access demo. We provide an API endpoint to generate a ZK proof to access several slots in the account storage of a single address. In other words, we prove the claim
addressat block number
blockNumber, the values at slots
slot_1, ..., slot_nwere
val_1, ..., val_n.
This proof can be verified in the
attestSlots function in the
AxiomV0StoragePf smart contract, which then stores the outcome on-chain. After calling this state attestation, any other smart contract can use this verified historical state trustlessly.
We have open-sourced the ZK circuit and smart contracts behind our demo at github.com/axiom-crypto. Because all ZK proofs in Axiom are verified on-chain, developers only need to verify that our circuits are correct to rely on results given by Axiom.
Warning: These demos are unaudited and intended only to illustrate use cases for Axiom. They should not be relied upon for production usage or value transfer.
What can I use Axiom for?
Axiom can be useful for any protocol or dapp where historical on-chain data or expressive compute plays a role. A few early applications we envision include:
- Trustless accounting: Protocols for decentralized validation (Lido, Rocket Pool, Obol, SSV), asset management (Aera, Set), or data availability provision (EigenLayer) require accessing historic actions of operators and computing complex payout functions. For example, a liquid Ethereum staking protocol could use Axiom to access historic validator signatures and compute track records by verifying them. Similarly, an asset management protocol could use Axiom to evaluate strategy performance based on their entire performance trajectory.
- Dynamic DeFi: We believe efficient financial transactions require access to extensive compute over historic data, which we envision Axiom providing for DeFi. For example, Axiom could give a lending protocol access to the average rate offered by a competitor or the worst recent collateral ratio, allowing it to update risk parameters and price competitively. Similarly, an AMM could adjust fees based on Axiom-provided estimates of recent market volatility.
- Trustless off-chain governance: Off-chain governance voting (as in Snapshot) relies on multisigs to implement decisions on-chain, which has already led to censorship of decisions the multisig opposes. With Axiom, the entire governance process can be verified in a ZK proof on-chain, from importing governance weights to checking validity of votes. This gives off-chain governance the same guarantees of on-chain governance without the costs.
- Trustless on-chain oracles: Many protocols use centralized oracles to query data which is already trustlessly committed to on-chain. This includes gas price (Alkimiya) or NFT transaction data (NFT lending protocols like Metastreet). Axiom replaces these centralized oracles with a fully trustless solution, thus avoiding undue dependence on oracle operators.
We are always eager to hear about ideas for new applications using Axiom. DM us on Twitter, discuss on Discord, or fill out our early partner interest form if you have an idea you'd like to brainstorm with us!
Our mission is to unleash the power of ZK for crypto applications. This initial release of Axiom gives blockchain applications access to more data and more expressive compute, but it is only the first step. We believe blockchain applications have an unlimited appetite for data and compute, and as ZK technology evolves, we will continue to empower smart contract developers with additional capabilities at greater scale. In the coming weeks, we will release more information about how Axiom works, the ZK technology underlying Axiom, and our roadmap.
In the meantime, if you are a developer and would like to build on Axiom, we are looking for early integration partners! To discuss possible applications or learn more:
- Check out our live demo at demo.axiom.xyz and docs at docs.axiom.xyz.
- DM us on Twitter (@axiom_xyz), come chat on Discord, or fill out our interest form. We'd love to support your dapp!
If you'd like to join us in empowering smart contract developers with ZK:
- We are hiring developers to join us in tackling the hard technical problems necessary to develop, scale, and optimize Axiom. Check out our jobs page here or reach out directly at email@example.com.
- If you want to get straight to the code, check out our Github repos. We are open to extensions or contributions!