Kwala Architecture
Kwala’s architecture consists of interconnected components that work together to enable stateless, decentralized workflow execution:| Component | Description |
|---|---|
| Stateless automation layer | Processes workflows off-chain while retaining cryptographic guarantees |
| Kwala Virtual Machine (KVM) | Deterministic runtime that interprets and executes workflow definitions |
| Event trigger engine | Monitors blockchain activity and detects workflow activation conditions |
| Cross-chain action engine | Executes on-chain operations across multiple networks |
| Web2 integration layer | Connects workflows to external APIs and enterprise systems |
| Verifiable execution layer | Independent verification system that validates all workflow executions |
Stateless automation layer
Kwala shifts workflow logic off-chain while retaining cryptographic guarantees and verifiable execution on-chain. By separating automation logic from state transitions, Kwala enables scalable, cost-effective workflow execution without compromising decentralization. The stateless automation layer processes workflows using four key components: a deterministic workflow virtual machine that interprets workflow definitions, decentralized task runners that execute workflows across a distributed network, event-driven triggers that monitor blockchain activity, and cross-chain action executors. Together, these components create a new design paradigm: stateless logic, stateful execution.Kwala Virtual Machine (KVM)
The Kwala Virtual Machine (KVM) is the execution engine that interprets and processes workflow definitions. It functions as a deterministic runtime environment where YAML-based workflows are parsed, validated, and prepared for execution across the decentralized network. The KVM has multiple capabilities, including:- YAML parsing: Parses workflow definitions for consistent interpretation across all nodes
- Event extraction: Extracts event arguments using the
re.event(n)syntax for simplified parameter access - Workflow validation: Validates workflow structure and logic before execution
- Trigger scheduling: Schedules triggers based on defined conditions
- Sequence orchestration: Orchestrates multi-step workflow sequences
- Web2 interactions: Enables API calls and external service integrations
Event trigger engine
The event trigger engine monitors blockchain activity across multiple networks, detecting state changes that initiate workflow execution. Kwala supports the following trigger types:- Smart contract events: Listen for specific events emitted by contracts
- Price changes: React to token price movements (coming soon)
- Time-based intervals: Schedule automation using cron expressions
- Webhook inputs: Receive triggers from external systems
- Wallet activity: Monitor transactions and balance changes
Cross-chain action engine
The cross-chain action engine executes on-chain operations in response to workflow triggers. It can initiate smart contract calls on any supported blockchain, process token transfers and approvals, coordinate actions across multiple networks, and orchestrate multi-step pipelines. Developers define all of these operations in a single YAML file, which eliminates the need for writing separate deployment scripts or custom coordination logic across different blockchain environments.Web2 integration layer
The Web2 integration layer enables workflows to interact with existing infrastructure, bridging the gap between blockchain operations and enterprise systems. Integration capabilities| Integration | Description |
|---|---|
| REST APIs | Call any HTTP endpoint with custom headers and payloads |
| Webhooks | Trigger external services when workflow events occur |
| Database queries | Read from and write to external data sources |
| Cloud functions | Invoke serverless functions on AWS, GCP, or Azure |
| External services | Integrate with any service that exposes an API |
Verifiable execution layer
Kwala ensures that every workflow execution is cryptographically verifiable through an independent verification layer that separates execution from validation. The verification model consists of two distinct node types:- Execution nodes: Monitor triggers, process workflows, and execute actions across blockchain networks. They generate cryptographic execution proofs containing all inputs, outputs, and state transitions, which are submitted to Kalp Chain.
- Verifier nodes: Operate independently from executors, acting as auditors that re-compute workflow logic and validate execution correctness. They ensure every execution adheres strictly to the user’s signed intent and defined workflow logic.
