Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.07 KB

`UniswapIncentive` overflow on pre-transfer hooks.md

File metadata and controls

27 lines (22 loc) · 1.07 KB

Before a token transfer is performed, Fei performs some combination of mint/burn operations via UniswapIncentive.incentivize.

Both incentivizeBuy and incentivizeSell calculate buy/sell incentives using overflow-prone math, then mint / burn from the target according to the results.

This may have unintended consequences, like allowing a caller to mint tokens before transferring them, or burn tokens from their recipient.

Recommendation:

Ensure casts in getBuyIncentive and getSellPenalty do not overflow


Slide Screenshot

011.jpg


Slide Text

  • ConsenSys Audit Fei Finding 3.3
  • Data Validation
  • Major Severity
  • Overflow-Prone Casting
  • Use SafeCast

References


Tags