Whitepaper
Spectral: An Inference Economy for Web3
Abstract
This document introduces Spectral, a platform designed to integrate autonomous onchain Agents with the Web3 ecosystem through innovative AI and ML technologies. Spectral's offerings include Spectral Syntax, a tool that enables users to create onchain Agents by translating natural language intents into executable code, and Spectral Nova, a decentralized network that supplies machine learning inferences directly to smart contracts. These products are interconnected through the Inferchain, facilitating communication between onchain AI Agents. With Spectral Syntax, users can easily create onchain Agents from simple instructions, and Spectral Nova brings the power of machine learning directly to these contracts. The Inferchain ensures these Agents can communicate with each other. This innovation is not just about improving blockchain efficiency; it's about transforming it into a dynamic, intelligent system where contracts can adapt and learn. Spectral's vision is to expand the capabilities of a blockchain, making it more responsive and intuitive for users.
1.     Introduction
Most machine learning (ML) models deployed in production for critical use cases today are built by a handful of large, centralized players with proprietary model training techniques. They’re black boxes. Applying them in a smart contract means relying on a single source of truth and creating a single point of failure.
On the other hand, with the frontiers of innovative AI technology expanding on a daily basis, particularly generative AI, it seems inevitable that AI Agents -- automated code performing tasks on our behalf -- will soon be a mass adopted reality. Many AI innovators, like OpenAI, have already signaled the creation of Agent Marketplaces. Specifically in Web3, AI Agents have massive potential to improve the speed and experience of onchain operations. However, the above mentioned problem of black box models becomes increasingly critical in this context. The decentralized ethos of Web3 clashes with the idea of centralized, opaque marketplaces for the creation and operation of on-chain Agents. Looking ahead to a future where on-chain AI Agents interact autonomously, such closed ecosystems could obscure the origins and efficacy of information shared between Agents, fostering a degree of centralization at odds with the foundational principles of Web3 and potentially leading to unforeseen consequences.
Spectral is solving this problem by bridging the gap between AI, ML and Blockchain, through its products that allow the users to create onchain Agents that operate on transparent, open source knowledge bases and inferences, through a common provenance layer known as the Inferchain.
Specifically, Spectral operates two unique product offerings:
  1. Spectral Syntax, is a network of Onchain Agents. Syntax allows users to create their own onchain Agents through a Solidity co-pilot that understands natural language intents and converts them into code based Agent instructions. Users can create and and monetize their own Agents, or use the Agents created by the community to run their daily Web3 tasks.
  2. Spectral Nova is a machine intelligence network that provides decentralized machine learning inferences directly to smart contracts. Nova incentivizes top data scientists and ML engineers to build models that output inference feeds to solve predictive and machine intelligence problems for web3 applications, thereby enabling smart contracts, companies and individuals to find and directly consume the inference feeds they need. These inferences can be verified via verifiable computation (e.g. zero-knowledge machine learning, optimistic machine learning, etc.).
The Agents created on the Spectral Syntax network, and the various inference feeds they consume from the Spectral Nova network will be integrated through the Inferchain. The Inferchain is Spectral’s vision for the future of Agent to Agent communication, allowing transparency, decentralization and performance verification for AI’s application in the Web3 space.
The below sections attempt to explain our vision for the Agent Economy, illustrate the workings of Spectral Syntax and Nova, and ultimately explain incentivization and governance mechanisms operated through the platform’s native token, SPEC. The paper ends with a note on the planned future work, including the long term vision for building the Inferchain.
2.     Agent Economy
A. Definition and Features of an Onchain Agent
Since the launch of ChatGPT in Nov 2022, the term “AI Agent'' has become widely used in both the Web3 sector and the broader technology industry. Given the early stage of development, and the emerging ways of implementing an AI Agent in Web3, we find it crucial to lay out our definition of an AI Agent.
AI Agent, in the context of Spectral, is a set of onchain instructions and code that can execute itself autonomously through a provisioned, dedicated wallet. It’s important to note a few key distinctions here:
  1. The set of instructions can be executed consistently. The set of instructions are the identity of the Agent, and the Agent acts predictably in accordance with them.
  2. The Agent is designed to operate autonomously on the blockchain, leveraging real-time data and events to inform its actions. It possesses the capability to analyze incoming information, assess current market conditions, or respond to specific triggers without direct human intervention. This enables the Agent to make independent decisions, whether it's executing trades, adjusting strategies, or performing tasks based on predefined criteria or algorithms. By doing so, it can adapt to changes swiftly, optimize operations for efficiency, or capitalize on opportunities the moment they arise. This level of autonomy ensures that the Agent can effectively manage tasks and make informed decisions in a dynamic environment, aligning with its programmed objectives and the interests it serves.
  3. The Agent has access to its own wallet and private keys allowing it to execute transactions, authenticate signatures and perform additional actions onchain. The Agent performs the authorized set of actions approved by the user on a repeating cadence, without asking the user to approve in wallet every single time.
