Wallets & SecurityAdvanced

Reentrancy

A pattern where an external call re-enters a contract before an earlier operation has finished.

PLAIN-ENGLISH DEFINITION

In more detail

A contract can call another contract, which calls back before the first operation finishes updating state. Reentrancy becomes a vulnerability when this interruption breaks accounting or other assumptions. Developers use careful state updates and suitable guards so callbacks cannot act on information that should have changed.

IN THE WILD

How you might use it

The withdrawal callback calls back into withdrawal before the first call updates the balance; that second call sees the old accounting.

Was this clear?

Got a way to make Reentrancy click?

Add your take

By Crypto Dictionary · Published · Updated

Go to the source

Use the original reference to explore the details behind this entry.

Read the reference

An original explanation with a reference to follow. Protocol details and community usage can evolve. Sources & standards

PASS IT TO THE GROUP CHAT

Share a definition