Intro to Smart contract exploits: Selfdestruct function

  1. Transfer: Throws exception when an error occurs, and the code will not execute afterward
  2. Send: The transfer error does not throw an exception and returns true/false. The code will continue to execute.
  3. call.value().gas: Transfer error does not throw an exception and returns true/false. The code will execute, but call functions for transfer are prone to reentrancy attacks.

Let’s look at an example of an Attack contract

--

--

--

Focuses on Blockchain Ecosystem Security, have served over 1k+ customers.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

CompTIA Network+ Exam Questions Part 5 — Ver 2022

CompTIA Network+ Exam Questions Part 5 — Ver 2022

Introducing the COVID-19 App Tracker

What Are The Highlights of SIEM?

Google Authenticator export format

Is Cybersecurity Education the Key to Keeping Canadians Safe?

TryHackMe write-up: Startup

Anicube to Start Free NFT Airdrop Registration

You have an opportunity to earn up to 50 $JET tokens by joining our registration and referral…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
SlowMist

SlowMist

Focuses on Blockchain Ecosystem Security, have served over 1k+ customers.

More from Medium

Introduction to Smart Contract Vulnerabilities: Reentrancy Attack

Lunaray Security Scan Report

A Journey to Exploit the MOST Vulnerable Contracts in the DeFi Universe

Ethernaut — Level 7 — Vault