Solana was supposed to be immune to reentrancy. The account model, the lack of dynamic dispatch, the explicit account list — all of it made the callback-based reentrancy attacks that plagued Ethereum effectively impossible. Then Token-2022 shipped Transfer Hooks, and everything changed.

Transfer Hooks let token issuers attach arbitrary program...