Near Protocol vs Internet Computer on Ai app creator

All these discussions are good to have, but I can’t help thinking you guys are missing the point (or Dom’s point). This commenter on X got it:

Near, etc. are all missing the “self sovereign” smart contract part, which is the key to the revolution that Dom envisioned. Dom also said a new version of Motoko will enter the next level of orthogonal persistence, which will be a core part of the AI play.

3 Likes

Where does the data exist then if not on-chain? If it exist off-chain, then you don’t own it.

On-Chain Storage

Refers to storing data directly on the blockchain. This means that the data is recorded in the blockchain’s ledger and is accessible to all participants on the network. This approach has several advantages, including transparency and immutability. Since the data is recorded on the blockchain, it is publicly accessible and cannot be tampered with. Additionally, on-chain storage allows for decentralized access to the data, which can be beneficial for certain types of applications.

User-owned data on-chain refers to the idea that users have control and ownership over their personal data, which is stored on a blockchain. This allows users to have full control over who has access to their data and how it is used.

One of the key benefits of user-owned data on-chain is that it allows for increased data privacy and security. Because data is stored on a decentralized and immutable ledger, it is much more difficult for unauthorized parties to access or tamper with the data. Additionally, because users have control over their data, they can choose to share it only with those they trust, rather than having to rely on centralized organizations to protect their data.

Source: Blockchain Data Storage Dilemma: On-chain vs Off-chain | by Cedalio | Medium

Not very smart and not very sovereign…

It seems like we should be optimizing for a hybrid approach. I’m not technically proficient in this domain at all so here’s a GPT response:

Certainly! The discussion revolves around different approaches to integrating AI in decentralized applications and whether to perform AI computations on-chain or off-chain with verification mechanisms. Here’s a breakdown of verifiable agents and trusted execution environments (TEEs) and how they differ from ICP’s fully on-chain approach.

  1. Verifiable Agents:
    Definition: Verifiable agents are AI agents or applications that perform computations off-chain but provide cryptographic proofs that their computations are correct and unaltered. Instead of running everything on-chain, verifiable agents submit only the results of computations along with a proof of correctness.

Mechanism: These proofs, often generated through techniques like zero-knowledge proofs (ZKPs), allow the on-chain system to verify the accuracy of the off-chain work without needing to re-perform the computation. The agent can operate off-chain (where it’s cheaper and faster) and prove the results to an on-chain contract.

Advantages:

Cost-Efficiency: Off-chain computation is much cheaper, avoiding high fees and scalability issues associated with running complex computations on-chain.

Scalability: The system can handle more complex AI workloads since only the result and verification data need to be transmitted on-chain.

Trust and Verification: It provides a secure middle ground, as users don’t need to trust the off-chain execution blindly; they have cryptographic assurance that the output is correct.

  1. Trusted Execution Environments (TEEs):

Definition: A TEE is a secure area within a processor that isolates certain computations, allowing them to be executed in a trusted, tamper-proof environment. Examples of TEE technologies include Intel’s SGX (Software Guard Extensions) and ARM’s TrustZone.

Functionality: TEEs ensure that data and computations are secure and can’t be tampered with by the host system. They can generate cryptographic attestations (or proofs) verifying that computations were carried out as specified.

Advantages:

Security and Privacy: TEEs allow AI computations to remain confidential and prevent external interference, which is ideal for applications requiring sensitive data handling.

Verifiability: Like verifiable agents, TEEs can provide proofs that the computation was executed correctly and securely, offering transparency without the need for fully on-chain execution.

Resource Efficiency: TEEs are highly efficient for computational tasks because they avoid the on-chain costs associated with decentralized computation.

Competitive Advantage of Verifiable Agents and TEEs over a Fully On-Chain Approach:

Cost and Efficiency: Running AI models on-chain is resource-intensive and costly due to storage, bandwidth, and processing fees. Off-chain solutions like verifiable agents and TEEs allow computations to happen where they’re cheaper and faster, submitting only the final result and proof to the blockchain. This reduces expenses and optimizes performance, especially for high-complexity AI tasks.

Scalability: On-chain AI limits scalability because blockchains inherently struggle with high-throughput tasks. Verifiable agents and TEEs bypass this by performing AI tasks off-chain, making the system more scalable and capable of handling larger, more complex applications that would be prohibitive on-chain.

Security with Verification: Verifiable agents and TEEs offer an alternative path to security and integrity by verifying off-chain computations with cryptographic proofs or attestations. This is effective for ensuring that off-chain AI computations are tamper-proof and verifiable without requiring a fully on-chain architecture.

Flexibility and Accessibility: Off-chain computation, especially when combined with verifiability, allows developers more freedom in terms of programming languages, models, and computational resources. On-chain approaches are often restricted by the limitations of smart contracts and blockchain environments, which can hinder the adoption of more sophisticated AI.

ICP’s Fully On-Chain Approach:

The Internet Computer (ICP) has opted for a model that aims to run AI directly on the blockchain. While this provides transparency and security for every aspect of the computation, it can also be:

Expensive and Computationally Intensive: Running complex AI models on-chain requires significant computational resources, which can increase the cost and reduce accessibility.

Limited by Blockchain Constraints: Fully on-chain AI systems face performance bottlenecks because of the inherent limitations of blockchain-based computation, which are not optimized for high-throughput tasks.

Summary

Verifiable agents and TEEs offer a hybrid approach, enabling efficient, off-chain AI computations while still providing verifiable, tamper-proof results.

This hybrid approach could be more practical and cost-effective than ICP’s fully on-chain model, particularly for large-scale AI applications.

While ICP’s approach ensures complete transparency and decentralization, it may face scalability and cost challenges. Verifiable agents and TEEs can offer a competitive advantage by balancing efficiency with verifiability, making them an attractive alternative for platforms focused on practical, scalable AI integration.

In essence, these alternatives offer a middle path that retains security and verification without the heavy costs and scalability issues of a fully on-chain approach, potentially making them more attractive for immediate, real-world AI applications on blockchain.

I’m going to create a separate thread for this specific discussion.

1 Like

New Thread: Optimizing ICP AI for hybrid models. Verifiable agents + trusted execution environments

Did ICP release something new as well?!

There’s this odd Tweet from a senior Dfinity person? ; )

Latest from NEAR

Elna 2.0?

Looks good, but I’d rather something where I can do more than just create an agent. I want this (from Dominic’s recent X post):

Users will create these for any purpose – to create something like a secure personal notes manager, or a personal website, or something for others, like social media, games, web3, or enterprise infrastructure, which involve online communities large and small – simply by issuing instructions in natural language.

Talking is cheap :point_down: