paint-brush
Hack Solidity: Reentrancy Attackby@kamilpolak
66,727 reads
66,727 reads

Hack Solidity: Reentrancy Attack

by Kamil Polak4mJanuary 17th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
EN

Too Long; Didn't Read

A reentrancy attack occurs when a function makes an external call to another untrusted contract. Then the untrtrusted contract makes a call back to the original function in an attempt to drain funds. When the contract fails to update its state prior to sending funds the attacker can continuously call the withdraw function to drain the contract’s funds. A famous real-world attack is the DAO attack which caused a loss of 60 million US dollars. A vulnerable smart contract has 10 eth. An attacker stores 1 eth using the deposit function. An attacker calls withdraw function and points to a malicious contract as a recipient.

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Hack Solidity: Reentrancy Attack
Kamil Polak HackerNoon profile picture
Kamil Polak

Kamil Polak

@kamilpolak

I am a huge enthusiast of cryptocurrency and blockchain technology.

About @kamilpolak
LEARN MORE ABOUT @KAMILPOLAK'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Kamil Polak HackerNoon profile picture
Kamil Polak@kamilpolak
I am a huge enthusiast of cryptocurrency and blockchain technology.

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite