The calculation of the MEV tax in the takeCommissionAddData function does not accurately account for the intrinsic value of ITM positions. This could lead to incorrect fee calculations and potential losses for the protocol.
Revise the calculation of the MEV tax in the takeCommissionAddData function to accurately account for the intrinsic value of premium positions. This may involve adjusting the formula used to calculate the tax or ensuring that the intrinsic value is correctly factored into the calculation.
Lines of code
https://github.com/code-423n4/2024-04-panoptic/blob/main/contracts/CollateralTracker.sol#L995
Vulnerability details
Impact
The calculation of the MEV tax in the takeCommissionAddData function does not accurately account for the intrinsic value of ITM positions. This could lead to incorrect fee calculations and potential losses for the protocol.
Proof of Concept
https://github.com/code-423n4/2024-04-panoptic/blob/main/contracts/CollateralTracker.sol#L995
Tools Used
Manuel Review
Recommended Mitigation Steps
Revise the calculation of the MEV tax in the takeCommissionAddData function to accurately account for the intrinsic value of premium positions. This may involve adjusting the formula used to calculate the tax or ensuring that the intrinsic value is correctly factored into the calculation.
Assessed type
Other