openskills.info
Course Preview

Smart Contract Security

Smart contract security is the practice of keeping blockchain programs correct when any account or contract can call them with adversarial inputs. It protects assets, permissions, and system rules before and after code is deployed.

itOffensive security and application security

Recommended first:smart-contract-development

Smart Contract Security

Smart contract security is the discipline of preserving a blockchain application's rules under hostile use. A contract receives public transactions, changes shared state, and may control assets. Every caller can choose inputs, timing, and transaction ordering. Another contract can call back during an interaction. A privileged account can also become an attack path if its key or governance process fails.

This course uses Ethereum Virtual Machine (EVM) contracts written in Solidity as the main model. The reasoning extends to other contract platforms, but their execution rules and tools differ. Security begins with the exact platform semantics rather than a list of language-level bugs.

The system and its trust boundaries

A deployed application usually contains more than one contract. Users and automated agents submit transactions through public entry points. Contracts read and write persistent storage, call other contracts, emit logs, and consume gas. Off-chain services supply data, relay signed messages, monitor events, and operate privileged accounts.

Treat each boundary as adversarial until the design states a narrower assumption:

  • Caller boundary: any external account or contract may invoke a public or external function.
  • Call boundary: an external call hands execution to code outside the current function. That code can revert, consume gas, or call back.
  • Asset boundary: a token can have transfer behavior that differs from the receiving contract's assumptions.
  • Data boundary: an oracle report can be stale, manipulated, or unsuitable for the value at risk.
  • Authority boundary: owners, roles, multisignature wallets, timelocks, and upgrade administrators can change protected behavior.
  • Deployment boundary: the address, bytecode, compiler settings, initialization, and chain must match the reviewed release.

These boundaries connect. A function that accepts an untrusted token may trigger an external callback. That callback may reach a second function whose access control or accounting assumes the first function has finished. Security review therefore follows whole state transitions, not isolated lines.

Continue the course

This section is part of the paid course.

See pricing to subscribe, or log in if you already have access.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources