Definition

What is Fallback and receive functions?

The receive function runs when a contract is sent plain native tokens with no data; the fallback function runs when a call matches no other function.

They are the entry points attackers use for reentrancy, so anything that sends value should assume the recipient's receive function may execute arbitrary code.

Go deeper

Related terms

Definition by , founder of Monsmith.

See it in practice

Open Monsmith, paste a contract, and watch the audit and profiler explain it.

Open the studio