Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

How It Works

This page explains how Daiko Factory turns your trader-AI setup into actual meme calls. Under the hood, every trader AI is still powered by conditions and live data evaluation.

The Evaluation Loop

DSL JSONValidateCompileto SQLExecuteFilter &NotifyWhitelist checkParameterizedMax 500 results+ Cooldown

When you save a trader AI, here's what happens behind the scenes:

  1. Your DSL is validated - The system checks that your condition uses valid fields and operators
  2. It's compiled to SQL - Your condition becomes a parameterized database query (no raw SQL injection possible)
  3. The query runs - Matching tokens are fetched from the live database
  4. Results are filtered - Cooldown and limits are applied
  5. Calls are delivered - You receive the meme call via Telegram (if connected)

This loop runs periodically (typically every few seconds), so your trader AI is always evaluating fresh market data.

Key Concepts

Trader AI
A call feed you create inside Daiko Factory. Behind the scenes it is powered by a DSL condition, not raw SQL.
Example: Find tokens where holder_count > 100
Evaluation
The periodic process of checking your conditions against the database and finding matches.
Cooldown
A period after notifying you about a token during which you won't be notified about it again for the same condition.
Example: If cooldown is 1 hour, you'll only get one notification per token per hour
Limit
The maximum number of tokens returned per evaluation cycle.

Limits and Constraints

Result Limit: 500 Tokens

Each evaluation returns at most 500 tokens. If your condition matches more than 500 tokens:

  • Only the first 500 (based on your order_by or default ordering) are returned
  • You won't see the rest until they rise to the top or your condition changes

Best Practice: Use more specific conditions or add an order_by clause to prioritize what matters most.

Cooldown Period

After you receive a notification about a specific token for a specific condition, that token enters a cooldown period for that condition. During cooldown:

  • The token may still match your condition
  • But you won't receive duplicate notifications
  • Cooldown is tracked per (condition, token) pair

Active Conditions Only

Only active conditions for active agents are evaluated. If you:

  • Deactivate a condition: It stops being evaluated
  • Delete an agent: All its conditions are removed

Notifications

Telegram (Primary Channel)

When tokens match your trader AI:

  1. The system checks if you have Telegram connected
  2. If yes, it sends a message with:
    • Trader AI name
    • Matching token details (symbol, address, metrics)
    • A link to view more

What Gets Sent

Each notification includes:

FieldDescription
SymbolToken symbol (e.g., PEPE, WIF)
Mint AddressUnique token identifier on Solana
Price (SOL)Current price in SOL
Market Cap (USD)Market capitalization in USD

Data Freshness

Your conditions run against near-real-time data:

  • Token metadata (symbol, creation time): Updated as new tokens are created
  • Metrics (price, market cap, holder count): Updated continuously from on-chain data
  • Trade data: Streamed from the blockchain with minimal delay

Security Model

Your conditions are safe because:

  1. No raw SQL: You write DSL (JSON), not SQL. The system validates and compiles it.
  2. Field whitelist: Only specific, allowed fields can be queried
  3. Parameterized queries: All values are passed as parameters, not string-concatenated
  4. Validation at parse time: Invalid conditions are rejected before execution

This design prevents SQL injection and ensures you can only query intended data.

Summary

AspectBehavior
Evaluation frequencyPeriodic (every few seconds)
Max results per run500 tokens
CooldownPer (condition, token) pair, in-memory
CallsTelegram (requires connection)
Data freshnessNear real-time (seconds behind chain)
SecurityValidated DSL → Parameterized SQL

For details on what you can query, see the DSL Reference.