Smart Contracts
Smart contracts and programmability on Kaspa.
-
Can a Kaspa smart contract own a KCC20 token?
Yes — a KCC20 token can be owned not just by a wallet, but by another covenant entirely. KCC20 tracks ownership through two state fields: ownerIdentifier (the a
-
Do Kaspa Covenants require a separate smart contract layer?
No — Kaspa Covenants express asset logic directly on Kaspa L1 without an external execution environment. In many blockchain systems, programmable rules around a
-
How are NFTs different from cryptocurrencies?
Fungibility: Cryptocurrencies are fungible, meaning one unit is interchangeable with another. For instance, one Kaspa is equivalent to any other Kaspa in terms
-
How do I create and deploy a Kaspa NFT?
Video Tutorial 1: Whether you’re an artist, developer, or NFT enthusiast, this video will guide you through the process of choosing your NFT design strategy, le
-
How do I mint KRC-20 tokens?
Video Tutorials for minting KRC-20 tokens: KRC-20 Minting Guide Mint Crypto on KRC-20 Like a PRO... Kinda How to Mint KRC20 Tokens on Telegram and Kasware How T
-
How do I test a Silverscript covenant before deploying to Kaspa testnet?
Use sil-debug to verify your covenant's state transitions locally before sending anything to testnet. You launch it with: cargo run -p cli-debugger -- [file] --
-
How do Kaspa covenants control how a UTXO can be spent?
A Kaspa covenant is a script that controls not just who can spend a UTXO, but how it must be spent. In a standard transaction, a script usually only verifies a
-
How do Kaspa smart contracts communicate with each other on L1?
On Kaspa's Layer 1, contracts communicate through Covenant IDs — a mechanism that lets one contract verify and govern another within the same transaction. Each
-
How do Kaspa's covenant IDs prevent forged covenant UTXOs from being created?
Kaspa's covenant IDs block forgery at the consensus level — a fake covenant UTXO cannot be created in the first place, not merely rendered unspendable after the
-
How do KRC-20s differ from ERC-20s?
KRC-20 tokens and ERC-20 tokens share a similar foundation in terms of token standards for fungible tokens, but they differ significantly due to their underlyin
-
How do smart contracts work?
Smart contracts are digital agreements encoded directly into blockchain networks like Ethereum, Binance Smart Chain, and Solana. Here’s how they function: Prede
-
How do vProgs interact with each other on Kaspa?
vProgs achieve synchronous composability with each other without any vProg needing to trust another. Each vProg is an independent state machine that runs its ow
-
How does a Kaspa threshold script allow two different spending conditions?
A Kaspa threshold script defines two separate rules for who can spend a locked balance and how. First, the owner can spend freely at any time by supplying a val
-
How does enabling transaction payloads advance Kaspa's smart contract capabilities?
Kaspa's hardfork lifting the empty-payload restriction on native transactions is the network's first concrete step toward second-layer smart contract support. B
-
How does Kaspa prevent a UTXO from forging a covenant ID?
Under KIP20, an output can only carry a specific covenant ID under one of two conditions: it either continues an already-existing covenant that holds that ID, o
-
How does Kaspa's covenant model advance state one step at a time?
In Kaspa's covenant model, each protected output can only move forward by exactly one valid state transition, triggered by a spend transaction that satisfies th
-
How does Kaspa's covenant system keep state inside a UTXO?
Kaspa covenants allow a state machine to live entirely inside a UTXO and its script, with no external coordination needed. In most blockchain systems, tracking
-
How does Kaspa's design avoid state bloat?
Kaspa's L1 verifies ZK proofs rather than re-executing contract code, which eliminates the state bloat that builds up on chains where every node must re-ru
-
How does Kaspa's Mecenas covenant enforce its recurring payment rules?
Kaspa's Mecenas covenant enforces three specific rules on every withdrawal: the recipient receives exactly the defined payment amount, the remaining funds stay
-
How does Kaspa's off-chain-on-chain architecture address gas fees?
Kaspa's L2 approach uses an off-chain-on-chain architecture that is designed to circumvent gas issues and Turing completeness constraints common to other smart
-
How does Kaspa's shared secret script support two types of UTXO spending?
Kaspa's shared secret script locks a UTXO so it can be spent in exactly two ways: by the original owner, or by an authorized borrower who meets a strict set of
-
How does KCC20 control how many tokens can exist?
KCC20 enforces token supply rules automatically through its contract logic, using a flag called isMinter. Each KCC20 covenant output is classified as either a m
-
How does KIP-10 support smart contracts and conditional spending on Kaspa?
KIP-10 explicitly targets smart contracts and conditional spending as two of its core goals. A smart contract is a piece of code that automatically enforces the
-
How does Silverscript express time in contract logic?
Silverscript lets you write time durations in plain English words — seconds, minutes, hours, days, and weeks — and compiles them into the correct timelock value
-
How does Silverscript handle KAS denominations in smart contracts?
Silverscript has built-in units for Kaspa's currency denominations, so you can write amounts in plain terms rather than raw numbers. Kaspa's smallest unit is th
-
How does the Crescendo Hardfork position Kaspa for smart contracts?
The Crescendo Hardfork increases Kaspa's capacity and speed specifically to support anticipated demand from emerging technologies, including smart contract laye
-
Igra Labs
Igra Labs [sp_easyaccordion id="730"]
-
Is Silverscript ready for mainnet use?
Not yet — as of the Toccata mainnet launch, Silverscript is experimental and valid only on testnet 12, with mainnet support actively in development. Tooling is
-
KaspaEVM
KaspaEVM [sp_easyaccordion id="753"]
-
Kasplex
Kasplex [sp_easyaccordion id="726"]
-
Smart Contracts Information
Smart Contracts Information [sp_easyaccordion id="687"]
-
Sparkle
Sparkle [sp_easyaccordion id="722"]
-
What applications can Kaspa covenants enable?
Kaspa covenants can enable fungible and non-fungible tokens, smart vaults with timelocks, stateful applications, and trustless Layer 1 to Layer 2 bridges. These
-
What are covenant declaration macros in Silverscript?
Silverscript uses Rust-style attribute macros to declare how a covenant behaves on the Kaspa blockchain. A covenant is a rule baked into a transaction that cont
-
What are covenants on Kaspa L1?
Covenants on Kaspa L1 are a way to attach rules and state directly to an asset output, controlling exactly how it can be spent now and in the future. In a stand
-
What are dApps?
A decentralized application (dApp) is a software application that runs on a blockchain or peer-to-peer network, leveraging its decentralized infrastructure inst
-
What are Kaspa Covenants best suited for?
Kaspa Covenants are best suited for products where the rules governing asset movement are the core of what is being built. These include vaults and treasury con
-
What are Kaspa NFTs?
Kaspa NFTs refer to Non-Fungible Tokens (NFTs). These are also called KRC-721s. They are created and traded on Kspr Bot (on Telegram ) and Kaspa.com . These NFT
-
What are KIP-17 and KIP-20 in the Covenants++ upgrade?
KIP-17 and KIP-20 are two of the three upgrades activated by the Covenants++ hardfork. KIP-17 adds covenant opcodes — special instructions that give a transacti
-
What are KRC-20 tokens?
KRC-20 tokens are fungible tokens on Kaspa BlockDAG. They follow a standard that defines a set of rules for tokens to interact within the ecosystem. KRC-20 prov
-
What are the two modes for Silverscript covenant declarations?
Silverscript covenant declarations can run in either Verification mode or Transition mode. Verification mode is the default: it automatically reads the current
-
What are vProgs (Verifiable Programs)?
vProgs, short for Verifiable Programs, are Kaspa's published protocol specification for running program logic off the main chain while keeping it verifiabl
-
What can Kaspa covenant scripts enforce after KIP17?
After KIP17, Kaspa covenant scripts can verify that an outgoing transaction preserves specific rules about amounts, scripts, and state. A covenant is a constrai
-
What can Kaspa fan-out covenants be used for?
Fan-out covenants in Kaspa's Silverscript are useful for distributing funds to multiple recipients, splitting token supply, or forking a pipeline into parallel
-
What can smart contracts do?
Decentralized Finance (DeFi) Platforms DeFi platforms utilize smart contracts to offer financial services like lending, borrowing, and trading without tradition
-
What cryptographic functions are available in Kaspa's Silverscript?
Silverscript gives covenant developers four built-in cryptographic functions: blake2b, sha256, checkSig, and checkMultiSig. These were introduced by KIP17 — a K
-
What do KIP-17 and KIP-20 add to Kaspa?
KIP-17 adds covenant opcodes that give transactions the ability to inspect their own contents — a feature called transaction introspection. KIP-20 introduces co
-
What does the Covenants++ hardfork add to Kaspa?
The Covenants++ hardfork activates three protocol upgrades — KIP-16, KIP-17, and KIP-20 — in a single event. KIP-16 brings zero-knowledge proof verification int
-
What Input/Output Query Opcodes does KIP-0010 add to Kaspa?
KIP-0010 proposes four new opcodes that allow Kaspa scripts to read the amounts and script public keys of a transaction's inputs and outputs. An opcode is a low
-
What is a canonical bridge?
A canonical bridge is how your Kaspa enters and exits the layer 2. Simplified, it is an address owned and controlled by the L2, creating a bridgedKAS within the
-
What is a covenant ID in Kaspa's KIP20?
A covenant ID is a consensus-tracked 32-byte identifier introduced by KIP20 that UTXOs carry to establish a stable lineage for covenant state. In Kaspa, UTXOs (
-
What is a smart contract?
A smart contract is a computer program or a transaction protocol that is intended to automatically execute, control or document events and actions according to
-
What is Covenant ID ownership in Kaspa's scripting system?
Covenant ID ownership is the way one Kaspa contract establishes authority over another. A covenant is a self-enforcing script that controls how an output on the
-
What is DeFi?
DeFi, short for Decentralized Finance , refers to an ecosystem of financial applications and services built on blockchain technology that operate without tradit
-
What is EVM Compatibility?
EVM stands for Ethereum Virtual Machine. It powers Ethereum smart contracts. Once smart contracts arrive, Kaspa will be able to run Ethereum dApps better than E
-
What is IgraLabs doing with Kaspa?
They're building an EVM-compatible programmability layer on top of Kaspa BlockDAG. Igra's endgame is to deliver a platform that combines Bitcoin-grade security
-
What is Inline ZK in Kaspa, and when should developers use it?
Inline ZK is a Kaspa programmability option where each user action computes its own result and proof locally, then submits an execution proof to Kaspa for verif
-
What is Kaspa's architectural philosophy for smart contracts?
Kaspa is building verification-oriented programmability directly into its base layer (L1) as a core design decision from the start. In blockchain architecture,
-
What is Kasplex?
Kasplex is a non-profit organization that focuses on making it easy for developers, artists, and influencers to launch projects on Kaspa. The project consists o
-
What is Kii?
The Kaspa Industrial Initiative (Kii) is a foundation committed to leveraging Kaspa’s high-performance Directed Acyclic Graph (DAG)-based Distributed Ledger Tec
-
What is KIP-16 and how does ZK proof verification work in Kaspa?
KIP-16 adds zero-knowledge (ZK) proof verification as a consensus-level opcode in Kaspa. A ZK proof is a cryptographic technique that lets one party prove a sta
-
What is NFT digital art?
NFT digital art refers to artwork that exists in a digital format and is tokenized using Non-Fungible Tokens (NFTs) on a blockchain. Here are the key aspects: T
-
What is SilverScript?
SilverScript is Kaspa's first high-level smart contract language, already implemented and running on Testnet 12 today. Its compiler is open-source and ship
-
What is Silverscript for Kaspa?
Silverscript is the primary tool for writing Kaspa covenants — programmable rules that govern how coins can be spent. It is a high-level language, meaning devel
-
What is Sparkle?
The Sparkle Project is a Rust-WASM SDK for Kaspa, designed to support seamless, cross-platform development. This SDK not only enhances accessibility for develop
-
What is state bloat and how do vProgs address it?
State bloat is the problem that occurs when every node in a network must re-run every computation, causing the chain's data footprint to grow continuously.
-
What is the 'additive-only spending' pattern in Kaspa?
Kaspa's scripting system can lock a coin balance so that it can only grow — never be drained — unless the original owner signs off. This works through a script
-
What is the Covenants++ hardfork?
Covenants++ is a Kaspa hardfork that activates three protocol upgrades — KIP-16, KIP-17, and KIP-20 — simultaneously in a single network upgrade. A hardfork mea
-
What is the Mecenas contract in Kaspa's Silverscript?
The Mecenas contract is a recurring payment covenant built in Silverscript, Kaspa's covenant scripting language. A covenant is a set of rules written directly i
-
What is the N:M merge pattern in Silverscript covenants?
The N:M merge pattern lets a Silverscript covenant accept multiple inputs and produce multiple outputs in a single transaction. In most blockchain scripts, each
-
What is the benefit of having a Kaspa NFT?
The primary points of having a Kaspa NFT (Non-Fungible Token) include: Proof of Ownership and Authenticity : NFTs serve as unique digital certificates of owners
-
What is transaction introspection in Kaspa's KIP17?
Transaction introspection in KIP17 means Kaspa scripts can read details from the transaction that is trying to spend them — things like the transaction version,
-
What is Verification mode in Silverscript?
Verification mode is the default execution mode for Silverscript covenant declarations — it automatically reads the current transaction state so the developer o
-
What kinds of projects are a good fit for Kaspa's Inline ZK option?
Inline ZK is well-suited to four use-case categories: privacy-preserving actions, proof-verified workflows, custom account models, and applications that want to
-
What kinds of smart contracts does SilverScript support?
SilverScript's open-source compiler ships with over 80 working contract examples covering a broad range of use cases. The examples include vaults, smart wa
-
What new scripting capabilities does KIP-10 add to Kaspa?
KIP-10 proposes new opcodes that let Kaspa scripts read transaction data directly and work with larger numbers, unlocking more advanced transaction types. In a
-
What opcodes let Kaspa scripts inspect a transaction's input and output count?
Kaspa's scripting layer provides three opcodes that let a script examine the structure of the transaction it belongs to: OpTxInputCount, OpTxOutputCount, and Op
-
What programming model will Kaspa's vProgs environment use?
Kaspa's vProgs execution environment will use a programming model that resembles Solana's account model, with explicit read/write declarations. This m
-
What real-world operations use Silverscript's N:M covenant pattern?
Silverscript's N:M pattern is the building block behind token merging, vote aggregation, and multi-party escrow settlement on Kaspa. Token merging lets a user c
-
What shorthand macros does Silverscript provide for common covenant patterns?
Silverscript offers two shorthand macros for the most common covenant shapes so developers don't have to write the full parameter list every time. The first, #[
-
What smart contract architecture does Kaspa enable for Layer 2s?
Kaspa's design enables a new smart contract architecture that combines the simplicity of zk-rollups with the responsiveness and security of on-chain execution.
-
What smart contracts are under development?
Some developers are working to bring EVM to Kaspa, while others are working to build the infrastructure to bring ANY SC to Kaspa. Core developers are working on
-
What three conditions must an authorized borrower meet in a Kaspa shared secret script?
An authorized borrower must satisfy all three of these conditions at once to spend a UTXO locked by a Kaspa shared secret script. First, they must know a pre-de
-
What VM is being evaluated for Kaspa's vProgs execution?
Cairo, developed by StarkWare, is being evaluated as the likely first virtual machine for Kaspa's vProgs smart contract execution. It was chosen because it
-
When should a Silverscript covenant use Transition mode instead of Verification mode?
Use Transition mode when the new state cannot be inferred from the existing transaction state alone — for example, when a script must decrement an issuance allo
-
Where can I buy and sell KRC-20 Tokens?
You can buy, sell, and trade them on the KRC-20 Marketplace on Kaspa.com or Kspr Bot (on Telegram).
-
Where can I monitor the KRC-20s?
Check out the KRC-20 Token Dashboard, trending tokens, top gainers, top markets, top transferred, and a full list of all KRC-20 tokens deployed on Kaspa. You wi
-
Where is the NFT Marketplace?
Trade NFTs Now: http://kaspa.com/nft/marketplace Kaspa.com NFT Marketplace is LIVE! They made KRC-721 NFT trading (BUY/SELL) as smooth and easy as it gets—for y
-
Why can't Silverscript developers call the keyed Blake2b variant directly?
The blake2b() function available in Silverscript user code is strictly the unkeyed variant — a mode that hashes data without a secret key mixed in. The keyed Bl
-
Why don't Kaspa covenant scripts need canonical transaction encoding to verify lineage?
Because Kaspa's covenant IDs embed a unique outpoint in their cryptographic hash, covenant scripts can confirm their ancestry without encoding or re-hashing the
-
Why is Cairo being evaluated as Kaspa's first smart-contract VM?
Cairo, developed by StarkWare, is being evaluated as the likely first VM to run Kaspa's vProgs because its Sierra bytecode format uniquely provides provabl
-
Why was tracking covenant state expensive in Kaspa before KIP20?
Before KIP20 covenant IDs, proving a UTXO belonged to a specific covenant instance required attaching parent and grandparent transactions as witness data inside