21/11/2024 - BE - Increase Position, position.price miscalculations
Last updated
Last updated
Offside labs, who are currently doing our second audit, contacted us at 9:28โฏam UTC through telegram about the issue.
We acknowledged at 9:29โฏam and confirmed the issue by 10:30. At 10:51:20 UTC we deployed and disabled the Increase on the program as a temporary safety measure.
We worked on a permanent fix, reviewed by Offside Labs, that was .
We increasing a position (long or short) the calculation that recalculated the average entry price did not take into account the current PnL and so user were loosing PnL on increase (based on the increase size and price diff between open and increase)
User loosing PnL, pool profiting. Data : - 18,1% of positions did an increase over the affected period - 29.8% of total trade volume was from positions that has had an increase during their lifespans Roughly 900 positions affected. Some user have up to 61 increase on a single position (Bonk, chasing scarce liquidities). Issue was only causing losses for users (the PnL was reduced). Total of 191 users affected : - 88 users with more than $1 deficit - 45 users with more than $10 deficit - 21 users with more than $100 deficit - 3 users with more than $1000 deficit Total deficit for users $18,881
Updated the calculation that now take into account the PnL
Now the main resolution will be about what do we do to compensate users. Do we compensate users fully or partially, etc. This will be up for discussion in a proposal.
issue found: Offside Labs issue fix: Orex and Corto patch in: Release/19 - Adrena Program v1.1.5 and 6 proposal url: