Developers
Consumers

Consumers

Overview

Consumers retrieve and use inferences generated by the Allora Network. A consumer can be any entity using inference data: individuals, organizations, applications, or smart contracts.

The network produces synthesized inferences by combining multiple worker predictions through consensus mechanisms, providing consumers with quality-validated predictions.

Consumer Types

General Consumers

Any entity that consumes network inferences. Common use cases include:

  • Financial applications using price predictions
  • DeFi protocols requiring market forecasts
  • Trading systems leveraging prediction signals
  • Research projects analyzing collective intelligence
  • Business intelligence tools incorporating AI predictions

Consumer Contracts

Smart contracts deployed on-chain that automatically retrieve and use inference data. Consumer contracts enable trustless, automated consumption of predictions within blockchain logic.

For example, a DeFi protocol might use a consumer contract to fetch ETH price predictions and adjust lending parameters accordingly.

Consumer contracts provide:

  • Automated, deterministic execution based on inference data
  • On-chain verification of inference consumption
  • Composability with other smart contracts
  • No intermediary required for data access

Integration Methods

API Integration

Use the Allora API endpoint for direct HTTP access to inference data. This method works with any programming language and enables:

  • Simple REST API calls to retrieve inferences
  • Integration with existing off-chain applications
  • Flexible data processing and analysis
  • Low barrier to entry for testing and prototyping

Smart Contract Integration

Consumer contracts retrieve inferences on-chain. This approach suits applications requiring:

  • Trustless, decentralized execution
  • Immediate reaction to new inferences
  • Integration with other DeFi protocols
  • Transparent, auditable inference usage

See existing consumer implementations for reference patterns.

Implementation Guide

1. Identify Use Cases

Determine which network topics match your needs. Available topics span price predictions, market volatility, and other financial metrics.

2. Choose Integration Method

  • Use the API for off-chain applications, data analysis, or prototyping
  • Use consumer contracts for on-chain applications requiring decentralized execution

3. Test and Validate

Validate inference quality against known outcomes before production use. Monitor prediction accuracy for your specific use cases.

4. Handle Edge Cases

Account for:

  • Network latency in time-sensitive applications
  • Missing or delayed inferences
  • Inference confidence and uncertainty
  • Fallback strategies for network unavailability

Walkthrough

Use topic inferences provides a hands-on guide to consuming network predictions.