# Smart contracts on QRL 2.0

> What smart contracts are, why QRL 2.0 has them and QRL Legacy doesn't, and what EVM-compatibility means.

One of the biggest functional differences between QRL's two chains is **smart contracts**. [QRL 2.0](/learn/glossary#qrl2) has them; [QRL Legacy](/learn/glossary#qrl-legacy) does not. This guide explains what that means.

## What a smart contract is

A **smart contract** is a program that lives on the blockchain and runs exactly as written, enforced by the network. Instead of "send 10 coins from A to B," a contract can encode arbitrary rules — a token, a marketplace, an escrow, a game — that move value when conditions are met. Once deployed, no one can quietly change it; the code is the rules.

## QRL Legacy: no contracts, just fixed types

QRL Legacy deliberately keeps things simple. It supports only a **fixed set of transaction types** — transfers, the mining reward (coinbase), token operations, messages, and a slave-key feature — and nothing more. There's no virtual machine and no way to deploy custom programs.

This simplicity was a reasonable choice for a chain focused on being a secure, quantum-resistant store and transfer of value. But it means QRL Legacy can't host the contract-based applications people expect from a modern smart-contract chain.

## QRL 2.0: EVM-compatible

QRL 2.0 changes that by being **EVM-compatible**. The Ethereum Virtual Machine (EVM) is the most widely-used smart-contract environment in the industry, and QRL 2.0's execution client (`gqrl`) runs the same kind of contract bytecode. In practice that means:

- contracts and developer tooling from the Ethereum world can largely be **reused**, and
- familiar standards apply — **QRC-20** tokens and **QRC-721 / QRC-1155** NFTs mirror Ethereum's ERC equivalents.

What stays distinctly QRL is the security layer: transactions are signed with quantum-resistant [ML-DSA-87](/learn/ml-dsa-87-explained), and addresses are [Q-prefixed and 41 characters](/learn/qrl-address-formats), not Ethereum's `0x` style.

## Tokens and NFTs as contracts

A practical consequence: on QRL 2.0, **tokens and NFTs are smart contracts**, just like on Ethereum. A QRC-20 token is a contract that tracks balances; a QRC-721 NFT is a contract that tracks unique items. This explorer decodes those contracts so you can browse [tokens](/top-tokens), [token transfers](/token-transfers) and [NFTs](/top-nft) directly. On QRL Legacy, by contrast, tokens are a built-in transaction type, not a contract.

## Why it matters

Smart contracts are what let a chain host applications beyond simple payments — DeFi, NFTs, on-chain governance. By making QRL 2.0 EVM-compatible while keeping quantum-resistant signatures, the project aims to offer that programmability **without** giving up its core security premise.

## Where to go next

- [QRL Legacy vs QRL 2.0](/learn/qrl-legacy-vs-qrl2) — the full comparison.
- [Gas and fees explained](/learn/gas-and-fees-explained) — what running a contract costs.
- [Blocks and transactions](/learn/blocks-and-transactions) — contract calls as transactions.
