Fill price premium/discount calculations incentivize large over small imbalances.
The fillPrice premium/discount is calculated by taking the average of the current skew and the skew. This calculation is then applied to the price, allowing the getMarkPrice function to return the fill price.
The issue with this approach is that users are more incentivized to create large imbalances in the skew which is undesirable.
Consider this example of changing the skew from 0 to 1000:
Then consider this example of changing the skew from 950 to 1000:
Moving the skew by 50 tokens results in a worse price impact than moving the skew by 1000 tokens, while both result in the same skew.
Traders are incentivzed to create large imbalances in the skew which is undesirable for Perps market.
https://github.com/Cyfrin/2024-07-zaros/blob/main/src/perpetuals/leaves/PerpMarket.sol#L98
Manual Review
Consider redesigning the fill price calculation so that incentives align with the actual impact a user's position would have on the skew.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.