What Is a “Re-Entrancy Attack” and How Does It Relate to Flash Loans?
A re-entrancy attack occurs when a contract function calls an external contract, and the external contract recursively calls back into the original function before it has finished executing its state changes. While not always directly linked, a flash loan can be used to supply the capital needed to trigger a re-entrancy vulnerability, especially if the vulnerability involves a withdrawal function that can be called multiple times before the balance is updated.