Cointime

Download App
iOS & Android

Enshrine AI into EVM

From Ethresearch Blog by axonon

Introducing Axonum: The Brain of Ethereum

Axonum enshrines AI into blockchain to build a decentralized supercomputer powered by global collective intelligence.

The Age of AI EVM

We are building Axonum, an AI optimistic rollup, with the world’s first AI EVM.

We aim to democratize access to AI-powered DApps, making AI model inferences both accessible and user-friendly.

Axonum is an optimistic rollup with enshrined AI powered by opML and AI EVM. It enables users to seamlessly employ AI models natively within smart contracts without being encumbered by the intricacies of underlying technologies.

Overview

AI EVM: Enshrined AI

To enable native ML inference in the smart contract, we need to modify the execution layer of the layer 2 chain. Specifically, we add a precompiled contract inference in EVM to build AI EVM.

AI EVM will conduct the ML inference in native execution and then return deterministic execution results. When a user wants to use the AI model to process data, all the user needs to do is to call the precompiled contract inference with the model address and model input, and then the user can obtain the model output and use it natively in the smart contract.

import "./AILib.sol"; contract AIContract { ... function inference(bytes32 model_address, bytes memory input_data, uint256 output_size) public { bytes memory output = AILib.inference(model_address, input_data, output_size); emit Inference(model_address, input_data, output_size, output); } }

The models are stored in the model data available (DA) layer. All the models can be retrieved from DA using the model address. We assume the data availability of all the models.

The core design principle of the precompiled contract inference follows the design principles of opML, that is, we separate execution from proving. We provide two kinds of implementation of the precompiled contract inference. One is compiled for native execution, which is optimized for high speed. Another is compiled for the fraud proof VM, which helps prove the correctness of the opML results.

For the implementation for execution, we re-use the ML engine in opML. We will first fetch the model using the model address from the model hub and then load the model into the ML engine. ML engine will take the user’s input in the precompiled contract as the model input and then execute the ML inference task. The ML engine guarantees the consistency and determinism of the ML inference results using quantization and soft float.

Besides the current AI EVM design, an alternative approach to enable AI in EVM is adding more machine learning-specific opcodes into EVM, with corresponding changes to the virtual machine’s resource and pricing model as well as the implementation.

Optimistic Rollup

opML (Optimistic Machine Learning) and optimistic rollup (opRollup) are both based on a similar fraud-proof system, making it feasible to integrate opML into the Layer 2 (L2) chain alongside the opRollup system. This integration enables the seamless utilization of machine learning within smart contracts on the L2 chain.

Just like the existing rollup systems, Axonum is responsible for “rolling up” transactions by batching them before publishing them to the L1 chain, usually through a network of sequencers. This mechanism could include thousands of transactions in a single rollup, increasing the throughput of the whole system of L1 and L2.

Axonum, as one of the optimistic rollups, is an interactive scaling method for L1 blockchains. We optimistically assume that every proposed transaction is valid by default. Different from the traditional L2 optimistic rollup system, the transaction in Axonum can include AI model inferences, which can make the smart contracts on Axonum “smarter” with AI.

In the case of mitigating potentially invalid transactions, like optimistic rollups, Axonum introduces a challenge period during which participants may challenge a suspect rollup. A fraud-proving scheme is in place to allow for several fraud proofs to be submitted. Those proofs could make the rollup valid or invalid. During the challenge period, state changes may be disputed, resolved, or included if no challenge is presented (and the required proofs are in place).

Workflow

workflow2443×1437 183 KB

Here’s the essential workflow of Axonum, without considering mechanisms such as pre-confirmation or force exit:

  1. The basic workflow begins with users sending L2 transactions (we allow native AI inference in the smart contract) to a batcher node, usually the sequencer.
  2. Once the sequencer receives a certain number of transactions, it will post them into an L1 smart contract as a batch.
  3. A validator node will read these transactions from the L1 smart contract and execute them on their local copy of the L2 state. As for the AI inference execution, the validator needs to download the model from model DA and conduct the AI inference within the opML engine.
  4. Once processed, a new L2 state is generated locally and the validator will post this new state root into an L1 smart contract. (Note that this validator can also be the sequencer.)
  5. Then, all other validators will process the same transactions on their local copies of the L2 state.
  6. They will compare their resultant L2 state root with the original one posted to the L1 smart contract.
  7. If one of the validators gets a different state root than the one posted to L1, they can begin a challenge on L1.
  8. The challenge will require the challenger and the validator who posted the original state root to take turns proving what the correct state root should be. This challenge process is also known as fraud proof. The fraud proof of Axonum includes the fraud proof of L2 state transition and the fraud proof of opML.
  9. Whichever user loses the challenge, gets their initial deposit (stake) slashed. If the original L2 state root posted was invalid, it will be destroyed by future validators and will not be included in the L2 chain.

