code-423n4 / 2023-08-dopex-findings

3 stars 3 forks source link

Gas Optimizations #2173

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

See the markdown file with the details of this report here.

c4-pre-sort commented 1 year ago

bytes032 marked the issue as sufficient quality report

GalloDaSballo commented 11 months ago

GAS1: reserveTokens is not needed

R

GAS2: If minAmount is set then no need to compute minOut.

R

GAS3: Simplify _calculateAmounts() ratio

NC

GAS4: _whenNotPaused() not needed in mint()

L

GAS5: Save array index instead of Position struct

NC

GAS6: roundingPrecision could be constant

L

GAS7: Pass currentPrice to calculatePremium() instead of 0

L

GAS8: Remove positionId from the OptionPosition struct.

NC

3L 2R 3NC

c4-judge commented 11 months ago

GalloDaSballo marked the issue as grade-b