Zealynx AcademyZealynx Academy
Course checkpoint

Rust Contracts: Memory Safety and Security Boundaries

Question 1 of 5Score 0/5

Rust ownership checks pass. What does that establish about a contract’s access control?

Review and apply

Worked answers

Try the quiz above first, then open an answer to compare your reasoning. These notes are also available to read without completing an attempt.

  1. 1. Rust ownership checks pass. What does that establish about a contract’s access control?

    • A.Only the owner can call every function.
    • B.All token transfers are economically correct.
    • C.Nothing by itself; authorization must still be designed and tested.
    • D.The chain automatically rejects unauthorized business actions.
    Answer and explanation

    C. Nothing by itself; authorization must still be designed and tested.

    Ownership in the Rust language concerns memory-management rules. Contract authorization concerns who can perform a business operation. One does not establish the other.

  2. 2. A historical contract tutorial uses old dependencies. What should precede reuse?

    • A.Assume an old install command is supported today.
    • B.Upgrade every package blindly and skip tests.
    • C.Treat a successful download as a security review.
    • D.Check current support and pin a reviewed compiler, runtime and dependency set.
    Answer and explanation

    D. Check current support and pin a reviewed compiler, runtime and dependency set.

    Historical examples can teach concepts without being a current setup guide. Verify maintained tooling and relevant runtime behavior before adapting them.

  3. 3. Which property is relevant to a toy token implementation in either Rust or Solidity?

    • A.Balances and total supply obey the intended accounting rules across permitted transitions.
    • B.The source file has a fashionable extension.
    • C.The language name guarantees correct supply.
    • D.The compiler chooses the economic policy automatically.
    Answer and explanation

    A. Balances and total supply obey the intended accounting rules across permitted transitions.

    Language-level checks do not choose the token’s business invariants. Test mint, burn and transfer permissions and the resulting balances under the intended model.

  4. 4. Why must a contract review name the target chain and runtime?

    • A.All Rust environments share identical contract semantics.
    • B.Execution, storage and cross-contract behavior depend on that environment.
    • C.The chain is only a frontend preference.
    • D.The runtime cannot affect security assumptions.
    Answer and explanation

    B. Execution, storage and cross-contract behavior depend on that environment.

    Rust is used in different environments. A finding’s reachability and a test’s meaning depend on the actual runtime, interfaces and versions.

  5. 5. An old ink! example compiles with a pinned toolchain. What is a justified claim?

    • A.The framework is necessarily actively maintained.
    • B.The example is safe to deploy with user funds.
    • C.It is a reproducible historical exercise, not proof of current maintenance or production suitability.
    • D.Compilation replaces a dependency review.
    Answer and explanation

    C. It is a reproducible historical exercise, not proof of current maintenance or production suitability.

    Reproducibility and present support are separate facts. The course is a historical archive; check current official maintenance information before choosing a production stack.

Read alongside: The Rust Book: ownership