How Does the KRNL Protocol Work?
This page is dedicated to illustrating how the KRNL Protocol works when a dApp submits a transaction to a smart contract, and how smart contracts receive responses from kernels. This is the high level architecture:
Step 1 — User interacts with dApp
The user initiates an action (e.g., rebalance, verify, fetch data) through the dApp frontend, which is integrated with KRNL SDK.

Step 2 — User Account (EOA) Authorizes a smart contract account
The user’s Externally Owned Account (EOA) delegates execution rights to their SCA via EIP-7702, enabling account abstraction flows.

Step 3 — dApp uses KRNL SDK (fetch metadata)
The dApp backend uses the KRNL SDK to retrieve workflow definitions and registry metadata, ensuring the correct kernel set and logic are loaded.

Step 4 — SDK sends JSON-RPC request to KRNL Node
The execution request (workflow DSL + parameters) is transmitted to the KRNL-Node over JSON-RPC for orchestration.

Step 5 — Workflow Engine loads the workflow
KRNL-Node parses the workflow DAG, allocates resources, and prepares execution in isolated gVisor sandboxes.

Step 6 — Executor runs steps (sandboxed) and calls externals
Each kernel (API call, blockchain op, data transform) is executed by an Executor

Step 7 — Attestor signs the final result
The Attestor monitors network traffic, derives ephemeral keys, and cryptographically signs the final result.

Step 8 — KRNL Node sends the UserOps to the Relayer/Bundler
The signed execution proof is wrapped into a user operation (userOp) and handed off to the external bundler for blockchain submission.

Step 9 — Bundler forwards the UserOps after validation to designated SCA
The bundler checks proof validity, batches ops if needed, optimizes gas usage, and submits the userOp to the EntryPoint/SCA for on-chain processing.

Step 10 — SCA sends the fees to KRNL Vault & Execute the target smart contract
On-chain, the SCA verifies the attestor’s signature, atomically transfers execution fees to KRNL-Vault, and calls the target smart contract with the verified result.

Step 11 — Target Contract updates state / business logic
The target contract executes its logic (e.g., swap, asset update) only after validating the KRNL proof, ensuring trustless correctness.

Last updated