B. Use Cases for an Onchain Agent
At Spectral, we hold a core belief that AI Agents will eventually become pervasive in our world, shaping our daily lives in profound ways. The rapid advancements in Large Language Models (LLMs) are accelerating us towards this future. Within the Web3 domain, AI Agents, as previously described, offer significant utility across a variety of tasks, enhancing daily operations. Here are a few examples to illustrate this point:
  1. Agents that process transactions: use cases involving complex transaction sequences, such as retail swaps, options settlements, automated liquidations in lending protocols, etc. can be handled by an Agent.
  2. Agents that construct code components: these Agents can create specific code components by looking at an existing projects repository. E.g., Agents that write ERC4337 smart wallet abstractions, Agents that write zkML (zero-knowledge machine learning) circuits, etc.
  3. Agents that carry out trading operations: these Agents can carry out entire sequences of asset pair trading based on an instruction set, and execute profitable strategies for NFTs, currency pairs, arbitrage opportunities, etc.
  4. Agents that carry out onboarding tasks: in these use cases, Agents can be trained on documentations of Web3 infrastructure providers and can automatically onboard users by calling the required APIs to create instances for a new user.
C. Economic Effects and Collective Intelligence
We anticipate the concept of AI Agents evolving similarly to App Stores, where users are naturally motivated to engage with Agents already developed by the community. A select few within the community will explore new use cases for creating additional Agents. However, a unique parallel is emerging for Web3 and its AI Agents, distinguishing it from the Web2 model:
  1. Open monetization network: instead of gated, price controlled communities like app stores, we believe in an open network where anyone can create an Agent and monetize its interaction based on their prerogative. Open networks will incentivize for performance and sensitivity of the AI Agent, and hence the interactions with the best Agents will automatically sell at the market discovered price point.
  2. Onchain operations: unlike black boxed models and their APIs, Web3 AI Agents by design can be transparent and measurable by representing their actions on chain. We envision a future where every incoming request to an Agent, the Agent's computation over that request, and its response - everything is fully traced on chain, thus assuring any party of the Agent's proof of execution.
Due to open monetization and operations that are visible onchain, we also believe that AI Agents will possess collective intelligence: they will have the incentives necessary to interact with each other (determined by market forces) and exchange knowledge while being aware of each other’s intelligence.
3.     Spectral Syntax
A. Overview
Spectral Syntax is a co-pilot software that helps users create their own Onchain AI Agents. A range of Large Language Models (LLMs) fine tuned on Solidity help Syntax generate functional code that can be used as a set of instructions to create onchain Agents. Through its conversational interface, Syntax can help build a variety of onchain Agents, and also help discover Agents built by the community. Thus, Syntax helps in building the onchain Agent economy by incentivizing the process of creating and interacting with onchain Agents.
B. Technical Components
A variety of technical components power the workflows beneath the Syntax product interface:
  1. Base Models: Spectral uses several models and applies rigorous fine-tuning techniques to enable Syntax to render functional Solidity code, efficiently route queries between models, and utilize specialized tooling to interact onchain. DeepSeek and GPT are the model versions used in the first Syntax release. All candidate models utilize one or more of the following approaches (Parameter-Efficient Fine-Tuning, Quantized Low-Rank Adaptation, Retrieval Augmented Generation, and DeepSpeed techniques) to improve upon the publicly available models. Depending upon the user intent, one or more of these models will generate a response from the requested AI Agent.
  2. Agent Identities: These identities serve to distinguish one agent from another within a group utilizing the same Large Language Models (LLMs), significantly influencing an Agent's functionality and behavior. This includes the quality and effectiveness of its responses to prompts. An Agent's identity outlines its core behaviors and establishes its role. For instance, an Agent identified as "designed to query the blockchain" will provide details from an Ethereum address when given a .eth address. Behind the scenes, each Agent identity, described in natural language, corresponds to a set of Python instructions stored in Syntax's short-term memory. In future updates, we plan to introduce an Agent Naming Service (ANS), a blockchain-based universal identifier that enables the recognition and tracking of an AI Agent's activities. This system aims to mirror the Ethereum Name Service (ENS), allowing each agent to be identified by a natural language identifier (similar to a domain name) to facilitate interactions.
  3. Agent Knowledge Bases: Along with an Agent’s Identity, a user can provide various knowledge bases which the Agent can refer to while responding to a particular prompt. Some of the knowledge bases are purely textual matter, but can also comprise of URLs. In the backend while processing the prompt, these knowledge bases are passed as in-context information, and thus help the Agent retrieve details if necessary.
  4. Plugins: Agents access plugins to connect itself with the internet and perform various actions. For example, nearly all data sources an Agent needs access to for running functional onchain contracts (e.g. Chainlink oracles for price data feeds, Google for general internet access, etc.) are all plugins which can be called upon by the Agent. Furthermore, the entire Foundry architecture, which is used to deploy contracts onchain, is also deployed as a plugin that is called upon by the Agent in specific compile and deploy operations. The engineering established here is that the Agent not only generates the code, but is also responsible for generating instructions which can be used by Foundry to process and deploy the code onchain.
  5. ML Inferences: Similar to how plugins work, Machine Learning (ML) models can utilize inferences produced by a diverse range of models. Agents within the Spectral Syntax can directly access inferences from Spectral Nova, Spectral’s network dedicated to curating top decentralized models built by the community. By tapping into these ML inferences, Agents can automatically input target variables and retrieve the corresponding inferred values from the model, streamlining the process of leveraging advanced ML capabilities.
  6. Wallet Management: A strong distinction of an onchain Agent is the ability for it to be able to deploy code autonomously. Spectral Syntax makes such dedicated wallets available to its Agent by creating a ERC4337 Smart Wallet Abstraction between the User and Syntax. This smart wallet acts as the Agent’s own wallet, which can be used by the Agent to sign transactions, handle assets, and pay for gas usage. Although the Agent acts autonomously, the user is in control at all times, because the user controls the amount of funds to hand over to the Agent’s wallet.
