ACADEMY

v2

MODULE 14

LESSON 4

Execution Model

Qubic contracts are written in a restricted C++ environment called the Qubic Programming Interface (QPI).

Key facts:

Feeless for users

Invocation cost is paid from the contract’s locked QUs and burned — users send transactions without gas fees.

Instant finality

All 676 Computors execute the code; if ≥451 agree, the tick finalizes in ~0.2 s.

State pruning

Each 7-day epoch prunes transaction history while preserving current state.


The information after the epoch finalization is not lost, but stored offline (not in computor’s RAM).

Example (copied directly from QPI example repo):

void REGISTER_USER_FUNCTIONS_AND_PROCEDURES() {
    REGISTER_FUNCTION(greet);
    REGISTER_PROCEDURE(setGreeting)

HANDS-ON TASK

On testnet, call a contract Function (read-only) and a Procedure (state-changing). Compare the network messages and ledger entries.

HANDS-ON TASK

On testnet, call a contract Function (read-only) and a Procedure (state-changing). Compare the network messages and ledger entries.

© 2025 Qubic.

Qubic is a decentralized, open-source network for experimental technology. Nothing on this site should be construed as investment, legal, or financial advice. Qubic does not offer securities, and participation in the network may involve risks. Users are responsible for complying with local regulations. Please consult legal and financial professionals before engaging with the platform.

© 2025 Qubic.

Qubic is a decentralized, open-source network for experimental technology. Nothing on this site should be construed as investment, legal, or financial advice. Qubic does not offer securities, and participation in the network may involve risks. Users are responsible for complying with local regulations. Please consult legal and financial professionals before engaging with the platform.