msfew

发布于 2024-03-25到 Mirror 阅读

So You Wanna Build with Onchain AI?

TL;DR

  • With ORA, you can build onchain AI with zkML of keras2circom, opML of AI Oracle, and zk+opML with opp/ai.

  • ORA’s OAO enables any AI model such as Grok, Stable Diffusion, and LlaMA2 on Ethereum mainnet.

  • We put together 10+ tracks of project ideas to build with ORA’s Onchain AI Oracle.

  • The most valuable use case is you can rebuild the whole blockchain protocol space with Onchain AI Oracle.

0. Build with ORA’s Onchain AI

While Onchain AI Oracle (OAO) is currently powered by opML (optimistic machine learning), ORA’s technology offers alternatives to enable AI onchain. OAO is robust and production-ready.

In the following sections, we will hone in on the ideas to build with OAO.

1. OAO on Ethereum Mainnet

a) Introduction

OAO is the world’s first AI oracle. OAO enables anyone to use onchain AI inference on any blockchain. For now, it resides on Ethereum: the first chain where smart contracts can be powered by artificial intelligence.

OAO uses opML to create a verifiable proof for ML (machine learning) computations that is feasible to be verified on the blockchain, opening up new possibilities for using AI and GenAI inference in blockchain ecosystems. ORA invented the framework opML, which is comparable to how optimistic rollups work on Ethereum, such as Optimism and Arbitrum.

b) AI on Ethereum Mainnet with OAO

ORA’s OAO is now live on mainnet! Developers, protocols, and dApps can use it to interact with real mainnet value with AI. This is a momentous innovation for both the AI and Blockchain markets.

In the month since OAO was released, we've seen 10k+ usages onchain on Ethereum Sepolia and applications such as: AI Intent Engine, 7007, and Limerick.

c) LlaMA2, Grok, and Stable Diffusion in OAO

LlaMA2, Grok, and Stable Diffusion are accessible for use on Ethereum - all in one location: ORA’s OAO (Onchain AI Oracle).

d) Future of OAO: opp/ai (zkML + opML)

ORA has published the opp/ai framework. Opp/ai combines the benefits of opML and zkML, fusing efficiency with privacy as desired. Opp/ai can be customed for integrating zero-knowledge in the use of onchain AI. Opp/ai can also be integrated into ORA’s OAO.

Let us propose some potential use cases and ideas for building on OAO. You are always welcome to join the ORA ecosystem and innovate freely.

3. Ideas to Build with OAO

a) Predictor and Analyzer

The extensive aspect of AI is the same as an oracle machine. Through the model inference, AI can realize any complex calculation. You ask questions; AI gives you the answer.

With OAO, we can leverage AI analysis of complex data and parameters, making AI a predictor for future data and analyzer of existing data. To obtain those historical data, you can use ORA’s zkOracle!

b) Asset Pricing

With OAO, developers can price any onchain or even offchain asset, including Blue Chip Coins, Memecoins, NFT, Onchain Derivatives, or even RWA.

Based on asset pricing as a key component, we can build, for example, a lending protocol for NFT or stablecoin backed by any asset. The role of AI is to increase liquidity and reduce risk.

c) Simulation

In addition to data such as predicted prices, AI can simulate various outcomes. For example, AI can simulate the outcome of a game (losing or winning), the neutron pattern, or the future trend of an asset's price.

d) Credit/Risk Analyzer

We can use AI to analyze the credit and risk of each object:

  • EOA credit, similar to the FICO score in traditional finance, analyzes an account's assets as well as liabilities and activity history to build a fully uncollateralized lending system in crypto.

  • Contract credit and risk, such as analyzing the past "rug" records of contract creators or analyzing contract transaction data to determine the credit level and risk level of a contract.

  • Pool risk, e.g. analyzing whether there is liquidation risk while pricing the assets in the pool through AI.

  • Node / validator’s credit, by analyzing a node’s restaking exposure and historical slashed behaviors.

e) Sentiment Analysis

With AI, we can perform sentiment analysis to generate, for example, a credible Onchain Fear/Greed Index.

In sentiment analysis, we can analyze onchain transactions, gas prices, etc., and draw a more comprehensive conclusion.

f) Trading

