Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Smart Contract Security 101: What and Why

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Smart Contract Security 101: What and Why

The presentation is about the smart contract security.

Avatar for Krunal Savaliya

Krunal Savaliya

February 20, 2026

More Decks by Krunal Savaliya

Other Decks in Research

Transcript

  1. Krunal Savaliya ABOUT ME Security Engineer - AppSec at Micron

    Technology by Day Researcher by Night 4+ years of experience in Application Security Play piano sometimes
  2. AGENDA Blockchain Fundamentals 1 Ethereum Architecture 2 What are Smart

    Contracts 3 Why Smart Contract Security Matters 4 Real-World Exploits & Vulnerabilities 5 Key Takeaways 6 References & Resources 7
  3. WHAT IS BLOCKCHAIN? Distributed Digital Ledger that records transactions across

    multiple computers. No central authority Cryptographically secured Everyone holds a copy
  4. CORE PROPERTIES OF BLOCKCHAIN No single point of failure Thousands

    of nodes Hard to censor Decentralization Hash-linked blocks History cannot be changed Requires consensus Immutability Public transactions Full audit trail Anyone can verify Transparncy
  5. ETHEREUM PROTOCOL Create Turing complete blockchain allow users to perform

    functions via code. Build applications such as DeFi, DAOs, NFTs, etc. ether → currency Ethereum → Protocol
  6. Proof Of Stake (PoS) Consensus & Gas Fees Miner/Validators: stake

    32 ETH to participate in block production. They will get selected randomly to validate blocks. Gas Fees: It measures computational work required to complete transaction on ethereum. Validators earn gas fees in ETH.
  7. WHAT ARE SMART CONTRACTS? Self-executing programs when predefined conditions are

    met. Deployed and run on blockchain Handle real value - cryptocurrencies, tokens, NFTs and other digital assets. Immutable once deployed - code cannot be change.
  8. WHY THEY ARE DANGEROUS? Code is public Code is immutable

    Directly manages money Adversarial Environment
  9. Access Control & Infrastructure Issues $3.6B Total Losses (2025) Across

    DeFi/Crypto Space 134+ Total Security Incidents 83% losses only from these issues Source: CredShields 2025 Report*
  10. Malicious Contract calls external vulnerable contract External contract calls back

    State not updated yet Funds drained REENTRANCY ATTACK 1. Attacker deposits funds → 2. Calls withdraw → 3. Contract sends ETH → 4. Attacker's fallback triggers → 5. Re-enters withdraw → 6. Balance not yet updated → 7. Repeat until drained
  11. THE INFAMOUS DAO HACK (2016) In 2016, decentralized investment fund

    based on smart contract got hacked. 3.6M ETH stolen ($60M at that time) - 5.6% of all ETH in circulation Vulnerability: Reentrancy in `withdraw` function Hard fork in ETH and ETH Classic
  12. HOW TO FIX REENTRNACY? Follow CEI Pattern, a.Checks b.Effects c.Interaction

    Use OpenZeppelin’s reentrancyguard contract Use modifier as reentrancy guard
  13. Solidity has fixed size integers INTEGER OVERFLOW & UNDERFLOW Overflow

    `uint8: 255 + 1 = 0` → Wraps to min Underflow `uint8: 0 - 1 = 255` → Wraps to max
  14. TRUEBIT PROTOCOL HACK (JAN, 2026) Decentralized off-chain computation marketplace Native

    token TRU, for minting and burning (with ETH) $26.44M stolen No Overflow Protection Attacker called → getPurchasePrice() with large input → ETH to mint TRU tokens → returns 0 → mint() → attacker received → TRU tokens → paid 0 ETH to contract → Immediately → burn() → received ETH
  15. Missing or improper access control leads to, Privileged functions access

    Minting tokens Draining funds 58% of hacks in 2025 → Access control issue. ACCESS CONTROL VULNERABILITY
  16. PARITY WALLET FREEZE (2017) Library contract was not initialized Anyone

    could own library Self-destruct allowed Funds frozen - deleted the library 500k ETH loss
  17. HOW TO FIX ACCESS CONTROL VULNERABILITY? Implement Role-Based Access Control

    (RBAC) Use Established Libraries (Ownable / AccessControl) from Openzepplin Multi-Signature Authorization for Critical Actions Secure Initialization & Ownership Patterns
  18. KEY TAKEAWAYS Smart contracts are fundamentally different from Web2 High

    stakes, zero margin for error Access control is critical Security is a design principle Defense in Depth wins