Fraud Proof Design

The core design principle of the fraud proof system of Axonum is that we separate the fraud proof process of Geth (the Golang implementation of the Ethereum client on layer 2) and the opML. This design ensures a robust and efficient fraud proof mechanism. Here’s a breakdown of the fraud proof system and our separation design:

  1. Fraud Proof System Overview:The fraud proof system is a critical component that guarantees the security and integrity of transactions on the Axonum optimistic rollup Layer 2.It involves the verification of transactions and computations to ensure that any malicious behavior or inaccuracies are detected and addressed.
  2. The fraud proof system is a critical component that guarantees the security and integrity of transactions on the Axonum optimistic rollup Layer 2.
  3. It involves the verification of transactions and computations to ensure that any malicious behavior or inaccuracies are detected and addressed.
  4. Separation of Fraud Proof Processes:Geth Fraud Proof Process:Geth, responsible for the Ethereum client on layer 2, handles the initial stages of fraud proof related to transaction validation and basic protocol adherence.It verifies the correctness of transactions and ensures that they comply with the rules and protocol of the layer 2 system.opML Fraud Proof Process:opML, the Optimistic Machine Learning system integrated with Axonum, takes charge of the more intricate aspects of fraud proof related to machine learning model execution.It verifies the correctness of machine learning computations and ensures the integrity of AI-related processes within the layer 2 framework.
  5. Geth Fraud Proof Process:Geth, responsible for the Ethereum client on layer 2, handles the initial stages of fraud proof related to transaction validation and basic protocol adherence.It verifies the correctness of transactions and ensures that they comply with the rules and protocol of the layer 2 system.
  6. Geth, responsible for the Ethereum client on layer 2, handles the initial stages of fraud proof related to transaction validation and basic protocol adherence.
  7. It verifies the correctness of transactions and ensures that they comply with the rules and protocol of the layer 2 system.
  8. opML Fraud Proof Process:opML, the Optimistic Machine Learning system integrated with Axonum, takes charge of the more intricate aspects of fraud proof related to machine learning model execution.It verifies the correctness of machine learning computations and ensures the integrity of AI-related processes within the layer 2 framework.
  9. opML, the Optimistic Machine Learning system integrated with Axonum, takes charge of the more intricate aspects of fraud proof related to machine learning model execution.
  10. It verifies the correctness of machine learning computations and ensures the integrity of AI-related processes within the layer 2 framework.
  11. Benefits of Separation Design:Enhanced Efficiency:By distributing the fraud proof responsibilities, we optimize the efficiency of the overall system. Geth focuses on transactional aspects, while opML handles ML-specific fraud proofs.Scalability:The separation design allows for scalability, enabling each component to independently scale based on its specific processing requirements.Flexibility:This separation provides flexibility for upgrades and improvements in either the Geth or opML components without compromising the entire fraud proof system.
  12. Enhanced Efficiency:By distributing the fraud proof responsibilities, we optimize the efficiency of the overall system. Geth focuses on transactional aspects, while opML handles ML-specific fraud proofs.
  13. By distributing the fraud proof responsibilities, we optimize the efficiency of the overall system. Geth focuses on transactional aspects, while opML handles ML-specific fraud proofs.
  14. Scalability:The separation design allows for scalability, enabling each component to independently scale based on its specific processing requirements.
  15. The separation design allows for scalability, enabling each component to independently scale based on its specific processing requirements.
  16. Flexibility:This separation provides flexibility for upgrades and improvements in either the Geth or opML components without compromising the entire fraud proof system.
  17. This separation provides flexibility for upgrades and improvements in either the Geth or opML components without compromising the entire fraud proof system.

Axonum: The Brain of Ethereum

Axonum is the first AI optimistic rollup that enables AI on Ethereum natively, trustlessly, and verifiably.

Axonum leverages optimistic ML and optimistic rollup and introduces innovations of AI EVM to add intelligence to Ethereum as a Layer 2.

We enshrine AI into blockchain to build a decentralized supercomputer powered by global collective intelligence.

Learn more about Axonum: https://docs.axonum.io 5Bridge to Axonum Sepolia: https://app.axonum.io/bridge/depositAdd Axonum Sepolia to MetaMask: Add Axonum

Comments

All Comments

