Prompt-to-Execution Flow
Lylo’s core runtime is a fusion layer where consumer-grade AI services intersect with Cosmos-native chain logic. Each function operates on-chain as a Cosmos SDK module or middleware — preserving sovereign Layer-1 finality while enabling a simple, prompt-based user experience.
Function
Layer
Description
Cosmos Relevance
Prompt Compiler
AI Intent
Fine‑tuned LLM converts natural language into a canonical IntentPlan
(protobuf).
Extends SDK message schema without altering consensus.
Risk Guardian
Middleware
Runs slippage, balance, sanctions, and rate‑limit checks before signing; aborts if risk > threshold.
Hooks into AnteHandler
, same as Cosmos fee validation.
Atomic Executor
Execution
Bundles Msgs, opens IBC channels, triggers swaps, posts callbacks; ensures commit‑or‑revert across zones.
Leverages x/authz
, x/ibc
and ICA for remote calls.
Gasless Smart Accounts
Accounts
Meta‑tx relay pays fees in LYLO or bridged USDC; social recovery via multisig guardians.
Built on x/accounts
custom module + Cosmos SDK’s feegrant
.
Proof‑of‑Inference
Security
ZK proof that a specific model produced hash(plan); stored in x/proof
and verified in Ante.
Works like “evidence” handling in Tendermint.
HydraGraph API
Data
Sub‑200 ms gRPC endpoint surfaces balances, prices, and LP positions across 14+ zones.
Uses ICQ for trust‑minimised cross‑chain queries.
IBC Service Mesh
Interop
Maintains live channel map, auto‑retries packet timeouts, updates clients.
Out‑of‑the‑box from x/ibc
; enhanced with relayer fee incentives.
Fee Market
Economics
Dynamic LYLO burn vs. escrow to fund relayers and security budget.
Mirrors x/feemarket
design used by Osmosis.
Shared‑Security Hook
Consensus
Optional toggle to register as Consumer Chain under ICS v2.
Inherits Cosmos Hub validator set for extra finality.
Together, these components deliver Lylo’s core promise: speak to crypto like it’s Web2, settle like it’s Web3.
API Example — Swap Command
const message = "swap";
const response = await fetch(`${API_URL}/api/chat/send-message`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${BEARERTOKEN}`,
},
body: JSON.stringify({ content: message }),
});
if (response.ok) {
const data = await response.json();
if (data.content) {
console.log("Chat answer:", data.content);
}
}
Behind the scenes
Intent Parsing Lylo’s NLP engine detects the user's command (e.g., “swap”) and extracts key parameters — assets, amounts, source/target chains — prompting for clarification if needed.
Route Planning The planner selects the most efficient DEX paths, bridges, and gas tokens based on real-time liquidity, slippage, and fee data.
Simulation & Risk Checks Each transaction is simulated using tools like Tenderly (EVM) or a Solana emulator to validate slippage, gas usage, and risk thresholds before execution.
Execution A signed transaction bundle is returned — or pushed to a connected wallet — with status updates streamed live over WebSocket.
Last updated