Lyncs VM
Lyncs is a lightweight, purpose-built execution environment (a Simple Contract engine) for the KRC-20 protocol. It deterministically executes contract logic on KRC-20 and outputs verifiable execution results. Lyncs is built on a customized version of the open-source LuaJIT virtual machine adapted for blockchain use, and uses Lua as the contract DSL (Domain-Specific Language). Lua’s concise syntax and low learning curve, together with LuaJIT’s high execution efficiency, allow Lyncs to be both well-performed and developer-friendly.
Lyncs includes a built-in security sandbox that constrains accessible runtime capabilities, reducing the contract code’s impact on the host system and external environment, and ensuring execution is controllable, reproducible, and auditable.
Lyncs employs a parallel scheduling mechanism based on Predefined Keys and Key Conflicts. During initialization, a contract explicitly declares the set of state keys it will read and write; the system uses this declaration to execute contract calls in parallel when there are no key conflicts. When key conflicts exist, the scheduler automatically falls back to serial execution to ensure the final state remains consistent with the deterministic execution model.
As KRC-20’s contract engine, Lyncs adopts a multi-contract model partitioned by OP type: the KRC-20 protocol maps different OP types to separate, independent contracts. Each valid KRC-20 transaction is equivalent to a contract invocation, with validation and state transitions performed by the contract logic corresponding to that OP type.
Lyncs is an independent open-source project. Within the KRC-20 protocol, Lyncs serves as the execution environment for Simple Contracts. At present, KRC-20 uses a non-permissionless contract system: contract additions or updates are proposed and designed by the protocol team, take effect after the community reaches consensus, and are managed and executed by the KEF (Kaspa Ecosystem Foundation) based on publicly released versions and reproducible execution.

Last updated