Recommended for you

  • Philippines central bank approves peso stablecoin pilot

    The Philippines central bank has authorized Coins.ph to initiate a pilot program for a new Philippine Peso-backed stablecoin, PHPC, under its Regulatory Sandbox Framework. This pilot aims to integrate PHPC into significant remittance channels to enhance the efficiency of transactions within the substantial Philippine remittance market. Coins.ph plans to launch the stablecoin by early June, following comprehensive real-world application testing to potentially achieve full regulatory approval.

  • The Sonne Finance hacker address has exchanged 56 WBTC into about 1,185 ETH

    According to PeckShield's monitoring, Sonne Finance hacker address 0x6277...4c07 has exchanged 56 WBTC for approximately 1,185 ETH and 3 WBTC for 183,000 DAI.

  • ECB Governing Council: We are likely to start cutting interest rates in June

    ECB committee member Villeroy stated that it is very likely that we will begin cutting interest rates in June.

  • Former FTX executive Ryan Salame asks court for leniency, sentences him to 18 months in prison

    According to a sentencing memorandum submitted on Tuesday, former FTX executive Ryan Salame pleaded guilty in September of last year to conspiring to make illegal political contributions and conspiring to operate an unlicensed money transmission business. His lawyer requested leniency from the court and for him to serve an 18-month sentence. While working at FTX and Alameda, Salame managed wire deposits and fiat currency exchanges for FTX clients, used Alameda funds to make political contributions, and led charity efforts in the Bahamas.

  • Hong Kong police arrested a 1 million USDT fraud gang and seized 3,000 ghost coins

    According to a report from Sing Tao Daily, Hong Kong police received a report from a 35-year-old man on April 12th, claiming that he was unable to recover cash after reselling approximately 1 million yuan worth of virtual currency USDT in a shop in Tsim Sha Tsui and suspected that he had been deceived.After an investigation by the Technology and Wealth Crime Group of the Yau Tsim Police District, the police launched an operation in multiple areas of Hong Kong on May 13th and arrested three local men aged between 31 and 34 years old, who were suspected of obtaining property by deception.The police found 3,000 fake banknotes, a money clip and a counting machine in the shop. The investigation showed that the arrested men showed the victim fake banknotes and asked him to transfer virtual currency to a designated wallet, and then refused to hand over the cash for various reasons, resulting in the victim losing approximately 1 million yuan worth of virtual currency.

  • Yesterday, Tether issued $110 million USDT and redeemed $23 million USDT

    According to ChainArgos monitoring, on May 14th, Tether issued a total of 110 million USDT and redeemed 23 million USDT.

  • El Salvador Launches Bitcoin-Based Financing for New Airport Hotel

    El Salvador has launched the announcement of Bitcoin financing for the vacation hotel at San Salvador International Airport, with a target financing goal of $6.25 million. The funds will be used to build a five-story facility covering 4,484 square meters, with 80 guest rooms, commercial space, swimming pool, and other facilities. The hotel is located inside the airport, making it the only hotel service provider in the area. The minimum investment amount for this investment opportunity is $1,000, with 6,250 tokens available for selection, each token paying a 10% annual yield every six months. The project is supervised by Inversiones Laguardia SA de CV and promoted through Bitfinex Securities.

  • US Bitcoin ETF holds nearly $60 billion worth of BTC

    As monitored by HODL15Capital, the value of Bitcoin held by US Bitcoin ETFs is currently close to $60 billion. This week, a total of 2,667 Bitcoins were purchased. Grayscale GBTC is the only ETF with net outflows.

  • Sonne Finance: This attack was a donation attack. We are investigating the attacker and have suspended the market.

    Sonne Finance released an attack analysis report. This was a donation attack. Sonne had avoided this problem in the past by adding a collateral factor of 0% to the market, adding collateral and then destroying it, and only then increasing c-factors according to the proposal. Sonne recently passed a proposal to add the VELO market to Sonne. This transaction was arranged on a multi-signature wallet, and c-factors were arranged to be executed within 2 days due to the time lock. When the 2-day time lock for creating the market ended, the attacker executed 4 of the transactions and then executed the transaction to add c-factors to the market. The attacker was able to use the protocol to obtain approximately $20 million in funds through a known donation attack. Seal contributors quickly noticed this issue and reserved approximately $6.5 million by adding VELO worth approximately $100 to the market. Sonne is investigating the attacker and has suspended the market to mitigate further losses. Sonne is prepared to offer a bounty to the attacker and promises not to pursue the issue further if the attacker returns the funds.

  • Sonne Finance confirms attack, but still has about $6.5 million in funds

    On May 15th, Sonne Finance announced that its Optimism protocol had suffered a known donation attack, resulting in a loss of approximately $20 million. The attack exploited a vulnerability in the newly launched market and within two days of its creation, the attacker used a multi-signature wallet and time-lock function to execute critical transactions, successfully manipulating the market's collateral factors (c-factors). Despite Sonne's team quickly organizing a response to the attack and suspending the market within 25 minutes of discovering the issue to minimize further losses, approximately $6.5 million in funds were still retained. Sonne's team is working hard to track down the identity of the attacker and has offered a bounty to the attacker in the hopes of returning the funds to avoid further investigation. At the same time, Sonne's team sincerely apologizes for this incident and is reaching out to all possible partners to try to recover the funds.