There are many scenarios where Onchain AI can be expanded in the trading space.

The core of Onchain AI is to build a powerful trading bot, where the value of “onchain” is to ensure that the logic of the bot can be verified by the chain, so that the user can rest assured that the funds are entrusted to Onchain AI.

Based on this “Onchain AI as Trading Bot” idea, you can further explore:

g) NFT

In NFT scenarios, text-to-image and even text-to-video ML models are particularly effective.

Unique to Onchain AI NFT, the NFT’s generation process is onchain verifiable:

  • In traditional ERC-721 NFT, only the NFT ownership is onchain.

  • In Inscription NFT, both NFT ownership and metadata are onchain.

  • In Onchain AIGC NFT, NFT ownership and AI generation process onchain (kinda like recursive inscription lol).

With OAO, you can build:

  • Pure AIGC NFT, of course with prompt engineering or fine-tuning

  • Loot-style NFT, this one you can use LLM to generate (kinda like using prompt to generate prompt, then you can optionally put the Loot-style text into text-to-image model!)

  • Remixing NFT, refresh the existing NFT collections with AI-powered artwork

In this space, 7007 Lab is exploring this frontier. If you are building on AI x NFT, go talk with them.

h) Game

When it comes to gaming, Onchain AI is capable of many more roles and functions. We're going to be categorizing the ideas based on AI's role in the game.

  • AI as Moderator: Implement text games like Dungeon & Dragon with AI.

  • AI as Governor: Similar to moderator, AI can be the governor of the game that adjust the economy system including loop drop rates of the onchain game.

  • AI as NPC: Let AI be the NPC that has story, emotion, and feeling in onchain games.

  • AI as Opponent: AI can be the opponent to human players in onchain games. For example, glitch/bug report of models, let player to trick AI to perform some action (buy memecoin just like ShillGPT, practice your negotiation skill like ChatNPC or leak their environment variable~), produce the best prompt to achieve AIGC image.

  • AI as Counterparty: Counterparty is a little bit different than opponent. For this case, AI can be the counterparty to human players in settings like card games. Something cool about it is that the difficulty can be adjusted dynamically and verifiably, so that the human player are “lured” to play more.

Traditional games already have extremely deep AI involvement, Onchain Games will be the same, and will of course require Onchain AI.

i) Governance

Onchain AI also has huge role to play in governance.

Often, whales are too busy chasing the next project to check the governance forums every day for new content, or even vote on governance for existing projects. They can delegate governance decisions to the Onchain AI, and let the AI act as a proxy for those decisions.

At the same time, in social application, in order to be decentralized and anti-censorship enough, we need neutral and verifiable AI to review content or block malicious users. Expanding a bit, we can even use AI as consensus to weed out malicious nodes in the blockchain network…

j) Tools & Security

Using AI for assistive gadgets is also very interesting. For example, using Onchain AI to dynamically generate code for a contract or as security add-on.

k) Bring Your Own Model

OAO is currently supporting more models. As a developer, you can try to integrate a line of ML models into opML by using the opML framework, and then OAO can support that one model directly.

OAO already has text-to-video and LLM models. You can try: basic models that commonly used in benchmarks (like linear regression, SVM classification…), and domain-specific models (like black scholes or pricing models for liquidation or lending).

I) Rebuild Everything!

The final use case directions are succinct, but have the greatest value.

Rebuild Everything!

Go through DefiLlama site, and each protocol can be rebuilt, with onchain AI to replace its computation component, to be better.

Rollup, AMM, Lending Protocol, Aggregator, Stable Coin

Use your imagination! Not gonna say more here.

🦾 Build with Us!

“Why build with AI onchain?” Why not!

We've put together these exciting and interesting use cases in awesome-ora. You can use them as inspiration for building your next project.

Share your ideas and tag us on Twitter or Discord. Come build with us!

About ORA

ORA is Ethereum’s trustless AI that enables AI and any-size compute on Ethereum.

ORA breaks down the limitations of smart contracts by offering AI, richer data sources and arbitrary compute so developers can innovate freely.

ORA’s work has been trusted by Compound, Ethereum Foundation, Uniswap, and more.

www.ora.io | x.com/oraprotocol | discord.gg/MgyYbW9dQj