C. Workflows
Spectral Syntax can allow users to create onchain Agents because it combines the generative power of LLMs with an onchain contract deployment architecture. This workflow, which combines the prompt and inference from an LLM with Foundry architecture on demand is behind the seamless interaction behind all onchain Agents. We explain here the sequence in which these interactions happen:
  1. General Architecture
    Diagram: General Architecture of the Spectral Syntax Network
    Spectral Syntax is built on an intricate engineering architecture which provides LLMs seamless access to onchain infrastructure. Following are the various components used in the network:
    • Orchestrator: The Orchestrator is Spectral's proprietary backend service, which directs communications between system components. It sends prompts to Agents, activates necessary plugins, and engages the Deployment rails. Orchestrator also invokes the Wallet Manager to seamlessly deploy contracts onchain.
    • Wallet Manager: This component connects the Agent and LLM models to user wallets and prompts them for signatures during code deployment. In subsequent future updates, the Wallet Manager will also be responsible for generating Agent Wallets using smart wallet account abstractions. With a self wallet and Agent’s wallet, a user will be empowered to transfer a set of funds to their Agent, and allow their Agent to use them for autonomous code deployment.
    • Agent Handler: The Agent Handler manages communications with multiple Agents, contextualizes prompts, and directs specific requests to the appropriate Agent. It also oversees the creation of instructions for plugin invocation and code tests to assess Agent-written code's efficiency.
    • Agent Network: Spectral Syntax network consists of multiple Agents, depending on the identities of and use cases for individual Agents. Depending upon the user’s selection, the Agent handler can select and call upon a particular Agent in a conversation.
    • Plugin Manager: This component is responsible for directing instructions to the right plugins and relaying responses to Agents. Plugins, in the context of the Syntax network, are a broad category of APIs, including pricing oracles like Chainlink, third party APIs like DeFiLlama and Google, inference feeds from the Spectral Nova network, and deployment rails like Foundry - all these APIs can be called upon just-in-time, depending upon the requirement of the prompt.
    • Modular Deployment Rails: Using Foundry, an open-source toolkit for Ethereum development, Spectral orchestrates the compiling, testing, and deploying of Agentic code over EVMs.
  2. Prompt Generation and Deployment Sequence:
    Diagram: Prompt Generation and Deployment Sequence
    When a prompt is received from the user, the request travels through the various components within Spectral Syntax in the following manner:
    1. Step 1: User first inputs a prompt into the interface for Spectral Syntax or one of the pre-built Agents.
    2. Step 2: Orchestrator receives the user prompt and prepares it for processing. It utilizes Coordinating LLM to generate structured instructions based on the prompt, according to the context and intent, and decides to route the request to a particular Agent.
    3. Step 3: Depending on the instructions provided by the Coordinating LLM, the Orchestrator searches for the appropriate Agent Schema in the local network directory of Agents. This schema includes information about the identity of the Agent, available actions, entities and data sources related to a particular Agent.
    4. Step 4: Orchestrator then calls the Agent handler, and passess the structured instructions and the relevant Agent schema to the LLM.
    5. Step 5: Agent Handler communicates with the relevant components or APIs to fulfill the user request, such as querying databases or external services. Agent handler also requests additional contextual data from the Vector DB (containing model embeddings) and then constructs an enhanced prompt which needs to be sent to the LLM for processing.
    6. Step 6: Agent Handler initiates a call to the Language Model (LLM) with the enhanced prompt, Agent schema, and additional contextual data. LLM generates a response using natural language understanding and generation techniques. The response is crafted to address the user's query or request, leveraging the provided context and available information.
    7. Step 7: The Orchestrator analyzes the response, and depending upon the processing of the prompt decides if Plugin Manager needs to be invoked.
    8. Step 8: Plugin Manager invokes relevant plugins based on the response sent by the LLM. Plugins may perform tasks related to a variety of use cases: fetching a price from an oracle, executing a compile instruction, deploying a code onchain, etc.
    9. Step 9: The Orchestrator decides if it needs to augment the processing result with additional data - if necessary, it will repeat Steps 2-9 until it processes the full prompt. Once completed, the Orchestrator then collates the outputs from the LLM and executed plugins to form a comprehensive response that’s suitable for user’s consumption.
    10. Step 10: After ensuring the response is coherent, relevant, and actionable, it delivers the response to the user through the platform interface, completing the prompt processing flow.
4.     Spectral Nova
A. Overview
Spectral Nova is a machine intelligence network that provides high quality, decentralized inference feeds for smart contracts. Nova incentivizes top data scientists and ML engineers to build models that output inference feeds to solve predictive and machine intelligence problems for web3 applications, thereby enabling smart contracts, companies and individuals to find and directly consume the inference feeds they need. Via verifiable computation, consumers can be assured of the integrity of the performant models they consume.
Nova is underpinned by a system of actors interacting in a self-sustaining flywheel. The sections below explore this mechanism.
B. Key Actors in the Spectral Network
  1. Creators: are web3 companies that post data science/ML challenges, set performance benchmarks, and establish rewards for winning Solvers. They earn a share of the revenue generated by the consumption of inferences from their challenges.
  2. Solvers: solve data science/ML challenges posted by Creators, with the opportunity to win a bounty and receive the majority of revenues from ongoing use of their model inferences by Consumers.
  3. Validators: ensure models do what they claim to be doing, in terms of both integrity and quality. During challenges, Validators use a randomness beacon to create unique test sets for each Solver; Solvers then execute their model and upload responses to IPFS. After a given challenge, Validators check Solver responses against ground truth, verify zkML proofs, and ensure they meet the performance benchmarks set by the challenge Creator.
  4. Consumers: discover inference feeds that align with their data science/ML needs and pay fees to access and ingest them into their own applications.
C. Modeling and Consumption Workflow
Creators, Solvers, Validators and Consumers interact with one another on Spectral’s Machine Intelligence Network and exchange value through inference feeds. Here are the steps by which an inference feed is commissioned, created, validated, and consumed:
  • A Creator first finds a relevant data science challenge to post to the Spectral Machine Intelligence Network. Once the challenge is deployed, it becomes live for Solvers to build models. All Spectral challenges are open to our global community of Solvers, who can compete against one another to build the highest-performing models for a given challenge.
  • Solvers commit their models for the challenge - in other words, they designate a specific model version as their official submission for the challenge.
  • Once a Solver commits a model, he/she will receive a challenge dataset from one of our independent Validators. This is part of the process by which Validators conduct quality assessments for all committed models. It's important to note that Spectral challenges are perpetual. As such, Solvers can build and commit models on a self-defined timeline. A Solver will receive a challenge set from a Validator only when he/she commits their model.
  • Solvers then compute their unique test Inferences against the challenge data set and submits it to the validator. These inferences are calculated in a privacy preserving manner using zkML. Along with the inferences, the Solver also submits zkML proofs, which the Validator can use to verify that said inferences are outputs from the same model the Solver committed.
  • Validators are then responsible for evaluating the inferences submitted by the Solver against  the challenge’s performance benchmarks, as well as proofs submitted by the Solver against the inferences. Once the evaluation is carried out, the submission is considered to be complete, and each Solver’s performance scores are compared against those of other Solvers who have also completed their submissions. Each challenge has an evolving leaderboard that registers the top ten highest-performing models at any given point in time, and only those models are eligible for consumption by Consumers.
  • Once a Solver’s model is deployed, it is publicly displayed in association with an inference feed. A Consumer can request the inference feed through Spectral, either as part of an aggregate feed, or as a custom feed from a particular model.
  • The Consumer's request is then routed to the top Solvers (in the case of aggregate feeds) or an individual Solver (in the case of custom feeds), and the relevant Solvers can compute and output inferences against the data presented by the Consumer.
  • Inference is then provided to the consumer. The entire process is seamless and can run entirely from within smart contracts. 
D. Technical Design Principles
To ensure robust adoption of this new ML consumption paradigm, Spectral is built on design principles that promote decentralization, free market dynamism, and privacy protection:
  • Privacy-Preserving Machine Learning: Spectral uses zkML to preserve privacy during training, evaluation, and consumption of machine learning models. zkML ensures that Solvers' intellectual property is protected and contributes to a secure and trustless network.
  • Technical Abstraction: While adopting intricate cryptographic and mathematical concepts in zkML, Spectral aims to shield users from technical complexities for a frictionless experience. The focus is on maintaining the integrity of machine intelligence during inference time without compromising Solver experience.
  • Validator-based Quality Control: To guarantee the quality of machine intelligence, Validators play a crucial role in the network. They utilize a randomness beacon to verify machine learning models in a tamper-proof manner. Validators also evaluate model performance using a diversified set of industry-accepted validation metrics, ensuring that inferences can meet the standards of Consumers in a variety of verticals and scenarios. For transparency and accountability, Validators will openly disclose all relevant intermediary steps.
  • Customizable Solutions: Acknowledging the context-specific nature of inferences, Spectral supports both scalable and custom machine intelligence models. Spectral can serve inferences for general use by multiple Consumers, or tailor them to the specific requirements of specialized use cases.
  • Network Effects: The Machine Intelligence Network operates as a built-in, self-scaling flywheel, with incentives that reward Solvers for producing more and better models, and web3 companies for identifying and posting the most relevant predictive and ML needs as challenges. These effects are explored further in the section below.
E. Incentives and Rules of the Network
Each actor in the Spectral network is incentivized to be a part of a self-fulfilling flywheel:
  • Creators are incentivized to scout and post new challenges because they can unlock an additional source of revenue in case their challenge sees a demand from multiple consumers who find it relevant to solve business problems.
  • As Solvers accumulate more rewards from high-performing models, they are incentivized to continue building better models across various challenges. Throughout the process, their intellectual property is preserved which makes perpetual incentivization possible. They are also incentivized to compete with existing top modelers in order to partake in fee sharing.
  • Consumers are incentivized to request inferences on Spectral because they can harness the power of the decentralized community to obtain permissionless models that produce readily ingestible high-quality inferences, all at a lower cost than developing models in-house.
  • Validators are incentivized to validate the integrity of inferences because it unlocks a stream of steady revenue while giving validators the opportunity to secure their earnings by staking.
