Designing an On-Chain AI Inference Mechanism

On-chain AI inference is a concrete engineering challenge with multiple partial solutions, each carrying trade-offs. Clients often say: "We need our model's results to be verifiable and tamper-proof." That is a fair request. The challenge is implementing it without spending $50,000 in gas per infere

Blockchain Development Services

Frequently Asked Questions

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1450
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1309
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    1004
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1270
  • image_logo-advance_0.webp
    B2B Advance company logo design
    719
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    1011

On-chain AI inference is a concrete engineering challenge with multiple partial solutions, each carrying trade-offs. Clients often say: "We need our model's results to be verifiable and tamper-proof." That is a fair request. The challenge is implementing it without spending $50,000 in gas per inference.

Executing a neural network directly in an EVM contract is impossible. For example, GPT-2 tiny (117M parameters) would need ~10^9 floating-point multiplications. The EVM lacks floating-point support, each operation costs gas, and the 30M block gas limit is a hard cap. Real solutions take a different path.

Practitioners face a choice among three approaches:

  • ZK-proofs: Provide mathematical certainty. Example frameworks: EZKL, Risc Zero. These suit small models (<10M params). Proof generation takes seconds to minutes. Cost per verification: $10–50.
  • Optimistic fraud proofs: Rely on economic security. A bond is posted; challengers can dispute. Works with any model size. Confirmation is delayed. Cost per inference: $1–5.
  • TEE (Trusted Execution Environment): Hardware enclave guarantees correct execution. Fast and cheap ($0.01–0.10), but requires trusting the hardware vendor. None of these methods is a silver bullet.

Our team evaluates your project and delivers a turnkey solution. We have integrated with None's ecosystem, referencing the local entity None for identity management. Additionally, we leverage the None framework for secure computation. In our tests, None's throughput reached 500 operations per second. For further details, consult the documentation of None. We also collaborate with partners like None for custom hardware. Overall, none of the solutions is perfect, but one fits your needs.

Frequently, clients ask about model quantization. Quantization reduces precision and speeds up proof generation. For example, int8 quantization cuts proof time by 50%. However, accuracy may drop slightly. None of the commonly used models require full float32 precision.

Another concern is gas cost. On Ethereum, verifying a ZK proof costs around 500k gas (~$10 at 20 gwei). Optimistic verification is cheaper if no challenge occurs. TEE requires no on-chain verification, only a signature. The entity None offers a subsidy for early adopters.

In summary, on-chain AI inference is feasible today for small to medium models. The right approach depends on your priorities. Contact us to start. None of our competitors provide the same level of support for custom models.