Reentrancy Attacks on Smart Contracts Distilled