These incentives enable a departure from the status quo of ML where a handful of large, centralized players produce critical inferences without transparent validation. Instead, Spectral ushers in a new era: one where any Agent (consumers, smart contracts, LLMs, etc.) on the Spectral network can automatically verify, rather than merely trust, inferences and outputs from other ML models and use them readily in their applications.
Diagram: Flywheel effects within the Spectral Network
Additionally, to ensure a competitive, nash equilibrium in our network, Spectral has instituted a set of rules of engagement in our network:
  • Promotion of competitive flexibility. A Solver can recommit their model an unlimited number of times. If the Solver already had a model live in consumption, the existing model will still remain active while the Solver works on a new model, thus ensuring no disruption in reward distribution.
  • Lack of verification is penalized. A Solver is required to provide proof that a particular inference indeed originated from their valid, benchmarked model. zkML proofs are requested automatically from the network protocol. A Solver that fails to provide these proofs for 3 times will see their model taken out from the list of top Solvers. The Solver has to then submit retroactive proofs for their model to become eligible for consumption again.
  • Models are tested for real-world relevance. A Solver is subjected to a forward testing window, where their model prediction is compared with the real life outcome for any particular wallet or contract address. This design compels Solvers to be accountable for building the most functionally accurate models.
  • Evaluation windows run in parallel. Each Solver runs their own clock relative to other Solvers for when they submit their model and its proofs, when the model goes through the forward evaluation window, and when the model turns live for consumption after meeting benchmarks. This mechanism ensures perpetual challenges, where any Solver can join the challenge at any time and emerge victorious in the challenge.
  • A Solver is incentivized to be early in their submissions. Any challenge on the Spectral Network goes live after more than one model has been committed and evaluated for their performance. Once the challenge is live, any bounty or fee rewards are distributed on a weekly basis. That means, lesser the number of models, the more rewards any Solver will get per week (because a fixed amount of bounty will be distributed every week for a certain number of weeks). Once a challenge gets consistent consumption, more Solvers will start committing models, thus leading to more challenges and lesser rewards per Solver.
  • Market forces can determine traffic to a model. A consumer can choose to consume a metamodel inference (i.e. an aggregate inference of top performing models) OR individual inferences (sourced directly from an individual model). Should the Solver reputation be excellent, a consumer can choose to continue consuming from a particular model. This incentivizes the Solver to produce the best models possible.
F. Core Components
Diagram: Technical Architecture of the Spectral Network
Spectral Network’s core architecture is a modular, service-oriented setup comprising of the components that provide scalability and flexibility:
  • Embedded wallets: We’ve partnered with Privy to onboard users without the hassles of wallet management. Privy generates embedded custodial wallets on demand and helps onboard users seamlessly using just their email addresses.
  • L2: The Spectral Finance machine learning protocol is deployed on the Arbitrum network. Arbitrum is an EVM-compatible Ethereum scaling solution that enables low transaction costs and high volume scalability. Spectral leverages Arbitrum to:
    • Provide storage for inference requests, model challenges, and fraud proofs for Solvers, Challenges, and Validators
    • Allowing registration / tracking of all the actors (Solvers, Consumers, Solvers and Creators)
    • Providing contracts for interacting with Spectral Network (for committing models, consuming inferences, etc.) 
    Each actor interacting with the Spectral Machine learning platform will broadcast transactions to the Arbitrum network for a small gas fee. The Arbitrum blockchain inherits Ethereum's trustless and decentralized features, as all transactions on Arbitrum are settled on Ethereum via the Arbitrum sequencer.
  • Account Abstraction: Spectral has designed a novel ERC4337-compliant multi-signature wallet contract, enabling all Spectral machine learning platform actors to gaslessly interact with the platform. Normally, conducting a transaction on Arbitrum requires the user to pay a gas fee in ETH. For new users, particularly non-web3-native users, acquiring these tokens can be confusing and daunting. The ERC 4337 standard enables transactions to be processed without the end-user needing to hold or manage ETH on Arbitrum. Users do not broadcast their transactions straight to the Arbitrum blockchain when interacting with Spectral. Instead, they are sent to a separate mempool, where transaction intents are received by a “Paymaster”, who pays the gas fees of transactions on behalf of the initial sender, for a fee in an alternative currency. Spectral has integrated with Alchemy and is acting as a custom paymaster for the Spectral machine learning platform. This Paymaster uses a separate Spectral-only mempool that can facilitate gasless transactions for all users in the machine learning platform, including Solvers and Validators. The Spectral mempool will only fulfill transactions that are related to the Spectral machine learning platform, and will not fulfill transactions that are not interacting with the Spectral smart contracts.
  • RPC node: Alchemy is used as the node provider to interact with the blockchain.
  • Pulse: Spectral’s backend application that tracks all the blockchain events relevant to the Spectral Platform (including the requests and responses to and from machine learning models). The Pulse also provides APIs to Solvers and Validators to view transactions on the blockchain.
  • Modeler CLI: Modeler CLI is responsible for all the Solver interactions with the Spectral Platform during the preparation and submission of the machine learning model phase. This integration ensures smooth communication and synchronization within the decentralized network, streamlining the handling of AI inference requests. It streamlines the experience of participating in the challenge, by generating machine learning model commitments, verifiable computation proofs, and submitting responses to the blockchain.
  • Nova: This is the service serving offchain machine learning inferences to the blockchain during the consumption phase of the challenge. Nova integrates with Pulse to streamline the handling of inference requests from the blockchain, then generates inferences based on the provided data and machine learning models. Once the inferences are generated, Nova submits them back to the blockchain, together with verifiable computation proofs to ensure the integrity of the platform.
  • Verifiable computation: Spectral uses multiple verifiable computation approaches that allow for proof generation associated with an inference response, so that a Consumer knows that only the committed model generated the inference, and performance benchmarks (as tested) were met at the time of generating the inference. To that end, Spectral utilizes the following techniques:
    • Zero-Knowledge Machine Learning (zkML): Zero-knowledge proofs are a way of mathematically verifying a specific information without revealing the contents of it. Essentially, they work by correctly predicting the outcome of an equation (in our case, the equivalent circuit of a given ML model). zkML empowers us to verifiably prove that a given inference came from a specific machine learning model that a modeler claims it did.
    • Optimistic Machine Learning (opML): opML is a more efficient way (relative to zkML) to optimistically challenge and verify the ML model’s inferences onchain. A proof is generated only when a specific inference is challenged which then leads to a verification game (similar to optimistic rollups) to verify the integrity of the disputed inference.
      Diagram: zkML workflow using the ezkl library
  • IPFS: Spectral uses the IPFS protocol for the storage layer to natively store the following:
    • Challenge definition
    • Verifiable computation (storage commitments events)
    • Proofs storage (against inferences generated by a model)
    • Inference submissions (storage of submission events during the model submission stage)
To further illustrate the technical underpinnings of our network, please refer to the following workflows, which show the interactions between these components from a Consumer, Solvers and Validator perspective.
Diagram: Solvers Workflow
Diagram: Validator Workflow
Diagram: Consumer Workflow
5.     Token Economy
A. Overview of the SPEC Token
The Spectral Network incorporates the SPEC token as an ERC20 standard, aligning it with Ethereum's ERC20 protocol for seamless compatibility across wallets, exchanges, and decentralized applications. This token assumes a pivotal role in the platform's onchain governance, providing holders with voting power and decision-making authority over crucial operational aspects.
In essence, SPEC operates as a governance token, enabling community stakeholders, including users building Agents on Spectral Syntax, as well as Solvers and Creators on Spectral Nova, to participate in the administration of the network. This inclusive approach ensures collective decision-making, mitigating the influence of centralized entities.
The onchain governance facilitated by SPEC allows holders to propose and vote on platform upgrades, modifications, and parameter adjustments. This democratic process fosters community consensus, enhancing transparency and inclusivity in decision-making.
Beyond its governance function, SPEC is integral to the staking mechanisms within the Network. 
  • On Spectral Syntax, users who stake SPEC are entitled to elevated rights for Agent creation and monetization, and the staking requirement ensures that purposeful Agents get created on the Network and disincentivizes any actor to create malicious Agents.
  • On Spectral Nova, Validators, essential for validating Solvers' submissions and maintaining challenge integrity, are mandated to stake SPEC as collateral. This requirement incentivizes validators to act with integrity, as any misbehavior or malicious actions may result in the forfeiture of their staked tokens.
Additionally, SPEC serves as a medium of exchange and value transfer within the platform. 
  • On Spectral Syntax, users are required to pay for using the community Agents; additionally, some Agents (such as trading Agents) incur Spectral platform usage fees for helping users with their transactions. Such users can pay for Agent interactions through SPEC, and be entitled to receive faster transaction processing, discounted platform fees, special access to Agents reserved for SPEC holders, etc. Paying for Agents through SPEC thus enables the users to use the platform and deploy onchain Agents in a more rewarding manner. Similarly, users are also incentivized to build their own Agents and monetize them using SPEC. Staking SPEC allows such users to get broader access for monetizing their Agents, along with unlimited cap to create Agents and registering them in the official Agent naming service and verification program.
  • On Spectral Nova, users accessing machine learning models are required to pay fees, which can be in the form of Ethereum (ETH) or stablecoins, depending on challenge rules. A portion of these fees is allocated as rewards to Solvers, fostering active participation and encouraging high-quality contributions to the Spectral ecosystem. This multifaceted role of SPEC underscores its significance in both the governance and operational dynamics of the Spectral network.
