Using Vyper’s @nonreentrant Decorator to Stop Reentrancy Attacks
Learn how Vyper’s built‑in @nonreentrant decorator provides compile‑time reentrancy protection, see a concrete vault example, and understand its gas cost and scope limits.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how Vyper’s built‑in @nonreentrant decorator provides compile‑time reentrancy protection, see a concrete vault example, and understand its gas cost and scope limits.
Immutable variables let Vyper contracts embed constants in bytecode, cutting read costs and storage use. This post explains how they work, shows a real example, highlights trade‑offs, and tells you how to verify the savings in your own project.
Vyper's @nonreentrant decorator turns reentrancy from a code-review convention into a compiler-enforced guarantee. Here's how it works, a vault example, and where it falls short.
Learn how Vyper implements native overflow protection and bounds checking to prevent common smart contract vulnerabilities without needing external libraries.
Vyper makes overflow and underflow protection mandatory — no opt-out, no annotations. Here's what that costs in gas, what it buys in auditability, and when the trade-off matters.
Vyper’s checked arithmetic and explicit reentrancy lock reduce common smart‑contract bugs. A minimal vault example shows how default safety can replace Solidity’s opt‑in libraries.
Learn how to spot missing or misapplied @nonreentrant decorators in Vyper contracts, diagnose the root cause, apply fixes, and know when to seek an audit.
Immutable variables in Vyper let you set a value once at deployment, reduce storage gas, and enable compiler inlining. This guide explains when to use them, their trade‑offs, and a step‑by‑step validation workflow.
Vyper's @nonreentrant decorator gives you a storage-backed mutex with one line of code. This post shows a worked withdraw() example comparing manual checks-effects-interactions vs. the decorator, the gas/composability trade-offs, and a verification checklist to prove the lock actually holds.