Last year in March 2024, I found a critical bug in the GammaSwap protocol on Immunefi, which allowed anyone to steal funds from some newly deployed GammaSwap pools. In this write-up, I will explain the bug in detail. Let's begin!Note to users: This bug was fixed immediately after it was reported and no funds were lost. This bug only impacted some newly deployed GammaSwap pools and the bug has been fully mitigated and is no longer present.What is GammaSwap?GammaSwap is a perpetual options...