B. Governance
SPEC token serves as a powerful mechanism for actors in the system to actively participate in the governance of the Decentralized Autonomous Organization 
  • Voting on Network Improvement Proposals: SPEC token holders can actively participate in the governance process by submitting and voting on proposals related to network upgrades, feature implementations, fee structures, and standardized challenge rules. While proposing proposals and voting on them, the DAO shall follow the following guidelines:
    • Voting power is proportional to the amount of SPEC held by a user.
    • There is a designated voting period for each proposal.
    • Token holders express support or opposition during the voting period.
    • Votes can be cast directly or delegated to other addresses.
    • Delegating voting power promotes broader participation.
    • A proposal must meet a minimum quorum requirement to be valid. 
    • Approval requirement is typically 40% of total votes for a successful proposal.
    • If a proposal meets both the quorum and approval requirements, it is considered successful. The proposed changes are then implemented in the protocol according to the terms outlined in the proposal.
  • Influencing Governance Parameters: Token holders have the ability to propose and vote on adjustments to governance parameters, including voting rules, quorum thresholds, and voting periods, contributing to the agility and responsiveness of the platform's governance model.
  • Staking for Agent Operations: On Spectral Syntax, staking gives users privileged access for monetizing the Agent network. To that end, SPEC holders can use their tokens to influence the manners in which Spectral monetizes the Agent network, and propose platform fee changes, suggest strategic partnerships, modify content moderation rules, etc.
  • Staking for Validation:  On Spectral Nova, Validators stake SPEC tokens as collateral to play a critical role in maintaining the integrity of machine learning challenges on Spectral. They are responsible for validating submissions made by participating Solvers and are rewarded for their honest and accurate assessments.
  • Participating in Smart Contract Upgrades: Through DAO governance, SPEC token holders can vote on proposed changes to Spectral's smart contracts. This allows for the platform's flexibility and adaptability to emerging technologies and security enhancements.
  • Allocating Funds for Community Initiatives: The DAO may allocate a portion of the platform's funds to support community-driven initiatives, research and development, marketing efforts, or partnerships. This mechanism empowers the community to drive initiatives that benefit the platform as a whole.
  • Shaping the Future of Spectral: Overall, holding SPEC tokens grants individuals the opportunity to actively shape the future of the Spectral Network by participating in various governance activities, ensuring a transparent and inclusive decision-making process.
C. Staking on Spectral Syntax
Users of the Spectral Syntax network can stake SPEC in various ways, depending on their use case and utility for the token:
  • For Agent consumption: Users can choose to stake SPEC in order to obtain privileged access for interacting with Agents in the Syntax network. A user could expect to pay lower platform fees, obtain faster transaction processing and get access to a reserved set of Agents meant only for users actively staking SPEC.
  • For Agent monetization: Users can also choose to stake SPEC to get privileged rights for monetizing their Agents. Monetizing your Agent will require staking SPEC, but the system is geared to incentivize users who are willing to stake more SPEC and safeguard the authenticity of the network. Hence, users are enabled to create and monetize Agents in proportion to their staked SPEC. Additionally, staking SPEC also allows users to get their Agents “verified” through Spectral’s official onchain naming and verification service.
D. Staking on Spectral Nova
Actors within the Spectral Nova network can stake SPEC in different ways, depending on their use case and utility for the token:
  • For Solvers: In the Spectral Nova Network, Solvers play a crucial role by participating in machine learning challenges. To enter a challenge, Solvers are required to stake SPEC tokens, showcasing their commitment to delivering high-quality machine learning models. This staking requirement encourages Solvers to have "skin in the game" and fosters a sense of dedication to producing top-notch models. Solvers also have the option to pool funds through crowdfunding mechanisms, enabling collaborative efforts to meet the staking requirements collectively.
  • For Validators: Validators in the Spectral Nova Network are responsible for maintaining the integrity of machine learning challenges. Validators stake SPEC tokens as collateral, demonstrating their commitment to the network's security. Their role involves validating Solvers' submissions and ensuring adherence to challenge guidelines. Validators face potential slashing if they fail to validate submissions within specified time windows or engage in malicious behavior. This staking mechanism incentivizes validators to act diligently and responsibly, contributing to the overall credibility of the network.
  • For Consumers: Consumers accessing machine learning models within the Spectral Nova Network contribute to the ecosystem by paying fees for model usage. These fees, which can be in the form of SPEC, Ethereum (ETH) or stablecoin, are distributed to Solvers as rewards. Consumers also have the option to stake SPEC tokens, allowing them to receive discounts on network fees or even waive fees entirely. The staking of SPEC tokens by consumers aligns their interests with the success of the network, creating a mutually beneficial relationship between consumers and other participants.
Incentives for staking SPEC are also distinct for every actor as follows:
  • Incentive for Solvers: For Solvers in the Spectral Nova Network, staking SPEC tokens serves as a commitment to challenges. Rewards are tied to the quality and performance of their machine learning models, and specific incentives are distributed during reward epochs. This approach ensures that top-performing Solvers and every benevolent Solver, regardless of ranking, are rewarded with SPEC tokens. The system encourages ongoing engagement and improvement, fostering a collaborative and inclusive environment within the network.
  • Incentive for Validators: Validators in the Spectral Nova Network receive incentives for their active participation and commitment to the platform's security. They stake SPEC tokens as collateral and receive a portion of the revenue generated from users requesting inferences from Solvers. Validators also earn rewards for identifying and exposing malicious behavior, creating a self-regulating environment. In cases where a validator successfully challenges and uncovers misconduct, they are rewarded, reinforcing the network's security and trustworthiness.
  • Incentive for Consumers: Consumers in the Spectral Nova Network can gain incentives by staking SPEC tokens, allowing them to receive discounts on network fees. This aligns consumer interests with the success of the network, creating a symbiotic relationship. The varying incentives for Solvers, validators, and consumers contribute to the overall health and sustainability of the Spectral ecosystem, fostering a balanced and mutually beneficial environment among its diverse participants.
