How Do Collateral Management Functions Introduce Reentrancy Risk in Options Contracts?
Options contracts often require users to deposit collateral. The collateral management functions handle deposits, withdrawals, and liquidations.
If a withdrawal function for collateral is vulnerable to reentrancy, an attacker could withdraw more collateral than they are entitled to. Furthermore, if a liquidation function makes an external call before updating the collateral status, the attacker could re-enter to prevent liquidation or exploit the collateral pool.