Skill 3.2.2
Use audited libraries, access control and emergency stops
Key Concepts
OpenZeppelin Contracts is a widely audited library of token implementations (ERC-20, ERC-721, ERC-1155), access control, security utilities and upgradeable variants. Inheriting from it is safer than writing these from scratch, provided the version is kept current and its documentation is followed.
Ownable gives a contract one owner and an onlyOwner modifier; in version 5 the initial owner is passed to the constructor. Ownable2Step requires the new owner to accept, preventing transfer to a mistyped address. AccessControl defines roles such as MINTER_ROLE, granted and revoked by an admin role, which applies least privilege when several parties need different permissions.
An emergency stop (circuit breaker) such as OpenZeppelin's Pausable lets an authorised account pause functions marked whenNotPaused while an incident is investigated. Rate limits and withdrawal caps limit the damage of a compromise. Privileged roles should be held by a multisig wallet, often with a timelock that delays sensitive changes so users can react.