6.     Future Work and the Inferchain
The above paper has explored the design, workflows, components, tokenomics, incentive mechanisms and governance principles behind Spectral, an ecosystem bridging the gap between AI, ML and Blockchain through Nova and Syntax networks. network by highlighting the actors, their incentives, technical architecture, workflows, and tokenomics. 
With these mechanics, Spectral launched Nova and kickstarted its first challenge in November 2023. The launch was met with great traction; more than 400+ Solvers have signed up on our platform to build models for our first challenge, about 20% of the modelers have already received their Early Submission Bounties for submissions of their models. These models will be open for public consumption (where any consumer can request these models and call the smart contracts for an inference) starting April 2024.
Spectral Syntax, our flagship co-pilot that creates onchain Agents, will be launching at the end of March 2024. Over the next few quarters, we have a robust set of feature upgrades, ecosystem collaborations and initiatives planned for Spectral Syntax and Nova Networks.
  •  Roadmap for Spectral Syntax:  Near term roadmap for Syntax will focus on empowering people to enrich their engagement with the Agent Economy. To that end, we’ve planned for several updates:
    • Ability to create your own agents: users will be able to create their custom agents and modify their identities, knowledge bases and plugin access. We believe that this feature will lead to an explosion of creativity, where users will create a variety of agents for different tasks in Web3.
    • Roster of industry grade plugins: To enable complex use cases and end to end functionality, we are currently engaging with several providers to enhance availability of oracles, feeds, etc. to Agents on the Syntax network.
    • Monetizing Agent interaction: Users will soon be incentivized to create Agents and can set a monetary transaction mechanism for allowing other users to interact with their Agent. This feature will enable Syntax to thrive as an open marketplace for Web3 AI Agents, thus creating network effects and fueling more Agent creation, engagement and adoption.
    • Enterprise DevRel Agents: Spectral is also engaging with several chains, tooling providers, and other Web3 firms to investigate creation of Developer Relations (DevRel) Agents for products. These Agents will enable users to get onboarded seamlessly to other Web3 products, and allow the Agents to write code/instructions necessary for integrating new users with these products.
  • Roadmap for Spectral Nova: building upon the traction of our first challenge, we aim to launch several additional challenges, geared to solve industry relevant problems across Web3. The following are examples of challenges Spectral will launch:
    • UniswapX Collaborative Filler: Given the expanding space of pools and the increase of multichain activity, the existing framework for token swaps and bridging is not sustainable. Improving this requires a network of decentralized solvers competing and collaborating to satisfy user intents. Collaborative filling creates ensemble routes between multiple solvers who may have a better solution for fulfilling specific legs of the trade. Solvers compete to build a globally optimized pathfinder that routes across all individual UniswapX filler routes. Successful participants will not only help create a better experience for swappers, liquidity providers, and fillers on Uniswap but will deliver the first truly collaborative approach to decentralized solving networks. This framework will generalize to other intent based solutions. 
    • NFT Recommendation Engine: This challenge focuses on creating an accurate Non-Fungible Token (NFT) recommendation engine. NFTs have become a significant part of the digital marketplace, and there is a need for effective personalization tools to navigate the diverse range of assets. The challenge aims to leverage recommendation engines to assist users in exploring and distinguishing between various NFT categories.
    • Price Prediction: This challenge focuses on predicting the log returns of ETH (Ethereum) in USDC (USD Coin) over a period of up to thirty days in the Uniswap V3 USDC-ETH 0.05% pool. Consumers can leverage this inference feed to forecast short-term returns in the dynamic trading landscape of decentralized exchanges (DEX), specifically Uniswap.
    • NBA Sports Prediction: This challenge focuses on predicting player-specific points, rebounds, and assists, as well as team and opponent team total points in the NBA. Solvers compete to build predictive models using historical player statistics, performance, and other data to generate the best daily predictions.
Building on top of our existing community strength, our future roadmap is geared towards The Inferchain — Spectral’s custom L2 built for web3 to integrate with AI in a trustless, verified way.  While it is early to chalk out the exact specifics, our vision for the Inferchain is a layer that serves as a universal, permissionless, open source of truth for verifying all onchain AI Agent interactions. To that end, Spectral's 2024 roadmap unfolds in four phases:
  • Inception (Q1) focuses on launching the Spectral Nova Network, and the Spectral Syntax network, including decentralized architecture and SPEC governance. 
  • Scaling (Q2) aims to grow network usage with advanced features and ability to do more with Agents and monetize them on Spectral Syntax, and the ability to participate more ML challenges launched on the Spectral Nova network.
  • Diversification (Q3) will focus on enriching the Spectral Syntax network with complex AI Agents capable of end to end interactions, developed in partnership with several other Web3 firms. We also envision cross synergies in the Syntax and Nova network, where consumption of Syntax Agents will lead to demand for more decentralized machine learning inferences.
  • The final phase, The Inferchain (Q4), aims to actualize the Agent Economy by optimizing universal Agent identification, Agent to Agent communications, and onchain inference consumption. The Inferchain is planned for an early release in 2024 and a Mainnet launch in 2025.
7.     Conclusion
Spectral's Machine Intelligence Network signifies a significant advancement in making blockchain technology more intelligent and responsive. By blending AI with blockchain, we're not just delivering a tool, we're leading a new wave of development. Syntax makes contract deployment simpler, allowing for the easy creation, debugging, testing, and deployment of projects. Nova brings a new predictive layer to smart contracts, enriching their capabilities. Central to our network is the Inferchain – a purpose built blockchain specifically for onchain autonomous agents. Our vision for the Machine Intelligence Network is not just to lower the barriers to onchain development but to fundamentally redefine them.